From 2901cf43bf45ff322fb62286c3bf1594b55c20ee Mon Sep 17 00:00:00 2001 From: 53hornet Date: Tue, 7 Sep 2021 14:23:27 -0400 Subject: chore: rename html to php, add donate/payments page, update cv --- .../2020-11-24-i-like-hyper-more-than-actix.html | 23 ---- drafts/2020-11-24-i-like-hyper-more-than-actix.php | 23 ++++ drafts/2021-07-28-devops-is-a-weird-word.php | 1 + drafts/2021-reading-list.html | 9 -- drafts/2021-reading-list.php | 9 ++ drafts/365 days of working from home.html | 0 drafts/365 days of working from home.php | 0 drafts/altrustic-angelshark.html | 119 ---------------- drafts/altrustic-angelshark.php | 119 ++++++++++++++++ drafts/avoiding null in csharp.html | 0 drafts/avoiding null in csharp.php | 0 drafts/biz class internet is worth it.html | 0 drafts/biz class internet is worth it.php | 0 drafts/california is doing weird stuff.php | 4 + drafts/clementine.html | 0 drafts/clementine.php | 0 drafts/dell-dock.html | 102 -------------- drafts/dell-dock.php | 102 ++++++++++++++ drafts/dotnet 5.0: use it.html | 71 ---------- drafts/dotnet 5.0: use it.php | 71 ++++++++++ drafts/form-fields.html | 15 --- drafts/form-fields.php | 15 +++ ...onless software invites creative solutions.html | 1 - ...ionless software invites creative solutions.php | 1 + drafts/het-club.html | 6 - drafts/het-club.php | 6 + drafts/home server evolution | 6 + drafts/html-for-docs-2020.html | 72 ---------- drafts/html-for-docs-2020.php | 72 ++++++++++ drafts/it's not rust vs go.html | 150 --------------------- drafts/its-not-rust-vs-go.php | 150 +++++++++++++++++++++ drafts/latitude and longevity.html | 0 drafts/latitude and longevity.php | 0 drafts/living with freebsd.html | 0 drafts/living with freebsd.php | 0 drafts/living with linux.html | 0 drafts/living with linux.php | 0 .../mpv is literally a flawless video player.html | 1 - .../mpv is literally a flawless video player.php | 1 + drafts/my first car is a 1953 hudson hornet.html | 0 drafts/my first car is a 1953 hudson hornet.php | 0 ...h*t (the case for better brakes and tires).html | 0 ...sh*t (the case for better brakes and tires).php | 0 drafts/programs i use all the time.html | 41 ------ drafts/programs i use all the time.php | 41 ++++++ ...quarantine to vaccine: Corona Blues Review.html | 0 .../quarantine to vaccine: Corona Blues Review.php | 0 drafts/rip-full-time-linux.html | 0 drafts/rip-full-time-linux.php | 0 .../scrum, agile, kanban, springs, delivery.html | 5 - drafts/scrum, agile, kanban, springs, delivery.php | 5 + drafts/server closets in the summer.html | 0 drafts/server closets in the summer.php | 0 drafts/stack-end-devs.html | 13 -- drafts/stack-end-devs.php | 13 ++ drafts/surprisingly simple.html | 2 - drafts/surprisingly simple.php | 2 + drafts/used-refurb-2020.html | 7 - drafts/used-refurb-2020.php | 7 + drafts/value.php | 5 + drafts/what is a script no really.html | 1 - drafts/what is a script no really.php | 1 + drafts/what is programming.html | 5 - drafts/what is programming.php | 5 + drafts/your company isnt doing SRE.html | 4 - drafts/your company isnt doing SRE.php | 4 + 66 files changed, 663 insertions(+), 647 deletions(-) delete mode 100644 drafts/2020-11-24-i-like-hyper-more-than-actix.html create mode 100644 drafts/2020-11-24-i-like-hyper-more-than-actix.php create mode 100644 drafts/2021-07-28-devops-is-a-weird-word.php delete mode 100644 drafts/2021-reading-list.html create mode 100644 drafts/2021-reading-list.php delete mode 100644 drafts/365 days of working from home.html create mode 100644 drafts/365 days of working from home.php delete mode 100644 drafts/altrustic-angelshark.html create mode 100644 drafts/altrustic-angelshark.php delete mode 100644 drafts/avoiding null in csharp.html create mode 100644 drafts/avoiding null in csharp.php delete mode 100644 drafts/biz class internet is worth it.html create mode 100644 drafts/biz class internet is worth it.php create mode 100644 drafts/california is doing weird stuff.php delete mode 100644 drafts/clementine.html create mode 100644 drafts/clementine.php delete mode 100644 drafts/dell-dock.html create mode 100644 drafts/dell-dock.php delete mode 100644 drafts/dotnet 5.0: use it.html create mode 100644 drafts/dotnet 5.0: use it.php delete mode 100644 drafts/form-fields.html create mode 100644 drafts/form-fields.php delete mode 100644 drafts/frictionless software invites creative solutions.html create mode 100644 drafts/frictionless software invites creative solutions.php delete mode 100644 drafts/het-club.html create mode 100644 drafts/het-club.php delete mode 100644 drafts/html-for-docs-2020.html create mode 100644 drafts/html-for-docs-2020.php delete mode 100644 drafts/it's not rust vs go.html create mode 100644 drafts/its-not-rust-vs-go.php delete mode 100644 drafts/latitude and longevity.html create mode 100644 drafts/latitude and longevity.php delete mode 100644 drafts/living with freebsd.html create mode 100644 drafts/living with freebsd.php delete mode 100644 drafts/living with linux.html create mode 100644 drafts/living with linux.php delete mode 100644 drafts/mpv is literally a flawless video player.html create mode 100644 drafts/mpv is literally a flawless video player.php delete mode 100644 drafts/my first car is a 1953 hudson hornet.html create mode 100644 drafts/my first car is a 1953 hudson hornet.php delete mode 100644 drafts/oh sh*t (the case for better brakes and tires).html create mode 100644 drafts/oh sh*t (the case for better brakes and tires).php delete mode 100644 drafts/programs i use all the time.html create mode 100644 drafts/programs i use all the time.php delete mode 100644 drafts/quarantine to vaccine: Corona Blues Review.html create mode 100644 drafts/quarantine to vaccine: Corona Blues Review.php delete mode 100644 drafts/rip-full-time-linux.html create mode 100644 drafts/rip-full-time-linux.php delete mode 100644 drafts/scrum, agile, kanban, springs, delivery.html create mode 100644 drafts/scrum, agile, kanban, springs, delivery.php delete mode 100644 drafts/server closets in the summer.html create mode 100644 drafts/server closets in the summer.php delete mode 100644 drafts/stack-end-devs.html create mode 100644 drafts/stack-end-devs.php delete mode 100644 drafts/surprisingly simple.html create mode 100644 drafts/surprisingly simple.php delete mode 100644 drafts/used-refurb-2020.html create mode 100644 drafts/used-refurb-2020.php create mode 100644 drafts/value.php delete mode 100644 drafts/what is a script no really.html create mode 100644 drafts/what is a script no really.php delete mode 100644 drafts/what is programming.html create mode 100644 drafts/what is programming.php delete mode 100644 drafts/your company isnt doing SRE.html create mode 100644 drafts/your company isnt doing SRE.php (limited to 'drafts') diff --git a/drafts/2020-11-24-i-like-hyper-more-than-actix.html b/drafts/2020-11-24-i-like-hyper-more-than-actix.html deleted file mode 100644 index 33c5d9e..0000000 --- a/drafts/2020-11-24-i-like-hyper-more-than-actix.html +++ /dev/null @@ -1,23 +0,0 @@ -

- I Like hyper more than - Actix Web -

- -
-

- I've been using Actix Web as the HTTP service layer for some web - applications for a while now. I've written several APIs for work and - personal projects on top of Actix and always thought it was pretty spiffy - for what it does: listen for HTTP requests and respond to them with code - I've written. I was always a little bummed about how large the dependency - tree was with the project though, and how long it took to compile. -

- -

- Recently I've been trying to write or depend on as little code as is - possible to get the job done, so I've been trying to take a look at whether - or not I - need what I've written or imported or even though of implementing - before I've written anything. -

-
diff --git a/drafts/2020-11-24-i-like-hyper-more-than-actix.php b/drafts/2020-11-24-i-like-hyper-more-than-actix.php new file mode 100644 index 0000000..33c5d9e --- /dev/null +++ b/drafts/2020-11-24-i-like-hyper-more-than-actix.php @@ -0,0 +1,23 @@ +

+ I Like hyper more than + Actix Web +

+ +
+

