From 029b1ed3f79110f9cb718d3234b6a2a25b0cc04a Mon Sep 17 00:00:00 2001 From: Pagwin Date: Sat, 22 Jan 2022 10:24:44 -0500 Subject: [PATCH 01/10] changed some properties on the gh pages article so it's the correct date and not a draft anymore --- content/blog/gh_actions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/blog/gh_actions.md b/content/blog/gh_actions.md index 985bd9b..fac1326 100644 --- a/content/blog/gh_actions.md +++ b/content/blog/gh_actions.md @@ -4,9 +4,9 @@ title: "Setting up CD for this site" description: "How I setup Github actions to automatically update this site" -date: 2022-01-20 +date: 2022-01-22 -draft: true +draft: false --- From cb1a186e0025d8506d113a873bac23dcbe5f8f1c Mon Sep 17 00:00:00 2001 From: Pagwin Date: Mon, 24 Jan 2022 15:37:50 -0500 Subject: [PATCH 02/10] ??? --- content/blog/pogo_so_far.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 content/blog/pogo_so_far.md diff --git a/content/blog/pogo_so_far.md b/content/blog/pogo_so_far.md new file mode 100644 index 0000000..ef9997e --- /dev/null +++ b/content/blog/pogo_so_far.md @@ -0,0 +1,20 @@ +--- + +title: "Pogo so far" + +description: "A summary of the work I've done on pogo so far and where I intend to go with it" + +date: 2022-01-01 + +draft: true + +--- +t +So in [My last blog](https://pagwin.xyz/blog/gh_actions/), I briefly mentioned a project I'm working on called [Pogo](https://github.com/Pagwin-Fedora/Pogo) and then said absolutely nothing about what it actually is or what I was going to do with it. I did say I wanted to write a blog article on it though and this is that blog article. + +## What is Pogo? + +[Pogo](https://github.com/Pagwin-Fedora/Pogo) is a todo list I'm working on that I wanted to use as an excuse to learn how to use [Go](https://go.dev/) [Rust](https://www.rust-lang.org/)'s FFI, how to store and retrieve data with [SQL](https://en.wikipedia.org/wiki/SQL) queries/statements. how to make UI in [Dart](https://dart.dev/)/[Flutter](https://flutter.dev/) and how to write [Sphaghetti](https://www.goya.com/media/4173/creole-spaghetti.jpg?quality=80) in C++. I put it this all toegether with copious usage of FFI to connect the Rust, Go and [C++](https://en.wikipedia.org/wiki/C%2B%2B) for the backend and the dart/flutter for the frontend. + +## Problems +But recently I've decided that all of that is dumb and unnecessary. Mostly because my architecture slowly morphed into passing around strings and I realized that my setup is overly complicated for that From d1227ee714c1aaea7e70d19db8ced98f0b164d2b Mon Sep 17 00:00:00 2001 From: Pagwin Date: Wed, 26 Jan 2022 16:32:48 -0500 Subject: [PATCH 03/10] blog post is boring so rip --- content/blog/pogo_so_far.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/content/blog/pogo_so_far.md b/content/blog/pogo_so_far.md index ef9997e..9f47f59 100644 --- a/content/blog/pogo_so_far.md +++ b/content/blog/pogo_so_far.md @@ -9,7 +9,7 @@ date: 2022-01-01 draft: true --- -t + So in [My last blog](https://pagwin.xyz/blog/gh_actions/), I briefly mentioned a project I'm working on called [Pogo](https://github.com/Pagwin-Fedora/Pogo) and then said absolutely nothing about what it actually is or what I was going to do with it. I did say I wanted to write a blog article on it though and this is that blog article. ## What is Pogo? @@ -17,4 +17,13 @@ So in [My last blog](https://pagwin.xyz/blog/gh_actions/), I briefly mentioned a [Pogo](https://github.com/Pagwin-Fedora/Pogo) is a todo list I'm working on that I wanted to use as an excuse to learn how to use [Go](https://go.dev/) [Rust](https://www.rust-lang.org/)'s FFI, how to store and retrieve data with [SQL](https://en.wikipedia.org/wiki/SQL) queries/statements. how to make UI in [Dart](https://dart.dev/)/[Flutter](https://flutter.dev/) and how to write [Sphaghetti](https://www.goya.com/media/4173/creole-spaghetti.jpg?quality=80) in C++. I put it this all toegether with copious usage of FFI to connect the Rust, Go and [C++](https://en.wikipedia.org/wiki/C%2B%2B) for the backend and the dart/flutter for the frontend. ## Problems -But recently I've decided that all of that is dumb and unnecessary. Mostly because my architecture slowly morphed into passing around strings and I realized that my setup is overly complicated for that + +But recently I've decided that all of that is dumb and unnecessary. Mostly because my architecture slowly morphed into passing around strings and I realized that my setup is overly complicated for that. So instead of FFI and TCP spaghetti instead I'm going to have each component of the application of the frontend, middleware and backend all be separate executables of some kind or another. + +## The New Architecture + +This description is going to suck so I recommend clicking off if you get bored. For my new architecture there will be 4 components, The init script, the frontend, the middleware and the backend. The original repo that held all the code will have it all removed as the frontend, middleware and backend are developed in separate repos which are had as git submodules in the main repo which will be where an init script and a build script will be held. The init script is a script that will be running as long as the application itself holding the frontend, middleware and backend as child processes. The frontend will accept user input and print it to stdout in a manner understood by the middleware and passing state changes given to it as Pogo messages by stdin to the user. The middleware will take messages from the frontend and parse them for the backend to understand and vice versa. In order to check functionality of the middleware to ensure it is passed messages from the end(s) it wants the init process will do a brief feature check of the middleware by running it with the --features cli option. The backend takes messages from stdin and does transforms to the db and accepts queries of it's current state printing out the state to stdout. + +## Conclusion + +I expected this blog to be longer but I realized as I started to write it that writing about what I had previously done with Pogo was boring because it was nothing interesting. As is the post was a bit painful to write and I suspect it's also painful to read. Note to self write about a project as interesting stuff comes up not to explain yourself. From a4660120099d1ab508beb6eaefda1a4e876786ac Mon Sep 17 00:00:00 2001 From: Pagwin Date: Wed, 26 Jan 2022 20:02:09 -0500 Subject: [PATCH 04/10] made the blog article slightly less painful --- content/blog/pogo_so_far.md | 39 +++++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/content/blog/pogo_so_far.md b/content/blog/pogo_so_far.md index 9f47f59..ed5f5c9 100644 --- a/content/blog/pogo_so_far.md +++ b/content/blog/pogo_so_far.md @@ -14,16 +14,47 @@ So in [My last blog](https://pagwin.xyz/blog/gh_actions/), I briefly mentioned a ## What is Pogo? -[Pogo](https://github.com/Pagwin-Fedora/Pogo) is a todo list I'm working on that I wanted to use as an excuse to learn how to use [Go](https://go.dev/) [Rust](https://www.rust-lang.org/)'s FFI, how to store and retrieve data with [SQL](https://en.wikipedia.org/wiki/SQL) queries/statements. how to make UI in [Dart](https://dart.dev/)/[Flutter](https://flutter.dev/) and how to write [Sphaghetti](https://www.goya.com/media/4173/creole-spaghetti.jpg?quality=80) in C++. I put it this all toegether with copious usage of FFI to connect the Rust, Go and [C++](https://en.wikipedia.org/wiki/C%2B%2B) for the backend and the dart/flutter for the frontend. +[Pogo](https://github.com/Pagwin-Fedora/Pogo) is a todo list I'm working on that I wanted to use as an excuse to learn how to use + +1. [Go](https://go.dev/) +2. [Rust](https://www.rust-lang.org/)'s FFI +3. how to store and retrieve data with [SQL](https://en.wikipedia.org/wiki/SQL) queries/statements +3. how to make UI in [Dart](https://dart.dev/)/[Flutter](https://flutter.dev/) +4. and how to write [Sphaghetti](https://www.goya.com/media/4173/creole-spaghetti.jpg?quality=80) in C++ + +I put it this all toegether with copious usage of FFI to connect the Rust, Go and [C++](https://en.wikipedia.org/wiki/C%2B%2B) for the backend and the dart/flutter for the frontend. ## Problems -But recently I've decided that all of that is dumb and unnecessary. Mostly because my architecture slowly morphed into passing around strings and I realized that my setup is overly complicated for that. So instead of FFI and TCP spaghetti instead I'm going to have each component of the application of the frontend, middleware and backend all be separate executables of some kind or another. +But recently I've decided that all of that is dumb and unnecessary. Initially it made sense to use the somewhat unwieldy FFI setup because the backend was going to take a struct instead of a string and structs cannot be passed via stdin. Once I realized how hard and unnecessary that was due to FFI things I dropped it. With that my architecture was just passing around strings and I realized that my setup is overly complicated for that. So instead of FFI and TCP spaghetti instead I'm going to have ~~subprocess spaghetti~~ each component of the application be separate executables of some kind or another. ## The New Architecture -This description is going to suck so I recommend clicking off if you get bored. For my new architecture there will be 4 components, The init script, the frontend, the middleware and the backend. The original repo that held all the code will have it all removed as the frontend, middleware and backend are developed in separate repos which are had as git submodules in the main repo which will be where an init script and a build script will be held. The init script is a script that will be running as long as the application itself holding the frontend, middleware and backend as child processes. The frontend will accept user input and print it to stdout in a manner understood by the middleware and passing state changes given to it as Pogo messages by stdin to the user. The middleware will take messages from the frontend and parse them for the backend to understand and vice versa. In order to check functionality of the middleware to ensure it is passed messages from the end(s) it wants the init process will do a brief feature check of the middleware by running it with the --features cli option. The backend takes messages from stdin and does transforms to the db and accepts queries of it's current state printing out the state to stdout. +This description is going to suck so I recommend clicking off if you get bored. For my new architecture there will be 4 components + +1. The init script +2. The frontend +3. the middleware +4. and The backend. + +The original repository that held all the code will have it all removed as the frontend, middleware and backend are developed in separate repositories which are had as git submodules in the main repository which will be where an init script and a build script will be held. + +### The init script + +The init script is a script that will be running as long as the application itself holding the frontend, middleware and backend as child processes. + +### The frontend + +The frontend will accept user input and print it to stdout in a manner understood by the middleware and passing state changes given to it as Pogo messages by stdin to the user. + +### The middleware + +The middleware will take messages from the frontend and parse them for the backend to understand and vice versa. In order to check functionality of the middleware to ensure it is passed messages from the end(s) it wants the init process will do a brief feature check of the middleware by running it with the --features cli option. + +### The backend + +The backend takes messages from stdin and does transforms to the db and accepts queries of it's current state printing out the state to stdout. ## Conclusion -I expected this blog to be longer but I realized as I started to write it that writing about what I had previously done with Pogo was boring because it was nothing interesting. As is the post was a bit painful to write and I suspect it's also painful to read. Note to self write about a project as interesting stuff comes up not to explain yourself. +I expected this blog to be longer but I realized as I started to write it that writing about what I had previously done with Pogo was boring because it was nothing interesting. Well there is some interesting stuff in how I previously was working on Pogo but most of that is too tangential for a post on the project itself such as how bad C/C++ networking is, how good networking is with rust after I stopped being an idiot, doing battle with Go's sql library and stuff related to FFI. I may make a blog post or two on these topics in the future but I still need to learn more about them to do them justice. Overall the post was a bit painful to write and I suspect it's also painful to read. Note to self write about a project as interesting stuff comes up not to explain yourself. From a55309e9f0bca3a7134b41570ff589eddb219f57 Mon Sep 17 00:00:00 2001 From: Pagwin Date: Wed, 26 Jan 2022 20:12:45 -0500 Subject: [PATCH 05/10] used not instead of p in css --- static/css/single.css | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/static/css/single.css b/static/css/single.css index fd464b4..df836ff 100644 --- a/static/css/single.css +++ b/static/css/single.css @@ -1,13 +1,13 @@ h1{ font-weight: bold; } -p a{ +:not(h2) a{ color:#00a; } -p a:hover{ +:not(h2) a:hover{ color:#00a; background:#bbb; } -p a:visited{ +:not(h2) a:visited{ color:#500; } From a1f30e5a77361e8607f69be62073eb8ae01b2cd4 Mon Sep 17 00:00:00 2001 From: Pagwin Date: Wed, 26 Jan 2022 20:29:19 -0500 Subject: [PATCH 06/10] I have no idea what I want/need at this point --- static/css/single.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/static/css/single.css b/static/css/single.css index df836ff..e805a0f 100644 --- a/static/css/single.css +++ b/static/css/single.css @@ -11,3 +11,6 @@ h1{ :not(h2) a:visited{ color:#500; } +a { + display: inline-block; +} From 219d89582fe777c69e22d7a11cc7d39a9e3575b2 Mon Sep 17 00:00:00 2001 From: Pagwin Date: Mon, 31 Jan 2022 12:07:55 -0500 Subject: [PATCH 07/10] updated css to a working version --- static/css/single.css | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/static/css/single.css b/static/css/single.css index e805a0f..f14357d 100644 --- a/static/css/single.css +++ b/static/css/single.css @@ -1,16 +1,13 @@ h1{ font-weight: bold; } -:not(h2) a{ +p a, li a{ color:#00a; } -:not(h2) a:hover{ +p a:hover, li a:hover{ color:#00a; background:#bbb; } -:not(h2) a:visited{ +p a:visited, li a:visited{ color:#500; } -a { - display: inline-block; -} From 89e066c92991ca49cab8c95f8d8de3250f98244f Mon Sep 17 00:00:00 2001 From: Pagwin Date: Mon, 31 Jan 2022 12:12:25 -0500 Subject: [PATCH 08/10] minor formatting thing --- content/blog/pogo_so_far.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/blog/pogo_so_far.md b/content/blog/pogo_so_far.md index ed5f5c9..3b330de 100644 --- a/content/blog/pogo_so_far.md +++ b/content/blog/pogo_so_far.md @@ -49,7 +49,7 @@ The frontend will accept user input and print it to stdout in a manner understoo ### The middleware -The middleware will take messages from the frontend and parse them for the backend to understand and vice versa. In order to check functionality of the middleware to ensure it is passed messages from the end(s) it wants the init process will do a brief feature check of the middleware by running it with the --features cli option. +The middleware will take messages from the frontend and parse them for the backend to understand and vice versa. In order to check functionality of the middleware to ensure it is passed messages from the end(s) it wants the init process will do a brief feature check of the middleware by running it with the `--features` cli option. ### The backend From 8759383b3f01ed4fc5a3f7c8a13a2133190e5544 Mon Sep 17 00:00:00 2001 From: Pagwin Date: Mon, 31 Jan 2022 12:14:07 -0500 Subject: [PATCH 09/10] minor grammar fix --- content/blog/pogo_so_far.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/blog/pogo_so_far.md b/content/blog/pogo_so_far.md index 3b330de..f6b9b45 100644 --- a/content/blog/pogo_so_far.md +++ b/content/blog/pogo_so_far.md @@ -14,7 +14,7 @@ So in [My last blog](https://pagwin.xyz/blog/gh_actions/), I briefly mentioned a ## What is Pogo? -[Pogo](https://github.com/Pagwin-Fedora/Pogo) is a todo list I'm working on that I wanted to use as an excuse to learn how to use +[Pogo](https://github.com/Pagwin-Fedora/Pogo) is a todo list I'm working on that I wanted to use as an excuse to learn 1. [Go](https://go.dev/) 2. [Rust](https://www.rust-lang.org/)'s FFI From d89025bef1dbb5c0d4af022987d13c372ffd3777 Mon Sep 17 00:00:00 2001 From: Pagwin Date: Mon, 31 Jan 2022 12:21:43 -0500 Subject: [PATCH 10/10] final changes to the new blog article --- content/blog/pogo_so_far.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/content/blog/pogo_so_far.md b/content/blog/pogo_so_far.md index f6b9b45..2b6fe39 100644 --- a/content/blog/pogo_so_far.md +++ b/content/blog/pogo_so_far.md @@ -26,16 +26,17 @@ I put it this all toegether with copious usage of FFI to connect the Rust, Go an ## Problems -But recently I've decided that all of that is dumb and unnecessary. Initially it made sense to use the somewhat unwieldy FFI setup because the backend was going to take a struct instead of a string and structs cannot be passed via stdin. Once I realized how hard and unnecessary that was due to FFI things I dropped it. With that my architecture was just passing around strings and I realized that my setup is overly complicated for that. So instead of FFI and TCP spaghetti instead I'm going to have ~~subprocess spaghetti~~ each component of the application be separate executables of some kind or another. +But recently I've decided that all of that is dumb and unnecessary. Initially it made sense to use the somewhat unwieldy FFI setup because the backend was going to take a struct instead of a string and structs cannot be passed via stdin[citation needed]. Once I realized how hard and unnecessary that was due to FFI things I dropped it. With that my architecture was just passing around strings and I realized that my setup is overly complicated for that. So instead of FFI and TCP spaghetti instead I'm going to have ~~subprocess spaghetti~~ each component of the application be separate executables of some kind or another. ## The New Architecture -This description is going to suck so I recommend clicking off if you get bored. For my new architecture there will be 4 components +This description is going to suck so I recommend clicking off if you get bored. For my new architecture there will be 5 components 1. The init script 2. The frontend -3. the middleware -4. and The backend. +3. the front-to-back middleware +4. the back-to-front middleware +5. and The backend. The original repository that held all the code will have it all removed as the frontend, middleware and backend are developed in separate repositories which are had as git submodules in the main repository which will be where an init script and a build script will be held. @@ -49,7 +50,7 @@ The frontend will accept user input and print it to stdout in a manner understoo ### The middleware -The middleware will take messages from the frontend and parse them for the backend to understand and vice versa. In order to check functionality of the middleware to ensure it is passed messages from the end(s) it wants the init process will do a brief feature check of the middleware by running it with the `--features` cli option. +The front to back middleware will take messages from the frontend and parse them for the backend to understand and vice versa for back to front. ### The backend