💻 My personal website blog.kacaii.dev/
blog gleam lustre

:recycle: `jot` now supports `<span>` tags

+33 -33
+1 -1
gleam.toml
··· 15 [dependencies] 16 gleam_stdlib = ">= 0.44.0 and < 2.0.0" 17 lustre = ">= 5.4.0 and < 6.0.0" 18 - jot = ">= 8.0.0 and < 9.0.0" 19 simplifile = ">= 2.3.1 and < 3.0.0" 20 frontmatter = ">= 1.0.1 and < 2.0.0" 21 tom = ">= 2.0.0 and < 3.0.0"
··· 15 [dependencies] 16 gleam_stdlib = ">= 0.44.0 and < 2.0.0" 17 lustre = ">= 5.4.0 and < 6.0.0" 18 + jot = ">= 9.0.0 and < 10.0.0" 19 simplifile = ">= 2.3.1 and < 3.0.0" 20 frontmatter = ">= 1.0.1 and < 2.0.0" 21 tom = ">= 2.0.0 and < 3.0.0"
+8 -8
manifest.toml
··· 17 { name = "gleam_json", version = "3.1.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_json", source = "hex", outer_checksum = "44FDAA8847BE8FC48CA7A1C089706BD54BADCC4C45B237A992EDDF9F2CDB2836" }, 18 { name = "gleam_otp", version = "1.2.0", build_tools = ["gleam"], requirements = ["gleam_erlang", "gleam_stdlib"], otp_app = "gleam_otp", source = "hex", outer_checksum = "BA6A294E295E428EC1562DC1C11EA7530DCB981E8359134BEABC8493B7B2258E" }, 19 { name = "gleam_regexp", version = "1.1.1", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_regexp", source = "hex", outer_checksum = "9C215C6CA84A5B35BB934A9B61A9A306EC743153BE2B0425A0D032E477B062A9" }, 20 - { name = "gleam_stdlib", version = "0.67.1", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "6CE3E4189A8B8EC2F73AB61A2FBDE49F159D6C9C61C49E3B3082E439F260D3D0" }, 21 { name = "gleam_time", version = "1.6.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_time", source = "hex", outer_checksum = "0DF3834D20193F0A38D0EB21F0A78D48F2EC276C285969131B86DF8D4EF9E762" }, 22 { name = "gleam_yielder", version = "1.1.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_yielder", source = "hex", outer_checksum = "8E4E4ECFA7982859F430C57F549200C7749823C106759F4A19A78AEA6687717A" }, 23 { name = "gleeunit", version = "1.9.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleeunit", source = "hex", outer_checksum = "DA9553CE58B67924B3C631F96FE3370C49EB6D6DC6B384EC4862CC4AAA718F3C" }, 24 { name = "glexer", version = "2.3.0", build_tools = ["gleam"], requirements = ["gleam_stdlib", "splitter"], otp_app = "glexer", source = "hex", outer_checksum = "40A1FB0919FA080AD6C5809B4C7DBA545841CAAC8168FACDFA0B0667C22475CC" }, 25 - { name = "glisten", version = "8.0.1", build_tools = ["gleam"], requirements = ["gleam_erlang", "gleam_otp", "gleam_stdlib", "logging", "telemetry"], otp_app = "glisten", source = "hex", outer_checksum = "534BB27C71FB9E506345A767C0D76B17A9E9199934340C975DC003C710E3692D" }, 26 { name = "gramps", version = "6.0.0", build_tools = ["gleam"], requirements = ["gleam_crypto", "gleam_erlang", "gleam_http", "gleam_stdlib"], otp_app = "gramps", source = "hex", outer_checksum = "8B7195978FBFD30B43DF791A8A272041B81E45D245314D7A41FC57237AA882A0" }, 27 { name = "houdini", version = "1.2.0", build_tools = ["gleam"], requirements = [], otp_app = "houdini", source = "hex", outer_checksum = "5DB1053F1AF828049C2B206D4403C18970ABEF5C18671CA3C2D2ED0DD64F6385" }, 28 { name = "hpack_erl", version = "0.3.0", build_tools = ["rebar3"], requirements = [], otp_app = "hpack", source = "hex", outer_checksum = "D6137D7079169D8C485C6962DFE261AF5B9EF60FBC557344511C1E65E3D95FB0" }, 29 - { name = "jot", version = "8.0.0", build_tools = ["gleam"], requirements = ["gleam_stdlib", "houdini", "splitter"], otp_app = "jot", source = "hex", outer_checksum = "CCE11C8904B129CC9DA3A293B645884B91C96D252183F6DBCAEFA8F2587CAEFD" }, 30 { name = "logging", version = "1.3.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "logging", source = "hex", outer_checksum = "1098FBF10B54B44C2C7FDF0B01C1253CAFACDACABEFB4B0D027803246753E06D" }, 31 - { name = "lustre", version = "5.4.0", build_tools = ["gleam"], requirements = ["gleam_erlang", "gleam_json", "gleam_otp", "gleam_stdlib", "houdini"], otp_app = "lustre", source = "hex", outer_checksum = "40E097BABCE65FB7C460C073078611F7F5802EB07E1A9BFB5C229F71B60F8E50" }, 32 { name = "marceau", version = "1.3.0", build_tools = ["gleam"], requirements = [], otp_app = "marceau", source = "hex", outer_checksum = "2D1C27504BEF45005F5DFB18591F8610FB4BFA91744878210BDC464412EC44E9" }, 33 - { name = "mist", version = "5.0.3", build_tools = ["gleam"], requirements = ["exception", "gleam_erlang", "gleam_http", "gleam_otp", "gleam_stdlib", "gleam_yielder", "glisten", "gramps", "hpack_erl", "logging"], otp_app = "mist", source = "hex", outer_checksum = "7C4BE717A81305323C47C8A591E6B9BA4AC7F56354BF70B4D3DF08CC01192668" }, 34 { name = "platform", version = "1.0.0", build_tools = ["gleam"], requirements = [], otp_app = "platform", source = "hex", outer_checksum = "8339420A95AD89AAC0F82F4C3DB8DD401041742D6C3F46132A8739F6AEB75391" }, 35 { name = "simplifile", version = "2.3.2", build_tools = ["gleam"], requirements = ["filepath", "gleam_stdlib"], otp_app = "simplifile", source = "hex", outer_checksum = "E049B4DACD4D206D87843BCF4C775A50AE0F50A52031A2FFB40C9ED07D6EC70A" }, 36 { name = "splitter", version = "1.2.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "splitter", source = "hex", outer_checksum = "3DFD6B6C49E61EDAF6F7B27A42054A17CFF6CA2135FF553D0CB61C234D281DD0" }, 37 { name = "telemetry", version = "1.3.0", build_tools = ["rebar3"], requirements = [], otp_app = "telemetry", source = "hex", outer_checksum = "7015FC8919DBE63764F4B4B87A95B7C0996BD539E0D499BE6EC9D7F3875B79E6" }, 38 - { name = "tom", version = "2.0.0", build_tools = ["gleam"], requirements = ["gleam_stdlib", "gleam_time"], otp_app = "tom", source = "hex", outer_checksum = "74D0C5A3761F7A7D06994755D4D5AD854122EF8E9F9F76A3E7547606D8C77091" }, 39 - { name = "wisp", version = "2.1.1", build_tools = ["gleam"], requirements = ["directories", "exception", "filepath", "gleam_crypto", "gleam_erlang", "gleam_http", "gleam_json", "gleam_stdlib", "houdini", "logging", "marceau", "mist", "simplifile"], otp_app = "wisp", source = "hex", outer_checksum = "46E2E31DECD61A3748CF6CB317D9AC432BBC8D8A6E65655A9E787BDC69389DE0" }, 40 ] 41 42 [requirements] ··· 49 gleam_stdlib = { version = ">= 0.44.0 and < 2.0.0" } 50 gleam_time = { version = ">= 1.6.0 and < 2.0.0" } 51 gleeunit = { version = ">= 1.0.0 and < 2.0.0" } 52 - jot = { version = ">= 8.0.0 and < 9.0.0" } 53 lustre = { version = ">= 5.4.0 and < 6.0.0" } 54 mist = { version = ">= 5.0.3 and < 6.0.0" } 55 simplifile = { version = ">= 2.3.1 and < 3.0.0" }
··· 17 { name = "gleam_json", version = "3.1.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_json", source = "hex", outer_checksum = "44FDAA8847BE8FC48CA7A1C089706BD54BADCC4C45B237A992EDDF9F2CDB2836" }, 18 { name = "gleam_otp", version = "1.2.0", build_tools = ["gleam"], requirements = ["gleam_erlang", "gleam_stdlib"], otp_app = "gleam_otp", source = "hex", outer_checksum = "BA6A294E295E428EC1562DC1C11EA7530DCB981E8359134BEABC8493B7B2258E" }, 19 { name = "gleam_regexp", version = "1.1.1", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_regexp", source = "hex", outer_checksum = "9C215C6CA84A5B35BB934A9B61A9A306EC743153BE2B0425A0D032E477B062A9" }, 20 + { name = "gleam_stdlib", version = "0.68.1", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "F7FAEBD8EF260664E86A46C8DBA23508D1D11BB3BCC6EE1B89B3BC3E5C83FF1E" }, 21 { name = "gleam_time", version = "1.6.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_time", source = "hex", outer_checksum = "0DF3834D20193F0A38D0EB21F0A78D48F2EC276C285969131B86DF8D4EF9E762" }, 22 { name = "gleam_yielder", version = "1.1.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_yielder", source = "hex", outer_checksum = "8E4E4ECFA7982859F430C57F549200C7749823C106759F4A19A78AEA6687717A" }, 23 { name = "gleeunit", version = "1.9.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleeunit", source = "hex", outer_checksum = "DA9553CE58B67924B3C631F96FE3370C49EB6D6DC6B384EC4862CC4AAA718F3C" }, 24 { name = "glexer", version = "2.3.0", build_tools = ["gleam"], requirements = ["gleam_stdlib", "splitter"], otp_app = "glexer", source = "hex", outer_checksum = "40A1FB0919FA080AD6C5809B4C7DBA545841CAAC8168FACDFA0B0667C22475CC" }, 25 + { name = "glisten", version = "8.0.3", build_tools = ["gleam"], requirements = ["gleam_erlang", "gleam_otp", "gleam_stdlib", "logging", "telemetry"], otp_app = "glisten", source = "hex", outer_checksum = "86B838196592D9EBDE7A1D2369AE3A51E568F7DD2D168706C463C42D17B95312" }, 26 { name = "gramps", version = "6.0.0", build_tools = ["gleam"], requirements = ["gleam_crypto", "gleam_erlang", "gleam_http", "gleam_stdlib"], otp_app = "gramps", source = "hex", outer_checksum = "8B7195978FBFD30B43DF791A8A272041B81E45D245314D7A41FC57237AA882A0" }, 27 { name = "houdini", version = "1.2.0", build_tools = ["gleam"], requirements = [], otp_app = "houdini", source = "hex", outer_checksum = "5DB1053F1AF828049C2B206D4403C18970ABEF5C18671CA3C2D2ED0DD64F6385" }, 28 { name = "hpack_erl", version = "0.3.0", build_tools = ["rebar3"], requirements = [], otp_app = "hpack", source = "hex", outer_checksum = "D6137D7079169D8C485C6962DFE261AF5B9EF60FBC557344511C1E65E3D95FB0" }, 29 + { name = "jot", version = "9.0.0", build_tools = ["gleam"], requirements = ["gleam_stdlib", "houdini", "splitter"], otp_app = "jot", source = "hex", outer_checksum = "CB2150EBD742649A925C300AD9969F70CF755ECA98C6AEB92D4058611BCEF594" }, 30 { name = "logging", version = "1.3.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "logging", source = "hex", outer_checksum = "1098FBF10B54B44C2C7FDF0B01C1253CAFACDACABEFB4B0D027803246753E06D" }, 31 + { name = "lustre", version = "5.5.2", build_tools = ["gleam"], requirements = ["gleam_erlang", "gleam_json", "gleam_otp", "gleam_stdlib", "houdini"], otp_app = "lustre", source = "hex", outer_checksum = "2DC2973D81C12E63251B636773217B8E09C5C84590A729750F6BCF009420B38E" }, 32 { name = "marceau", version = "1.3.0", build_tools = ["gleam"], requirements = [], otp_app = "marceau", source = "hex", outer_checksum = "2D1C27504BEF45005F5DFB18591F8610FB4BFA91744878210BDC464412EC44E9" }, 33 + { name = "mist", version = "5.0.4", build_tools = ["gleam"], requirements = ["exception", "gleam_erlang", "gleam_http", "gleam_otp", "gleam_stdlib", "gleam_yielder", "glisten", "gramps", "hpack_erl", "logging"], otp_app = "mist", source = "hex", outer_checksum = "7CED4B2D81FD547ADB093D97B9928B9419A7F58B8562A30A6CC17A252B31AD05" }, 34 { name = "platform", version = "1.0.0", build_tools = ["gleam"], requirements = [], otp_app = "platform", source = "hex", outer_checksum = "8339420A95AD89AAC0F82F4C3DB8DD401041742D6C3F46132A8739F6AEB75391" }, 35 { name = "simplifile", version = "2.3.2", build_tools = ["gleam"], requirements = ["filepath", "gleam_stdlib"], otp_app = "simplifile", source = "hex", outer_checksum = "E049B4DACD4D206D87843BCF4C775A50AE0F50A52031A2FFB40C9ED07D6EC70A" }, 36 { name = "splitter", version = "1.2.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "splitter", source = "hex", outer_checksum = "3DFD6B6C49E61EDAF6F7B27A42054A17CFF6CA2135FF553D0CB61C234D281DD0" }, 37 { name = "telemetry", version = "1.3.0", build_tools = ["rebar3"], requirements = [], otp_app = "telemetry", source = "hex", outer_checksum = "7015FC8919DBE63764F4B4B87A95B7C0996BD539E0D499BE6EC9D7F3875B79E6" }, 38 + { name = "tom", version = "2.0.1", build_tools = ["gleam"], requirements = ["gleam_stdlib", "gleam_time"], otp_app = "tom", source = "hex", outer_checksum = "90791DA4AACE637E30081FE77049B8DB850FBC8CACC31515376BCC4E59BE1DD2" }, 39 + { name = "wisp", version = "2.2.0", build_tools = ["gleam"], requirements = ["directories", "exception", "filepath", "gleam_crypto", "gleam_erlang", "gleam_http", "gleam_json", "gleam_stdlib", "houdini", "logging", "marceau", "mist", "simplifile"], otp_app = "wisp", source = "hex", outer_checksum = "655163D4DE19E3DD4AC75813A991BFD5523CB4FF2FC5F9F58FD6FB39D5D1806D" }, 40 ] 41 42 [requirements] ··· 49 gleam_stdlib = { version = ">= 0.44.0 and < 2.0.0" } 50 gleam_time = { version = ">= 1.6.0 and < 2.0.0" } 51 gleeunit = { version = ">= 1.0.0 and < 2.0.0" } 52 + jot = { version = ">= 9.0.0 and < 10.0.0" } 53 lustre = { version = ">= 5.4.0 and < 6.0.0" } 54 mist = { version = ">= 5.0.3 and < 6.0.0" } 55 simplifile = { version = ">= 2.3.1 and < 3.0.0" }
+7 -7
priv/posts/building-my-college-project-with-gleam.md
··· 5 tags = ["gleam", "college"] 6 --- 7 8 - ## *[]{.nf .nf-md-file_code}* Picking a language 9 10 Every semester my college assigns us a major project. This usually meant coming up 11 with a startup concept or designing a website in Figma, but we never got to ··· 20 all that work while carefully checking for every `exception` or `null` value. 21 *I wanted to try something different* 22 23 - ## *[]{.nf .nf-fa-star}* Enter Gleam 24 25 ```gleam 26 pub fn main() -> Nil { ··· 32 ecosystem, I wanted to give this new language a try. It's syntax is simple, 33 the community is friendly and the language is incredibly small. 34 35 - ### *[]{.nf .nf-oct-goal}* Errors as values 36 37 One of the main reasons why I went with Gleam was their approach to *error handling*. 38 Errors in Gleam are treated as _values_ you can return from any function. ··· 57 } 58 ``` 59 60 - ### *[]{.nf .nf-fa-code_branch}* Pattern matching 61 62 Being able to build custom error types pairs really well with 63 Gleam's *pattern matching*. You can define it at the top level scope and easily `switch` ··· 74 {.tip} 75 > The compiler even _warns_ you when you're missing one or more branches! 76 77 - ## *[]{.nf .nf-oct-server}* Handling HTTP Requests 78 79 For the http server, I used [mist](https://hexdocs.pm/mist) paired 80 with [wisp](https://hexdocs.pm/wisp) for the web framework. Setting up the ··· 123 } 124 ``` 125 126 - ## *[]{.nf .nf-fa-database}* Working with SQL 127 128 I'm really not a fan of using regular strings to store SQL queries, 129 there's no *autocomplete*, no *syntax highlighting*, no *linting* from my editor. ··· 190 } 191 ``` 192 193 - ## *[]{.nf .nf-md-file_check}* Conclusion 194 195 This was my first time building a backend project, and if it didn't work as expected, 196 the whole group would be affected. Thankfully we ran into zero runtime errors so far,
··· 5 tags = ["gleam", "college"] 6 --- 7 8 + ## [ ]{.nf aria-hidden=true} Picking a language 9 10 Every semester my college assigns us a major project. This usually meant coming up 11 with a startup concept or designing a website in Figma, but we never got to ··· 20 all that work while carefully checking for every `exception` or `null` value. 21 *I wanted to try something different* 22 23 + ## [ ]{.nf aria-hidden=true} Enter Gleam 24 25 ```gleam 26 pub fn main() -> Nil { ··· 32 ecosystem, I wanted to give this new language a try. It's syntax is simple, 33 the community is friendly and the language is incredibly small. 34 35 + ### [ ]{.nf aria-hidden=true} Errors as values 36 37 One of the main reasons why I went with Gleam was their approach to *error handling*. 38 Errors in Gleam are treated as _values_ you can return from any function. ··· 57 } 58 ``` 59 60 + ### [ ]{.nf aria-hidden=true} Pattern matching 61 62 Being able to build custom error types pairs really well with 63 Gleam's *pattern matching*. You can define it at the top level scope and easily `switch` ··· 74 {.tip} 75 > The compiler even _warns_ you when you're missing one or more branches! 76 77 + ## [ ]{.nf aria-hidden=true} Handling HTTP Requests 78 79 For the http server, I used [mist](https://hexdocs.pm/mist) paired 80 with [wisp](https://hexdocs.pm/wisp) for the web framework. Setting up the ··· 123 } 124 ``` 125 126 + ## [ ]{.nf aria-hidden=true} Working with SQL 127 128 I'm really not a fan of using regular strings to store SQL queries, 129 there's no *autocomplete*, no *syntax highlighting*, no *linting* from my editor. ··· 190 } 191 ``` 192 193 + ## [󰈖 ]{.nf aria-hidden=true} Conclusion 194 195 This was my first time building a backend project, and if it didn't work as expected, 196 the whole group would be affected. Thankfully we ran into zero runtime errors so far,
+17 -17
priv/posts/uses.md
··· 5 tags = [] 6 --- 7 8 - ## *[]{.nf .nf-fa-laptop}* FastFetch 9 10 - - *[]{.nf .nf-md-arch}* *OS*: Arch Linux x86_64 11 - - *[]{.nf .nf-linux-kde_plasma}* *DE*: KDE Plasma 12 - - *[]{.nf .nf-fa-ghost}* *Terminal*: Ghostty 13 - - *[]{.nf .nf-md-cat}* *Theme*: Catppuccin Mocha 14 - - *[]{.nf .nf-md-format_font}* *Terminal Font*: Maple Mono NF 15 - - *[]{.nf .nf-fa-fish}* *Shell*: Fish 16 17 - ## *[]{.nf .nf-md-cube_outline}* Software 18 19 - - *[]{.nf .nf-custom-neovim}* [Lazyvim](https://www.lazyvim.org/): Modal terminal 20 code editor. 21 - - *[]{.nf .nf-md-wrench}* [Just](https://just.systems/): A command runner similar 22 to Taskfile. 23 - - *[]{.nf .nf-seti-notebook}* [Djot](https://djot.net/): Markup Language 24 similar to markdown. 25 - - *[]{.nf .nf-fa-fly}* [Fly.io](https://fly.io/): For deploying containers. 26 - - *[]{.nf .nf-md-duck}* [Yazi](https://yazi-rs.github.io/): Terminal file manager, 27 makes it easier to move around my project files. 28 - - *[]{.nf .nf-seti-shell}* [Direnv](https://direnv.net/): Load enviroment 29 variables when switching directories. 30 31 ### Programming Languages 32 33 - - *[]{.nf .nf-fa-star}* [Gleam](https://gleam.run/): It's still my favorite 34 programming language. 35 36 ### Version Control 37 38 - - *[]{.nf .nf-md-sheep}* [Tangled](https://tangled.org/): I recently moved away 39 from Github, tangled feels like breath of fresh air. 40 - - *[]{.nf .nf-fa-square_twitter}* [Jujutsu](https://www.jj-vcs.dev): Feels more 41 flexible and intuitive than Git, also tangled has support for it!
··· 5 tags = [] 6 --- 7 8 + ## [ ]{.nf aria-hidden=true} FastFetch 9 10 + - [ ]{.nf aria-hidden=true} OS: Arch Linux x86_64 11 + - [ ]{.nf aria-hidden=true} DE: KDE Plasma 12 + - [󰊠 ]{.nf aria-hidden=true} Terminal: Ghostty 13 + - [ ]{.nf aria-hidden=true} Theme: Catppuccin Mocha 14 + - [󰉿 ]{.nf aria-hidden=true} Terminal Font: Maple Mono NF 15 + - [ ]{.nf aria-hidden=true} Shell: Fish 16 17 + ## [ ]{.nf aria-hidden=true} Software 18 19 + - [ ]{.nf aria-hidden=true} [Lazyvim](https://www.lazyvim.org/): Modal terminal 20 code editor. 21 + - [ ]{.nf aria-hidden=true} [Just](https://just.systems/): A command runner similar 22 to Taskfile. 23 + - [ ]{.nf aria-hidden=true} [Djot](https://djot.net/): Markup Language 24 similar to markdown. 25 + - [ ]{.nf aria-hidden=true} [Fly.io](https://fly.io/): For deploying containers. 26 + - [󰇥 ]{.nf aria-hidden=true} [Yazi](https://yazi-rs.github.io/): Terminal file manager, 27 makes it easier to move around my project files. 28 + - [ ]{.nf aria-hidden=true} [Direnv](https://direnv.net/): Load enviroment 29 variables when switching directories. 30 31 ### Programming Languages 32 33 + - [ ]{.nf aria-hidden=true} [Gleam](https://gleam.run/): It's still my favorite 34 programming language. 35 36 ### Version Control 37 38 + - [󰳆 ]{.nf aria-hidden=true} [Tangled](https://tangled.org/): I recently moved away 39 from Github, tangled feels like breath of fresh air. 40 + - [ ]{.nf aria-hidden=true} [Jujutsu](https://www.jj-vcs.dev): Feels more 41 flexible and intuitive than Git, also tangled has support for it!