+ I've been using Actix Web as the HTTP service layer for some web + applications for a while now. I've written several APIs for work and + personal projects on top of Actix and always thought it was pretty spiffy + for what it does: listen for HTTP requests and respond to them with code + I've written. I was always a little bummed about how large the dependency + tree was with the project though, and how long it took to compile. +

+ +

+ Recently I've been trying to write or depend on as little code as is + possible to get the job done, so I've been trying to take a look at whether + or not I + need what I've written or imported or even though of implementing + before I've written anything. +

+
diff --git a/drafts/2021-07-28-devops-is-a-weird-word.php b/drafts/2021-07-28-devops-is-a-weird-word.php new file mode 100644 index 0000000..a0fc919 --- /dev/null +++ b/drafts/2021-07-28-devops-is-a-weird-word.php @@ -0,0 +1 @@ +https://blog.dijit.sh/devops-confusion-and-frustration diff --git a/drafts/2021-reading-list.html b/drafts/2021-reading-list.html deleted file mode 100644 index 46d4707..0000000 --- a/drafts/2021-reading-list.html +++ /dev/null @@ -1,9 +0,0 @@ -

Adam's 2021 Reading List

- - diff --git a/drafts/2021-reading-list.php b/drafts/2021-reading-list.php new file mode 100644 index 0000000..46d4707 --- /dev/null +++ b/drafts/2021-reading-list.php @@ -0,0 +1,9 @@ +

Adam's 2021 Reading List

+ + diff --git a/drafts/365 days of working from home.html b/drafts/365 days of working from home.html deleted file mode 100644 index e69de29..0000000 diff --git a/drafts/365 days of working from home.php b/drafts/365 days of working from home.php new file mode 100644 index 0000000..e69de29 diff --git a/drafts/altrustic-angelshark.html b/drafts/altrustic-angelshark.html deleted file mode 100644 index a5e6ce6..0000000 --- a/drafts/altrustic-angelshark.html +++ /dev/null @@ -1,119 +0,0 @@ -

- I finally got the opportunity to release a long-term project from work online - as free and open-source software. Woohoo! It's called Altruistic Angelshark - and here's what it's about. -

- -

Background

- -

- Altruistic Angelshark is an automation library, command-line application, and - RESTful web service for more easily performing CRUD operations on Avaya - Communication Managers. If you're not from the world of voice/telephony IT, - you should probably know the ACMs use a precambrian mainframe interactive - terminal interface to create, modify, and remove stations, extensions, - hunt-groups, etc. Your only other choice is a graphical, also interactive, - user interface that can perform bulk operations and generate reports in the - form of Excel spreadsheets. -

- -

Impetus

- -

- Neither the interactive, VT220-style terminal nor the GUI application (Avaya - Site Administration) are very easy to work with. When I say that I mean - they're not easy to automate over. At our company, it's important for us to be - able to automatically clean up old stations in bulk, as an example. Or - sometimes we want to automatically run audits on possible malformed data and - even fix those entries when they're found. The terminal requires a user's - input to constantly paginate through data, or tab through form fields to - insert a new entity. The GUI is worse. While it does let you automatically run - certain reports to extract useful data, it has to be running to do it. That - means a dedicated Windows server, and not a headless one. It's also pretty - crash-prone. -

- -

- Another issue with the tools available to us is we run more than one ACM at - our company (think > 10). The interactive terminal and GUI are only good for - running one operation or "command" on one ACM at a time. This makes it - annoying to, for example, search for a particular user's extension on all of - the ACMs if you don't know which one it's on. In a worst-case scenario, that - means logging into 11 different servers and running the same command. -

- -

OSSI: The Dark Magic Enabler

- -

- Long story short, there's a proprietary protocol called OSSI. This protocol is - the backbone of ASA, the GUI app. It's a terminal interface, but it's for - machine reading and writing instead of interactive use. If you packet sniff - ASA you can learn a lot about how it's getting its data and the different - things you can use the OSSI terminal for. However, no documentation was made - available to us on OSSI because Avaya guards it pretty closely. So, I had to - improvise. We already had some knowledgable architects who knew a trick or - two. There were also a couple of useful forums available online that gave us - more information. Eventually I figured out enough to replicate 99% of what we - were doing in ASA. Maybe more on that another time. -

- -

Architecting Angelshark, Altrusitically

- -

- Angelshark can do anything ASA can do by reading and writing to an OSSI - terminal over an SSH connection. It works on top of the SSH2 library, so you - don't need an SSH client installed. It can also run commands on one or more - ACMs at a time. All of your logins are stored in a config file. -

- -

- Angelshark's functionality is exposed in a couple of different methods. First, - there's a command-line interface, which lets you write commands on STDIN, runs - them on the ACMs they're intended for, and then writes their output on STDOUT. - It can also automatically parse the output into JSON, CSV, or TSV. This is - nice for quickly building Excel reports like ASA. -

- -

- Even better though (I think) is the Angelshark Daemon. This runs Angelshark as - an HTTP service, listening for incoming requests. You can submit the same - kinds of commands and which ACMs you want them to run on as JSON POSTs. It - feeds those to a runner, which executes commands just like the CLI app. It - then feeds the results back to you over JSON. You can use this functionality - from the browser, in a script with cURL, or from pretty much - anything that can make HTTP requests. The logins are all in a config file - local to Angelshark and commands are queued. That way multiple users don't - have to share passwords and won't overload the ACMs. To speed things up, - commands on separate ACMs are run in parallel. That way your output only takes - as long as the longest running ACM. -

- -

- There are a couple of relevant projects that I found online which do something - similar but don't take it quite as far. They either send OSSI commands from a - file over an SSH client with expect-like functionality or - automate over an interactive terminal. -

- -

- This second method was something that I was also interested in implementing. - In ASA you can dump terminal screenshots for an entire command's output. Some - of my team members had tools in place that relied on this. A third sub-project - of Altruistic Angelshark is asa-cli, and it does exactly that. - For any list or display command, it emulates a VT220 - terminal and dumps all pages of output to STDOUT. -

- -

Free and Open Source

- -

- I got to thinking that this would be a great project to let other developers - worldwide use. If it's helpful to us it's got to be helpful to someone else - out there. I pitched the idea of open-sourcing Angelshark to management and - they were a mix of enthusiastic and indifferent. "Sure, sounds fine," they - said as long as nothing internal to the company be divulged with the project. -

- -

Tooling and Development

- -

Rust, libssh, HTTP, etc.

diff --git a/drafts/altrustic-angelshark.php b/drafts/altrustic-angelshark.php new file mode 100644 index 0000000..a5e6ce6 --- /dev/null +++ b/drafts/altrustic-angelshark.php @@ -0,0 +1,119 @@ +

+ I finally got the opportunity to release a long-term project from work online + as free and open-source software. Woohoo! It's called Altruistic Angelshark + and here's what it's about. +

+ +

Background

+ +

+ Altruistic Angelshark is an automation library, command-line application, and + RESTful web service for more easily performing CRUD operations on Avaya + Communication Managers. If you're not from the world of voice/telephony IT, + you should probably know the ACMs use a precambrian mainframe interactive + terminal interface to create, modify, and remove stations, extensions, + hunt-groups, etc. Your only other choice is a graphical, also interactive, + user interface that can perform bulk operations and generate reports in the + form of Excel spreadsheets. +

+ +

Impetus

+ +

+ Neither the interactive, VT220-style terminal nor the GUI application (Avaya + Site Administration) are very easy to work with. When I say that I mean + they're not easy to automate over. At our company, it's important for us to be + able to automatically clean up old stations in bulk, as an example. Or + sometimes we want to automatically run audits on possible malformed data and + even fix those entries when they're found. The terminal requires a user's + input to constantly paginate through data, or tab through form fields to + insert a new entity. The GUI is worse. While it does let you automatically run + certain reports to extract useful data, it has to be running to do it. That + means a dedicated Windows server, and not a headless one. It's also pretty + crash-prone. +

+ +

+ Another issue with the tools available to us is we run more than one ACM at + our company (think > 10). The interactive terminal and GUI are only good for + running one operation or "command" on one ACM at a time. This makes it + annoying to, for example, search for a particular user's extension on all of + the ACMs if you don't know which one it's on. In a worst-case scenario, that + means logging into 11 different servers and running the same command. +

+ +

OSSI: The Dark Magic Enabler

+ +

+ Long story short, there's a proprietary protocol called OSSI. This protocol is + the backbone of ASA, the GUI app. It's a terminal interface, but it's for + machine reading and writing instead of interactive use. If you packet sniff + ASA you can learn a lot about how it's getting its data and the different + things you can use the OSSI terminal for. However, no documentation was made + available to us on OSSI because Avaya guards it pretty closely. So, I had to + improvise. We already had some knowledgable architects who knew a trick or + two. There were also a couple of useful forums available online that gave us + more information. Eventually I figured out enough to replicate 99% of what we + were doing in ASA. Maybe more on that another time. +

+ +

Architecting Angelshark, Altrusitically

+ +

+ Angelshark can do anything ASA can do by reading and writing to an OSSI + terminal over an SSH connection. It works on top of the SSH2 library, so you + don't need an SSH client installed. It can also run commands on one or more + ACMs at a time. All of your logins are stored in a config file. +

+ +

+ Angelshark's functionality is exposed in a couple of different methods. First, + there's a command-line interface, which lets you write commands on STDIN, runs + them on the ACMs they're intended for, and then writes their output on STDOUT. + It can also automatically parse the output into JSON, CSV, or TSV. This is + nice for quickly building Excel reports like ASA. +

+ +

+ Even better though (I think) is the Angelshark Daemon. This runs Angelshark as + an HTTP service, listening for incoming requests. You can submit the same + kinds of commands and which ACMs you want them to run on as JSON POSTs. It + feeds those to a runner, which executes commands just like the CLI app. It + then feeds the results back to you over JSON. You can use this functionality + from the browser, in a script with cURL, or from pretty much + anything that can make HTTP requests. The logins are all in a config file + local to Angelshark and commands are queued. That way multiple users don't + have to share passwords and won't overload the ACMs. To speed things up, + commands on separate ACMs are run in parallel. That way your output only takes + as long as the longest running ACM. +

+ +

+ There are a couple of relevant projects that I found online which do something + similar but don't take it quite as far. They either send OSSI commands from a + file over an SSH client with expect-like functionality or + automate over an interactive terminal. +

+ +

+ This second method was something that I was also interested in implementing. + In ASA you can dump terminal screenshots for an entire command's output. Some + of my team members had tools in place that relied on this. A third sub-project + of Altruistic Angelshark is asa-cli, and it does exactly that. + For any list or display command, it emulates a VT220 + terminal and dumps all pages of output to STDOUT. +

+ +

Free and Open Source

+ +

+ I got to thinking that this would be a great project to let other developers + worldwide use. If it's helpful to us it's got to be helpful to someone else + out there. I pitched the idea of open-sourcing Angelshark to management and + they were a mix of enthusiastic and indifferent. "Sure, sounds fine," they + said as long as nothing internal to the company be divulged with the project. +

+ +

Tooling and Development

+ +

Rust, libssh, HTTP, etc.

diff --git a/drafts/avoiding null in csharp.html b/drafts/avoiding null in csharp.html deleted file mode 100644 index e69de29..0000000 diff --git a/drafts/avoiding null in csharp.php b/drafts/avoiding null in csharp.php new file mode 100644 index 0000000..e69de29 diff --git a/drafts/biz class internet is worth it.html b/drafts/biz class internet is worth it.html deleted file mode 100644 index e69de29..0000000 diff --git a/drafts/biz class internet is worth it.php b/drafts/biz class internet is worth it.php new file mode 100644 index 0000000..e69de29 diff --git a/drafts/california is doing weird stuff.php b/drafts/california is doing weird stuff.php new file mode 100644 index 0000000..0fda874 --- /dev/null +++ b/drafts/california is doing weird stuff.php @@ -0,0 +1,4 @@ +https://www.theregister.com/2021/07/26/dell_energy_pcs/ +-> but all-evs by what year? + +mechanics not being able to fix own cars diff --git a/drafts/clementine.html b/drafts/clementine.html deleted file mode 100644 index e69de29..0000000 diff --git a/drafts/clementine.php b/drafts/clementine.php new file mode 100644 index 0000000..e69de29 diff --git a/drafts/dell-dock.html b/drafts/dell-dock.html deleted file mode 100644 index 4a9dd9a..0000000 --- a/drafts/dell-dock.html +++ /dev/null @@ -1,102 +0,0 @@ -

Make Your Docking Station Work for You (on FreeBSD)

- -

- I have a Dell Latitude E-series laptop running FreeBSD 12.2-RELEASE. I also - have a Dell E-Port II docking station on my desk. I wanted to be able to take - my shut, sleeping laptop and plop it down on the docking station, hit the dock - power button, and have the laptop wake up and switch over to all of the - docking station peripherals. So I did it! And now I'm going to write about it - so I don't forget how. You need to know a little bit about FreeBSD - sysctl knobs, display outputs in X, sound devices, and - ifconfig networking. -

- -

Switching from Ethernet to WiFi and Back Again, Seamlessly

- -

- FreeBSD doesn't magically swap from wireless to wired connections by default, - but there's an easy way to remedy this: link failover. I recommend reading the - FreeBSD handbook page on network aggregation - as it's where I found out about link aggregation and failover. Basically, - aggregation lets you bind two of your network interfaces together into a - single virtual interface. Failover lets your traffic continue moving as long - as one of the aggregated interfaces has is connected. - Here's what I had to do: -

- -
    -
  1. - Bind the wireless network interface (wlan0) to the MAC address of the wired - interface (em0) -
  2. -
  3. Create a lagg interface using the two network interfaces
  4. -
  5. Bind the lagg interface to an IP address, preferably with DHCP
  6. -
- -

All of this is configured in my rc.conf:

- -

-wlans_iwn0="wlan0" # <- wlan0 device should use the iwn driver
-ifconfig_wlan0="WPA" # <- wlan0 should use WPA (wpa_supplicant) to connect to wireless SSIDs
-create_args_wlan0="wlanaddr 5c:26:0a:06:c1:d6" # <- wlan0 MAC address is set to em0 device MAC address
-ifconfig_em0="up" # <- enable em0 (ethernet) device
-cloned_interfaces="lagg0" # <- create cloned interface lagg0
-ifconfig_lagg0="up laggproto failover laggport em0 laggport wlan0 DHCP" # <- configure lagg0 interface to act as a failover lagg protocol over em0 and wlan0
-
- -

- In practice, the preferred device is em0, or my ethernet NIC. - FreeBSD will always try to use that first. If it's disconnected, such as when - the laptop is removed from the dock, the wireless device (wlan0) - will take over. This transition happens instantly, and without interrupting - traffic; active transactions aren't cut short for example. -

- -

Sleeping on Lid Close Except When Docked

- -

- This is an easy one. You can use sysctl to configure what happens - when a laptop lid is closed. I wanted the lid closing while undocked to - suspend (put the laptop to sleep). When it's docked however, I don't use the - internal display and wanted to be able to shut the lid and leave it shut. If you read ACPI(4) in the manual, you'll find this little passage: -

- -
-
-hw.acpi.lid_switch_state - Suspend state (S1-S5) to enter when the lid switch (i.e., a - notebook screen) is closed. Default is "NONE" (do nothing). -
-
-
-

I changed this value a long time ago so closing the lid suspends the laptop. You can check with sysctl:

- -
-
-$ sysctl hw.acpi.lid_switch_state
-hw.acpi.lid_switch_state: S3
-
-
- -

Now, if I wanted to disable this functionality, I would just change this parameter as root:

- -
-
-$ doas sysctl hw.acpi.lid_switch_state=NONE
-hw.acpi.lid_switch_state: NONE -> NONE
-
-
- -This change takes effect immediately. I can open and close the lid and nothing happens but turning off the screen. Awesome. - -

Swapping Primary Display Outputs (Also Nvidia Screen-Tearing)

- -

Switching Default Sound Device

- -

Putting It All Together (Scripts Are Glue)

- -

What I Didn't Have to Do

- -usb devices, battery/charging diff --git a/drafts/dell-dock.php b/drafts/dell-dock.php new file mode 100644 index 0000000..4a9dd9a --- /dev/null +++ b/drafts/dell-dock.php @@ -0,0 +1,102 @@ +

Make Your Docking Station Work for You (on FreeBSD)

+ +

+ I have a Dell Latitude E-series laptop running FreeBSD 12.2-RELEASE. I also + have a Dell E-Port II docking station on my desk. I wanted to be able to take + my shut, sleeping laptop and plop it down on the docking station, hit the dock + power button, and have the laptop wake up and switch over to all of the + docking station peripherals. So I did it! And now I'm going to write about it + so I don't forget how. You need to know a little bit about FreeBSD + sysctl knobs, display outputs in X, sound devices, and + ifconfig networking. +

+ +

Switching from Ethernet to WiFi and Back Again, Seamlessly

+ +

+ FreeBSD doesn't magically swap from wireless to wired connections by default, + but there's an easy way to remedy this: link failover. I recommend reading the + FreeBSD handbook page on network aggregation + as it's where I found out about link aggregation and failover. Basically, + aggregation lets you bind two of your network interfaces together into a + single virtual interface. Failover lets your traffic continue moving as long + as one of the aggregated interfaces has is connected. + Here's what I had to do: +

+ +
    +
  1. + Bind the wireless network interface (wlan0) to the MAC address of the wired + interface (em0) +
  2. +
  3. Create a lagg interface using the two network interfaces
  4. +
  5. Bind the lagg interface to an IP address, preferably with DHCP
  6. +
+ +

All of this is configured in my rc.conf:

+ +

+wlans_iwn0="wlan0" # <- wlan0 device should use the iwn driver
+ifconfig_wlan0="WPA" # <- wlan0 should use WPA (wpa_supplicant) to connect to wireless SSIDs
+create_args_wlan0="wlanaddr 5c:26:0a:06:c1:d6" # <- wlan0 MAC address is set to em0 device MAC address
+ifconfig_em0="up" # <- enable em0 (ethernet) device
+cloned_interfaces="lagg0" # <- create cloned interface lagg0
+ifconfig_lagg0="up laggproto failover laggport em0 laggport wlan0 DHCP" # <- configure lagg0 interface to act as a failover lagg protocol over em0 and wlan0
+
+ +

+ In practice, the preferred device is em0, or my ethernet NIC. + FreeBSD will always try to use that first. If it's disconnected, such as when + the laptop is removed from the dock, the wireless device (wlan0) + will take over. This transition happens instantly, and without interrupting + traffic; active transactions aren't cut short for example. +

+ +

Sleeping on Lid Close Except When Docked

+ +

+ This is an easy one. You can use sysctl to configure what happens + when a laptop lid is closed. I wanted the lid closing while undocked to + suspend (put the laptop to sleep). When it's docked however, I don't use the + internal display and wanted to be able to shut the lid and leave it shut. If you read ACPI(4) in the manual, you'll find this little passage: +

+ +
+
+hw.acpi.lid_switch_state + Suspend state (S1-S5) to enter when the lid switch (i.e., a + notebook screen) is closed. Default is "NONE" (do nothing). +
+
+
+

I changed this value a long time ago so closing the lid suspends the laptop. You can check with sysctl:

+ +
+
+$ sysctl hw.acpi.lid_switch_state
+hw.acpi.lid_switch_state: S3
+
+
+ +

Now, if I wanted to disable this functionality, I would just change this parameter as root:

+ +
+
+$ doas sysctl hw.acpi.lid_switch_state=NONE
+hw.acpi.lid_switch_state: NONE -> NONE
+
+
+ +This change takes effect immediately. I can open and close the lid and nothing happens but turning off the screen. Awesome. + +

Swapping Primary Display Outputs (Also Nvidia Screen-Tearing)

+ +

Switching Default Sound Device

+ +

Putting It All Together (Scripts Are Glue)

+ +

What I Didn't Have to Do

+ +usb devices, battery/charging diff --git a/drafts/dotnet 5.0: use it.html b/drafts/dotnet 5.0: use it.html deleted file mode 100644 index 766445e..0000000 --- a/drafts/dotnet 5.0: use it.html +++ /dev/null @@ -1,71 +0,0 @@ -

Use .NET 5.0 To Be Rid of Windows Server!

- -

- I work at a three-letter company. The majority of our development teams are - heavily invested in Java and .NET Framework. Our team has traditionally shied - away from .NET Framework for what I'm guessing is a pretty common reason: it - only runs on Windows. For many shops this probably isn't a big deal but for - our team it was a bit of an annoyance. Most of our software gets wrapped up in - containers and deployed to an on-site Kubernetes cluster. However, we have one - small application that needs to talk to a proprietary vendor library written - in .NET Framework. That means that 99% of our stuff is deployed using the same - methods and in the same location. The other 1% was this little app, and it - actually caused us quite a few headaches. Luckily, .NET 5.0 came out recently. - It represents the convergence of .NET Core and .NET Framework into a single, - cross-platform runtime. This is one of the only times in my career that a - single upgrade has magically solved everything. -

- -

- The library in question is an older .NET Framework (not .NET Standard, which - can be included in Framework or Core projects) collection of .dlls that lets - us communicate with the vendor's systems. It's basically a platform-dependent - SDK. Our only requirement was to make accessible a table of information on the - vendor's system via the SDK. At the time, the simplest thing to do seemed to - be an ASP.NET Core app that rendered a very basic HTML table constructed from - vendor data. And it worked just fine, tested great. The whole project wasn't - more than a few thousand SLOC. -

- -

- Everything was going swimmingly all the way through deployment. We knew that - because we had to target .NET Framework for our project to build, we would - need to build a Windows Server instance. So we did that and set used Visual - Studio + IIS to create a deployment pipeline. This was alright; click publish - and the new version builds, deploys, and goes live. Then things started to get - weird. -

- -

- Our application had some config to know which servers to log into. This was - stored in appsettings.Env.json, where Env changed - for Development and Production. For whatever reason, regardless of the - environment we specified (typically - ASPNETCORE_ENVIRONMENT=Production), the config would default to - Development after an application restart. There were a few problems - interacting at once here. First, why was the app restarting? It seemed like if - we started it up, it would run great. If we left it alone for a while, it - would die. Then, accessing its URL again would slowly bring it back to life. - When it came back to life it had the Development config. Only a manual app - restart would bring the Production config back, and then only until it went to - sleep again. -

- -

- Keep in mind this was a purely default deployment environment. Vanilla Windows - Server 2016, base install of IIS with no tweaking. Even the ASP.NET Core - project was scaffolded by the dotnet CLI tool. We just added some - source code that changed the homepage by running a few library functions. -

- -

Eventually we tracked down the

- -- resources - patching/AMI upgrades - IIS weirdness - -

- quick ASP.NET Core app on top of their .NET Framework library app, fired up - Windows Server, and shoved it there. It wouldn't let us forget about it. For a - myriad of reasons, maintaining IIS as a reverse proxy to the application (for - certificates, etc.) produced strange and unusual behavior. For example, IIS - comes with a collection of -

diff --git a/drafts/dotnet 5.0: use it.php b/drafts/dotnet 5.0: use it.php new file mode 100644 index 0000000..766445e --- /dev/null +++ b/drafts/dotnet 5.0: use it.php @@ -0,0 +1,71 @@ +

Use .NET 5.0 To Be Rid of Windows Server!

+ +

+ I work at a three-letter company. The majority of our development teams are + heavily invested in Java and .NET Framework. Our team has traditionally shied + away from .NET Framework for what I'm guessing is a pretty common reason: it + only runs on Windows. For many shops this probably isn't a big deal but for + our team it was a bit of an annoyance. Most of our software gets wrapped up in + containers and deployed to an on-site Kubernetes cluster. However, we have one + small application that needs to talk to a proprietary vendor library written + in .NET Framework. That means that 99% of our stuff is deployed using the same + methods and in the same location. The other 1% was this little app, and it + actually caused us quite a few headaches. Luckily, .NET 5.0 came out recently. + It represents the convergence of .NET Core and .NET Framework into a single, + cross-platform runtime. This is one of the only times in my career that a + single upgrade has magically solved everything. +

+ +

+ The library in question is an older .NET Framework (not .NET Standard, which + can be included in Framework or Core projects) collection of .dlls that lets + us communicate with the vendor's systems. It's basically a platform-dependent + SDK. Our only requirement was to make accessible a table of information on the + vendor's system via the SDK. At the time, the simplest thing to do seemed to + be an ASP.NET Core app that rendered a very basic HTML table constructed from + vendor data. And it worked just fine, tested great. The whole project wasn't + more than a few thousand SLOC. +

+ +

+ Everything was going swimmingly all the way through deployment. We knew that + because we had to target .NET Framework for our project to build, we would + need to build a Windows Server instance. So we did that and set used Visual + Studio + IIS to create a deployment pipeline. This was alright; click publish + and the new version builds, deploys, and goes live. Then things started to get + weird. +

+ +

+ Our application had some config to know which servers to log into. This was + stored in appsettings.Env.json, where Env changed + for Development and Production. For whatever reason, regardless of the + environment we specified (typically + ASPNETCORE_ENVIRONMENT=Production), the config would default to + Development after an application restart. There were a few problems + interacting at once here. First, why was the app restarting? It seemed like if + we started it up, it would run great. If we left it alone for a while, it + would die. Then, accessing its URL again would slowly bring it back to life. + When it came back to life it had the Development config. Only a manual app + restart would bring the Production config back, and then only until it went to + sleep again. +

+ +

+ Keep in mind this was a purely default deployment environment. Vanilla Windows + Server 2016, base install of IIS with no tweaking. Even the ASP.NET Core + project was scaffolded by the dotnet CLI tool. We just added some + source code that changed the homepage by running a few library functions. +

+ +

Eventually we tracked down the

+ +- resources - patching/AMI upgrades - IIS weirdness + +

+ quick ASP.NET Core app on top of their .NET Framework library app, fired up + Windows Server, and shoved it there. It wouldn't let us forget about it. For a + myriad of reasons, maintaining IIS as a reverse proxy to the application (for + certificates, etc.) produced strange and unusual behavior. For example, IIS + comes with a collection of +

diff --git a/drafts/form-fields.html b/drafts/form-fields.html deleted file mode 100644 index 0aed689..0000000 --- a/drafts/form-fields.html +++ /dev/null @@ -1,15 +0,0 @@ -

- I've been trying to increase my knowledge and ability with designing user - interfaces better. I've been reading and watching learning materials by - experts to try to build better interfaces. One of the things I've been trying - to get better at is web form design. I want my forms to be clear, accessible, - and understandable. There's one piece of advice that I've gotten that has left - both me and some other users confused in pursuit of cleaner, slicker looking - web apps. Form input placeholders Form input placeholders seem great in theory - but they're confusing, inaccessible, and less clean in my opinion insert video - by great web designer and author about cleaning up a form users can't see what - they inserted data form validation hints are gone once text is inserted leaves - fields looking pre-populated as optional, unimportant, not a mental TODO -

- -

https://www.nngroup.com/articles/form-design-placeholders/

diff --git a/drafts/form-fields.php b/drafts/form-fields.php new file mode 100644 index 0000000..0aed689 --- /dev/null +++ b/drafts/form-fields.php @@ -0,0 +1,15 @@ +

+ I've been trying to increase my knowledge and ability with designing user + interfaces better. I've been reading and watching learning materials by + experts to try to build better interfaces. One of the things I've been trying + to get better at is web form design. I want my forms to be clear, accessible, + and understandable. There's one piece of advice that I've gotten that has left + both me and some other users confused in pursuit of cleaner, slicker looking + web apps. Form input placeholders Form input placeholders seem great in theory + but they're confusing, inaccessible, and less clean in my opinion insert video + by great web designer and author about cleaning up a form users can't see what + they inserted data form validation hints are gone once text is inserted leaves + fields looking pre-populated as optional, unimportant, not a mental TODO +

+ +

https://www.nngroup.com/articles/form-design-placeholders/

diff --git a/drafts/frictionless software invites creative solutions.html b/drafts/frictionless software invites creative solutions.html deleted file mode 100644 index fbfd394..0000000 --- a/drafts/frictionless software invites creative solutions.html +++ /dev/null @@ -1 +0,0 @@ -

Frictionless Software Invites Creative Solutions

diff --git a/drafts/frictionless software invites creative solutions.php b/drafts/frictionless software invites creative solutions.php new file mode 100644 index 0000000..fbfd394 --- /dev/null +++ b/drafts/frictionless software invites creative solutions.php @@ -0,0 +1 @@ +

Frictionless Software Invites Creative Solutions

diff --git a/drafts/het-club.html b/drafts/het-club.html deleted file mode 100644 index a144d91..0000000 --- a/drafts/het-club.html +++ /dev/null @@ -1,6 +0,0 @@ -joint the club! - -link diff --git a/drafts/het-club.php b/drafts/het-club.php new file mode 100644 index 0000000..a144d91 --- /dev/null +++ b/drafts/het-club.php @@ -0,0 +1,6 @@ +joint the club! + +link diff --git a/drafts/home server evolution b/drafts/home server evolution index e69de29..ce9df51 100644 --- a/drafts/home server evolution +++ b/drafts/home server evolution @@ -0,0 +1,6 @@ +In my junior year in high school I set up my first home web server. I made it out of a used fleet desktop that my school was getting rid of. It was a Dell Optiplex GX400 with a Pentium 4 and (I think) 768MB of memory. It had Windows XP Professional and Microsoft IIS and Thunderbird mail on it. When I set it up it was the first time I had ever port-forwarded from a home router to a device on the network and configured a firewall to let traffic into my bedroom. Because I didn't know anything about networking, hosting, or web servers, I published web pages to it by emailing them to that Thunderbird instance. A scheduled task would unzip the attached files and copy them to the web root. + +My friends and I all had our own address so we could paste funny memes and jokes on our own "walls" while we were in class. The site had no domain name or certificate. Just an inscure, dynamic Verizon IP address which I had to re-share every time my parents got a new upstream IP. We called it the "Troll Nexus Center". + +Fast-forward a few years and I'm in college and I have my own place. I got really used to being able to remote into the Computer Science lab, run long-running or intensive jobs, disconnect, and then re-connect later. + diff --git a/drafts/html-for-docs-2020.html b/drafts/html-for-docs-2020.html deleted file mode 100644 index 8b5462e..0000000 --- a/drafts/html-for-docs-2020.html +++ /dev/null @@ -1,72 +0,0 @@ -

Writing Documents: Markdown? LaTeX? WINWORD.EXE? Nope, just HTML

- -

- -

- -

- I've been without MS Word for quite a few years since I switched away from - Windows and honestly I haven't needed it. I took notes and wrote documents in - Markdown for a while. That was alright because the syntax is easy and any text - editor can read a Markdown file. Sometimes I need shareable formatting, so - recently I started using HTML for all documents I intend to share, upload, or - print. -

- -

- The year is 2021 and I write all my formatted documents in HTML. It sounds - needless but if you think about it it makes a lot of sense. HTML after all was - designed to be the streaming document of choice when the web was introduced to - the world. So it's tailor-made for shareable, digital documents. - Over the years the specification has gotten larger, and most of the syntax required by a typical user is present. -

- -

- But why bother? What are the "benefits"? Well, HTML is ubiquitous. And by that - I mean literally everyone can read an HTML document because literally - everyone has a web browser installed. Friends don't have Word? Use Google - Docs? Use Apple Pages? Forget it. I bet you all of those folks have a web - browser that was made after 1999. That means they can all read your document, - either by visiting it on your site or receiving it in an email. -

- -

- What's easier than reading HTML is writing it. Anyone with a text editor can - do it. Heck, even those folks with Word installed can save their documents as - [reasonable] HTML. And the tags aren't that hard to learn. I don't think that - Markdown is an easier syntax to learn and understand. HTML's tags are only - slightly more verbose and the structure is a pro, not a con. It's certainly - easier than writing a document in LaTeX. I would even argue in some ways it's - easier than working with a WYSIWYG editor. At least the formatting you're - looking for isn't getting shuffled from menu to sub-menu. -

- -

- Sometimes folks want a PDF instead. Okay, fine. For whatever reason PDFs are - the reigning document of the land. That doesn't mean you need Adobe Acrobat or - some custom setup involving - wkhtmltopdf. Or even worse, some strange LaTeX middleware via - pandoc. You don't need any of that! The best PDF reader in the - world, MuPDF, also comes with mutool. - mutool convert [options] file [pages] will convert a variety of - formats to or from a PDF. And the results look terrific going from an HTML to - a PDF. If you want, you can customize the results by writing CSS into - @media print queries. Automate the creation with a script when - you safe the underlying document. Sky's the limit! -

- -

- But what about presentations or slideshows? Surely, the "minimal" solution is - to use something like Suckless' sent right? Well, you can also do - slideshows in HTML! Just a little CSS and some section and - a tags and you've got a click-able, full-browser slideshow with - images, links, titles, icons, flowcharts, embedded videos, and a printable - slide deck. And the best part is that you can instantly share online by - dropping it into a public web root. You don't have to use Google Slides or - some other third-party slide creator online that none of your friends use. - Heck, Suckless sent is just that: yet another slideshow tool that - does one thing and nobody but you has it installed. Your HTML slides are - just as plain text as a sent deck. -

diff --git a/drafts/html-for-docs-2020.php b/drafts/html-for-docs-2020.php new file mode 100644 index 0000000..8b5462e --- /dev/null +++ b/drafts/html-for-docs-2020.php @@ -0,0 +1,72 @@ +

Writing Documents: Markdown? LaTeX? WINWORD.EXE? Nope, just HTML

+ +

+ +

+ +

+ I've been without MS Word for quite a few years since I switched away from + Windows and honestly I haven't needed it. I took notes and wrote documents in + Markdown for a while. That was alright because the syntax is easy and any text + editor can read a Markdown file. Sometimes I need shareable formatting, so + recently I started using HTML for all documents I intend to share, upload, or + print. +

+ +

+ The year is 2021 and I write all my formatted documents in HTML. It sounds + needless but if you think about it it makes a lot of sense. HTML after all was + designed to be the streaming document of choice when the web was introduced to + the world. So it's tailor-made for shareable, digital documents. + Over the years the specification has gotten larger, and most of the syntax required by a typical user is present. +

+ +

+ But why bother? What are the "benefits"? Well, HTML is ubiquitous. And by that + I mean literally everyone can read an HTML document because literally + everyone has a web browser installed. Friends don't have Word? Use Google + Docs? Use Apple Pages? Forget it. I bet you all of those folks have a web + browser that was made after 1999. That means they can all read your document, + either by visiting it on your site or receiving it in an email. +

+ +

+ What's easier than reading HTML is writing it. Anyone with a text editor can + do it. Heck, even those folks with Word installed can save their documents as + [reasonable] HTML. And the tags aren't that hard to learn. I don't think that + Markdown is an easier syntax to learn and understand. HTML's tags are only + slightly more verbose and the structure is a pro, not a con. It's certainly + easier than writing a document in LaTeX. I would even argue in some ways it's + easier than working with a WYSIWYG editor. At least the formatting you're + looking for isn't getting shuffled from menu to sub-menu. +

+ +

+ Sometimes folks want a PDF instead. Okay, fine. For whatever reason PDFs are + the reigning document of the land. That doesn't mean you need Adobe Acrobat or + some custom setup involving + wkhtmltopdf. Or even worse, some strange LaTeX middleware via + pandoc. You don't need any of that! The best PDF reader in the + world, MuPDF, also comes with mutool. + mutool convert [options] file [pages] will convert a variety of + formats to or from a PDF. And the results look terrific going from an HTML to + a PDF. If you want, you can customize the results by writing CSS into + @media print queries. Automate the creation with a script when + you safe the underlying document. Sky's the limit! +

+ +

+ But what about presentations or slideshows? Surely, the "minimal" solution is + to use something like Suckless' sent right? Well, you can also do + slideshows in HTML! Just a little CSS and some section and + a tags and you've got a click-able, full-browser slideshow with + images, links, titles, icons, flowcharts, embedded videos, and a printable + slide deck. And the best part is that you can instantly share online by + dropping it into a public web root. You don't have to use Google Slides or + some other third-party slide creator online that none of your friends use. + Heck, Suckless sent is just that: yet another slideshow tool that + does one thing and nobody but you has it installed. Your HTML slides are + just as plain text as a sent deck. +

diff --git a/drafts/it's not rust vs go.html b/drafts/it's not rust vs go.html deleted file mode 100644 index c9273ff..0000000 --- a/drafts/it's not rust vs go.html +++ /dev/null @@ -1,150 +0,0 @@ -

"Rust or Go?" is not the question

-

Part 2: (But Rust is definitely the answer)

-

Part 3: Rust is definitely production ready

--> part 2 include coworker conversation tidbits draft notes: -
    -
  • These are two very different languages
  • -
  • These two languages are solving two very different problems
  • -
  • - What attracted me to Rust is the error handling and borrow checker. You - don't need a runtime and you don't need to worry about a variety of memory - pitfalls. -
  • -
  • - Rust is not just a systems-level language, and Go is not just a server-side - language. -
  • -
  • Rust isn't *really* about speed or performance. It's about safety.
  • -
  • Rust is just plainly a more powerful language.
  • -
  • - Go is for Python developers who need speed. Rust is for C++ developers who - need safety. -
  • -
  • - Rust has opt-in concurrent runtimes and opt-in garbage collection. These are - standard in Go, there's no getting out of them. -
  • -
- -

- Go has great concurrency. Goroutines are high-performance, parallel green - threads. Rust's concurrency is provably-correct. -

- -

- Why is the immediate question when someone says they wrote something in Go, - "why not rust?". The inverse is true. When I tell a dev I wrote something in - Rust, the immediate response is "you should have used Go, it's better." This - is false. -

- -

- What does suck about Rust? The compiler is slow. It will probably always be a - degree of magnitude slower than another compiler for a similar target. -

- -

- It's not Rust vs Go, it's when to use Rust and when to use Go. And the number - one argument I get for why Go should be used is it's simpler and faster to - learn and work with. There's the answer! The answer is use whichever one works - best for you. There's no better or worse, or superiority. Redditors will say - otherwise. -

- -

sources

- -

- Go vs Rust discussions are ridiculous. It should be more like: When to use Go. - When to use Rust. When to use X… — Inanc Gumus (@inancgumus) September 19, - 2019 - source -

-Is Rust in Trouble After Big Mozilla Layoffs? -Hello World! (Rust Foundation) - - Killed by Google - -The Dart Programming Language - -Discord swapped Go for Rust - -
- Both Microsoft and Amazon have just recently announced and released their new - officially supported Rust libraries for interacting with Windows and AWS. - Official first party support for these massive APIs helps make Rust people's - first choice when deciding what to use for their project. -
-Source - -Dart -- apples to oranges? I'm not trying to say that go is going the way of - dart, I'm trying to say that industry-leading companies aren't always stewards - of their creations. take FreeBSD. It's a thriving, excellent operating system - capable of "industry-leading company" usage. See the usuals (Netflix, Sony, - etc). Look at the FreeBSD foundation. Now look at RedHat and IBM. Again, - apples to oranges? No, just a bad argument to make in the first place. - -

quotables

- -
- Take a look Go as well. I think you will find Go much faster to program in. - The other aspect is threading. They have very different threading models. Not - sure if you had the chance to research that yet or not -
-
- Yes, a big thing is threading. Unfortunately, Rust uses a similar model as - Java for threads :(. Go is based on Fibers approach which so much faster for - temporary, lightweight requests. Go is definitely superior for HTTP REST API - apps. Rust can be better for a single-thread app or general "systems" - programming. -
- -

- Rust is not a "systems programming" language. Systems programming is not a - genre of languages. It's not like saying Italian is a "Romantic language". - Systems programming is a specific, targeted programming *application*. It's - the destination, the use-case that a language is being applied to. Rust is a - general-purpose programming language. I have used it to write a variety of - tools, low- and high-level, server-side and client-side, graphical and CLI. - Yes, I used it for some systems programming. Also used it to make a very - simple and robust web service digested by a variety of other developers at our - company. -

- -
- The only way is to learn and try both. That's what I did. Most of the info - from both sides is biased...Go is definitely very fast and [garbage - collection] is not the issue people make it out to be. I started last month - porting [a chess] engine to Rust. I recently took a break from it because the - syntax and borrow checking were getting insane to deal with. Once I learned - about the threading issues in Rust, I have put it on the shelf for now. Rust - is still evolving which is good and bad. It needs better IDE and Debugging - support than current levels. Hopefully that will continue to improve. There - was a big Mozilla shakeup (Nov 2020) where they let go of the Rust developers - and cancelled the project. AWS hired them. So honestly, I am not sure which - direction the language is going in. Meaning, now that AWS owns the braintrust, - I don't know where they are headed. My guess is that AWS is using Rust for - some behind the scenes script-like stuff. Not sure. Will be important in the - next year or two on which direction things end up going. For Rust to benefit - long-term, it needs the support of a corporate backer -
- -

Rust is absolutely ready for production use.

-

- Anti-Rust zealotry is just as strong as pro-Rust zealotry. The hype goes both - ways. No, your talking points shouldn't come from Reddit. -

diff --git a/drafts/its-not-rust-vs-go.php b/drafts/its-not-rust-vs-go.php new file mode 100644 index 0000000..c9273ff --- /dev/null +++ b/drafts/its-not-rust-vs-go.php @@ -0,0 +1,150 @@ +

"Rust or Go?" is not the question

+

Part 2: (But Rust is definitely the answer)

+

Part 3: Rust is definitely production ready

+-> part 2 include coworker conversation tidbits draft notes: +
    +
  • These are two very different languages
  • +
  • These two languages are solving two very different problems
  • +
  • + What attracted me to Rust is the error handling and borrow checker. You + don't need a runtime and you don't need to worry about a variety of memory + pitfalls. +
  • +
  • + Rust is not just a systems-level language, and Go is not just a server-side + language. +
  • +
  • Rust isn't *really* about speed or performance. It's about safety.
  • +
  • Rust is just plainly a more powerful language.
  • +
  • + Go is for Python developers who need speed. Rust is for C++ developers who + need safety. +
  • +
  • + Rust has opt-in concurrent runtimes and opt-in garbage collection. These are + standard in Go, there's no getting out of them. +
  • +
+ +

+ Go has great concurrency. Goroutines are high-performance, parallel green + threads. Rust's concurrency is provably-correct. +

+ +

+ Why is the immediate question when someone says they wrote something in Go, + "why not rust?". The inverse is true. When I tell a dev I wrote something in + Rust, the immediate response is "you should have used Go, it's better." This + is false. +

+ +

+ What does suck about Rust? The compiler is slow. It will probably always be a + degree of magnitude slower than another compiler for a similar target. +

+ +

+ It's not Rust vs Go, it's when to use Rust and when to use Go. And the number + one argument I get for why Go should be used is it's simpler and faster to + learn and work with. There's the answer! The answer is use whichever one works + best for you. There's no better or worse, or superiority. Redditors will say + otherwise. +

+ +

sources

+ +

+ Go vs Rust discussions are ridiculous. It should be more like: When to use Go. + When to use Rust. When to use X… — Inanc Gumus (@inancgumus) September 19, + 2019 + source +

+Is Rust in Trouble After Big Mozilla Layoffs? +Hello World! (Rust Foundation) + + Killed by Google + +The Dart Programming Language + +Discord swapped Go for Rust + +
+ Both Microsoft and Amazon have just recently announced and released their new + officially supported Rust libraries for interacting with Windows and AWS. + Official first party support for these massive APIs helps make Rust people's + first choice when deciding what to use for their project. +
+Source + +Dart -- apples to oranges? I'm not trying to say that go is going the way of + dart, I'm trying to say that industry-leading companies aren't always stewards + of their creations. take FreeBSD. It's a thriving, excellent operating system + capable of "industry-leading company" usage. See the usuals (Netflix, Sony, + etc). Look at the FreeBSD foundation. Now look at RedHat and IBM. Again, + apples to oranges? No, just a bad argument to make in the first place. + +

quotables

+ +
+ Take a look Go as well. I think you will find Go much faster to program in. + The other aspect is threading. They have very different threading models. Not + sure if you had the chance to research that yet or not +
+
+ Yes, a big thing is threading. Unfortunately, Rust uses a similar model as + Java for threads :(. Go is based on Fibers approach which so much faster for + temporary, lightweight requests. Go is definitely superior for HTTP REST API + apps. Rust can be better for a single-thread app or general "systems" + programming. +
+ +

+ Rust is not a "systems programming" language. Systems programming is not a + genre of languages. It's not like saying Italian is a "Romantic language". + Systems programming is a specific, targeted programming *application*. It's + the destination, the use-case that a language is being applied to. Rust is a + general-purpose programming language. I have used it to write a variety of + tools, low- and high-level, server-side and client-side, graphical and CLI. + Yes, I used it for some systems programming. Also used it to make a very + simple and robust web service digested by a variety of other developers at our + company. +

+ +
+ The only way is to learn and try both. That's what I did. Most of the info + from both sides is biased...Go is definitely very fast and [garbage + collection] is not the issue people make it out to be. I started last month + porting [a chess] engine to Rust. I recently took a break from it because the + syntax and borrow checking were getting insane to deal with. Once I learned + about the threading issues in Rust, I have put it on the shelf for now. Rust + is still evolving which is good and bad. It needs better IDE and Debugging + support than current levels. Hopefully that will continue to improve. There + was a big Mozilla shakeup (Nov 2020) where they let go of the Rust developers + and cancelled the project. AWS hired them. So honestly, I am not sure which + direction the language is going in. Meaning, now that AWS owns the braintrust, + I don't know where they are headed. My guess is that AWS is using Rust for + some behind the scenes script-like stuff. Not sure. Will be important in the + next year or two on which direction things end up going. For Rust to benefit + long-term, it needs the support of a corporate backer +
+ +

Rust is absolutely ready for production use.

+

+ Anti-Rust zealotry is just as strong as pro-Rust zealotry. The hype goes both + ways. No, your talking points shouldn't come from Reddit. +

diff --git a/drafts/latitude and longevity.html b/drafts/latitude and longevity.html deleted file mode 100644 index e69de29..0000000 diff --git a/drafts/latitude and longevity.php b/drafts/latitude and longevity.php new file mode 100644 index 0000000..e69de29 diff --git a/drafts/living with freebsd.html b/drafts/living with freebsd.html deleted file mode 100644 index e69de29..0000000 diff --git a/drafts/living with freebsd.php b/drafts/living with freebsd.php new file mode 100644 index 0000000..e69de29 diff --git a/drafts/living with linux.html b/drafts/living with linux.html deleted file mode 100644 index e69de29..0000000 diff --git a/drafts/living with linux.php b/drafts/living with linux.php new file mode 100644 index 0000000..e69de29 diff --git a/drafts/mpv is literally a flawless video player.html b/drafts/mpv is literally a flawless video player.html deleted file mode 100644 index 75c09a0..0000000 --- a/drafts/mpv is literally a flawless video player.html +++ /dev/null @@ -1 +0,0 @@ -talk about playlist auto-chapters from description timesttamps diff --git a/drafts/mpv is literally a flawless video player.php b/drafts/mpv is literally a flawless video player.php new file mode 100644 index 0000000..75c09a0 --- /dev/null +++ b/drafts/mpv is literally a flawless video player.php @@ -0,0 +1 @@ +talk about playlist auto-chapters from description timesttamps diff --git a/drafts/my first car is a 1953 hudson hornet.html b/drafts/my first car is a 1953 hudson hornet.html deleted file mode 100644 index e69de29..0000000 diff --git a/drafts/my first car is a 1953 hudson hornet.php b/drafts/my first car is a 1953 hudson hornet.php new file mode 100644 index 0000000..e69de29 diff --git a/drafts/oh sh*t (the case for better brakes and tires).html b/drafts/oh sh*t (the case for better brakes and tires).html deleted file mode 100644 index e69de29..0000000 diff --git a/drafts/oh sh*t (the case for better brakes and tires).php b/drafts/oh sh*t (the case for better brakes and tires).php new file mode 100644 index 0000000..e69de29 diff --git a/drafts/programs i use all the time.html b/drafts/programs i use all the time.html deleted file mode 100644 index fe7e63c..0000000 --- a/drafts/programs i use all the time.html +++ /dev/null @@ -1,41 +0,0 @@ -

- I'm going to break tradition with this site for a change. Normally I don't - like going back and changing old posts. I like keeping them the way they are - so I can time-travel a little bit without worrying about what I changed when. - This one is going to be different however. I'm going to use this page to keep - a running list of the programs I use really frequently (we're talking like - multiple times per day), what they're for, and maybe why I use them. Note that - these aren't scripts or tools that I've written. Those live on my Git repo. -

- -
    -
  • ImageMagick
  • -
  • mutt
  • -
  • newsboat
  • -
  • i3 (i3-gaps, i3blocks, i3lock)
  • -
  • zsh
  • -
  • sh
  • -
  • alacritty
  • -
  • cmdwatch
  • -
  • curl
  • -
  • dictd
  • -
  • youtube-dl, newpipe
  • -
  • doas
  • -
  • poudriere
  • -
  • dunst
  • -
  • entr
  • -
  • firefox
  • -
  • fusefs (sshfs, webdavfs)
  • -
  • ripgrep, sd
  • -
  • gimp
  • -
  • git
  • -
  • the core utilities (if it's in /bin, I use it a lot)
  • -
  • jail, bastille
  • -
  • wpg
  • -
  • htop
  • -
  • mbsync
  • -
  • vim
  • -
  • tmux
  • -
  • mixer, mixertui
  • -
  • picom
  • -
diff --git a/drafts/programs i use all the time.php b/drafts/programs i use all the time.php new file mode 100644 index 0000000..fe7e63c --- /dev/null +++ b/drafts/programs i use all the time.php @@ -0,0 +1,41 @@ +

+ I'm going to break tradition with this site for a change. Normally I don't + like going back and changing old posts. I like keeping them the way they are + so I can time-travel a little bit without worrying about what I changed when. + This one is going to be different however. I'm going to use this page to keep + a running list of the programs I use really frequently (we're talking like + multiple times per day), what they're for, and maybe why I use them. Note that + these aren't scripts or tools that I've written. Those live on my Git repo. +

+ +
    +
  • ImageMagick
  • +
  • mutt
  • +
  • newsboat
  • +
  • i3 (i3-gaps, i3blocks, i3lock)
  • +
  • zsh
  • +
  • sh
  • +
  • alacritty
  • +
  • cmdwatch
  • +
  • curl
  • +
  • dictd
  • +
  • youtube-dl, newpipe
  • +
  • doas
  • +
  • poudriere
  • +
  • dunst
  • +
  • entr
  • +
  • firefox
  • +
  • fusefs (sshfs, webdavfs)
  • +
  • ripgrep, sd
  • +
  • gimp
  • +
  • git
  • +
  • the core utilities (if it's in /bin, I use it a lot)
  • +
  • jail, bastille
  • +
  • wpg
  • +
  • htop
  • +
  • mbsync
  • +
  • vim
  • +
  • tmux
  • +
  • mixer, mixertui
  • +
  • picom
  • +
diff --git a/drafts/quarantine to vaccine: Corona Blues Review.html b/drafts/quarantine to vaccine: Corona Blues Review.html deleted file mode 100644 index e69de29..0000000 diff --git a/drafts/quarantine to vaccine: Corona Blues Review.php b/drafts/quarantine to vaccine: Corona Blues Review.php new file mode 100644 index 0000000..e69de29 diff --git a/drafts/rip-full-time-linux.html b/drafts/rip-full-time-linux.html deleted file mode 100644 index e69de29..0000000 diff --git a/drafts/rip-full-time-linux.php b/drafts/rip-full-time-linux.php new file mode 100644 index 0000000..e69de29 diff --git a/drafts/scrum, agile, kanban, springs, delivery.html b/drafts/scrum, agile, kanban, springs, delivery.html deleted file mode 100644 index 5e701c1..0000000 --- a/drafts/scrum, agile, kanban, springs, delivery.html +++ /dev/null @@ -1,5 +0,0 @@ -don't deliver stories, deliver value agile software development isn't something -you buy "Agile is Dead" https://www.youtube.com/watch?v=a-BOSpxYJ9M sprints and -stories matter less than releases and value. if you're using CICD and -continuously delivering value to your clients through your software, then which -sprint you're working on matters less. the scrum ceremony matters less. diff --git a/drafts/scrum, agile, kanban, springs, delivery.php b/drafts/scrum, agile, kanban, springs, delivery.php new file mode 100644 index 0000000..5e701c1 --- /dev/null +++ b/drafts/scrum, agile, kanban, springs, delivery.php @@ -0,0 +1,5 @@ +don't deliver stories, deliver value agile software development isn't something +you buy "Agile is Dead" https://www.youtube.com/watch?v=a-BOSpxYJ9M sprints and +stories matter less than releases and value. if you're using CICD and +continuously delivering value to your clients through your software, then which +sprint you're working on matters less. the scrum ceremony matters less. diff --git a/drafts/server closets in the summer.html b/drafts/server closets in the summer.html deleted file mode 100644 index e69de29..0000000 diff --git a/drafts/server closets in the summer.php b/drafts/server closets in the summer.php new file mode 100644 index 0000000..e69de29 diff --git a/drafts/stack-end-devs.html b/drafts/stack-end-devs.html deleted file mode 100644 index 7520133..0000000 --- a/drafts/stack-end-devs.html +++ /dev/null @@ -1,13 +0,0 @@ -slightly peeved we are not full stack developers, we are not front- or back-end -developers. we are computer programmers trying to solve a problem. that problem, -specifically is to automate, or reduce manual touch-time for a variety of tasks. -we are not mature enough as a team to be discussing our team's brand. we don't -even have one product as a team. we don't focus on one vs the other, we're focus -on making problems go away. we need general-purpose programmers who can -efficiently make those things go faster. we're not on a department-level -strategy. we're barely on a team-level strategy. we still have "developers" who -are staying up late doing manual deployments. we have developers with years of -experience rewriting functionality between "ends" because they're constantly -cloning huge amounts of data from one location to another instead of working on -a single subset. I don't have the answers to fix these problems but I almost -don't think it's specialization or rebranding that will make them go away. diff --git a/drafts/stack-end-devs.php b/drafts/stack-end-devs.php new file mode 100644 index 0000000..7520133 --- /dev/null +++ b/drafts/stack-end-devs.php @@ -0,0 +1,13 @@ +slightly peeved we are not full stack developers, we are not front- or back-end +developers. we are computer programmers trying to solve a problem. that problem, +specifically is to automate, or reduce manual touch-time for a variety of tasks. +we are not mature enough as a team to be discussing our team's brand. we don't +even have one product as a team. we don't focus on one vs the other, we're focus +on making problems go away. we need general-purpose programmers who can +efficiently make those things go faster. we're not on a department-level +strategy. we're barely on a team-level strategy. we still have "developers" who +are staying up late doing manual deployments. we have developers with years of +experience rewriting functionality between "ends" because they're constantly +cloning huge amounts of data from one location to another instead of working on +a single subset. I don't have the answers to fix these problems but I almost +don't think it's specialization or rebranding that will make them go away. diff --git a/drafts/surprisingly simple.html b/drafts/surprisingly simple.html deleted file mode 100644 index 840f1b2..0000000 --- a/drafts/surprisingly simple.html +++ /dev/null @@ -1,2 +0,0 @@ -who would win? python, pip, mysql, password storage, dockerfiles OR a really -long shell script one-liner? diff --git a/drafts/surprisingly simple.php b/drafts/surprisingly simple.php new file mode 100644 index 0000000..840f1b2 --- /dev/null +++ b/drafts/surprisingly simple.php @@ -0,0 +1,2 @@ +who would win? python, pip, mysql, password storage, dockerfiles OR a really +long shell script one-liner? diff --git a/drafts/used-refurb-2020.html b/drafts/used-refurb-2020.html deleted file mode 100644 index 87bd641..0000000 --- a/drafts/used-refurb-2020.html +++ /dev/null @@ -1,7 +0,0 @@ -

Used & Refurbished PCs in 2020? Yes, Please!

- -
    -
  • cost
  • -
  • availability
  • -
  • environment
  • -
diff --git a/drafts/used-refurb-2020.php b/drafts/used-refurb-2020.php new file mode 100644 index 0000000..87bd641 --- /dev/null +++ b/drafts/used-refurb-2020.php @@ -0,0 +1,7 @@ +

Used & Refurbished PCs in 2020? Yes, Please!

+ +
    +
  • cost
  • +
  • availability
  • +
  • environment
  • +
diff --git a/drafts/value.php b/drafts/value.php new file mode 100644 index 0000000..f638ed4 --- /dev/null +++ b/drafts/value.php @@ -0,0 +1,5 @@ +write (again) about adding value, not stories or code + +a large backlog isn't job security if your stories don't add value + +re-hash ADP presentation diff --git a/drafts/what is a script no really.html b/drafts/what is a script no really.html deleted file mode 100644 index 9d97844..0000000 --- a/drafts/what is a script no really.html +++ /dev/null @@ -1 +0,0 @@ -glues programs together diff --git a/drafts/what is a script no really.php b/drafts/what is a script no really.php new file mode 100644 index 0000000..9d97844 --- /dev/null +++ b/drafts/what is a script no really.php @@ -0,0 +1 @@ +glues programs together diff --git a/drafts/what is programming.html b/drafts/what is programming.html deleted file mode 100644 index 4b4e26d..0000000 --- a/drafts/what is programming.html +++ /dev/null @@ -1,5 +0,0 @@ -programming isn't coding programming is computational problem solving (see -CSCI101) programming is getting data from point A to point B see what -programming isn't about informal lecture being a good programmer isn't about -following best practices or paradigms. it's still possible to write bad programs -using test-driven development and "Clean Architecture" diff --git a/drafts/what is programming.php b/drafts/what is programming.php new file mode 100644 index 0000000..4b4e26d --- /dev/null +++ b/drafts/what is programming.php @@ -0,0 +1,5 @@ +programming isn't coding programming is computational problem solving (see +CSCI101) programming is getting data from point A to point B see what +programming isn't about informal lecture being a good programmer isn't about +following best practices or paradigms. it's still possible to write bad programs +using test-driven development and "Clean Architecture" diff --git a/drafts/your company isnt doing SRE.html b/drafts/your company isnt doing SRE.html deleted file mode 100644 index fdb1e5e..0000000 --- a/drafts/your company isnt doing SRE.html +++ /dev/null @@ -1,4 +0,0 @@ -your company probably isn't doing SRE Google SRE - embracing risk - 50% time is -for free thought and development if your "devops" are so busy doing ticket work -they're asking for you to hire, you're not doing SRE -https://sre.google/sre-book/introduction/ diff --git a/drafts/your company isnt doing SRE.php b/drafts/your company isnt doing SRE.php new file mode 100644 index 0000000..fdb1e5e --- /dev/null +++ b/drafts/your company isnt doing SRE.php @@ -0,0 +1,4 @@ +your company probably isn't doing SRE Google SRE - embracing risk - 50% time is +for free thought and development if your "devops" are so busy doing ticket work +they're asking for you to hire, you're not doing SRE +https://sre.google/sre-book/introduction/ -- cgit v1.2.3