Tuesday, September 03, 2024

Puerto Rico Adventure - Day 1

[Composed July 29, 2024]

Today we nominally started our trip to Puerto Rico. With a smooth evening flight, we made it as far as Jacksonville, FL. C is traveling with us and that did make for two moments in the trip that made Shira and me smile.

The first is that we got to introduce C to the American Airlines Admiral's Club. Ahh yes, a taste of the good life: and she thoroughly enjoyed it. Who wouldn't, with unlimited macaroons and donuts on hand?

The other moment came as we found our seats on the plane. Because C is now 15, we can sit in an exit row. 'Ugh,' she groaned as we started organizing ourselves in our seats. 'I can't reach my bag, this is so annoying.' That annoyance, we explained, is because the exit row comes with extra legroom. This resource that I so cherished she saw through a different lens: her carry-on tucked under the seat in front of her, was no longer within reach. She cracked us up.

While today marks the beginning of our Puerto Rico trip, it also marks the completion of C's personal adventure. For the past week she had been volunteering at Arlington County's Civil War Spy Camp. Being a camp counselor was all new territory for C, and we couldn't have been more proud of how she handled the challenge.

But it wasn't just serving in a new role at camp that made the week special. We did a heap of activities, including hiking on the AT, axe throwing, visiting with cousins and bowling. She completed her driving permit's training course (earning a 95% on the final test!) and got some serious touch-typing practice in (Thanks typingclub.com! You rock!). She traded the majority of her screen time for reading time*, getting to fall in love with both the Song of Lioness and Last Air Bender graphic novel series. She mastered making corn tortillas from scratch, and I learned the secret to making a meal C will love: add more cheese!

Did she love every minute of her Uncle and Aunt's boot camp? Yeah, no. But she totally rose to the occasion and instead of vegging out during one of her last weeks before school, she crushed it.


*Have no fear, C still got plenty of screen time. It just wasn't the portion size she was used to.

Friday, August 30, 2024

gptel: Mindblowing integration between Emacs and ChatGPT

ChatGPT and its LLM brethren have been a potent source of FOMO: the AI revolution is happening, and I feel like I'm forever late to the party. After getting comfortable with OpenAI's web interface and coding my own command line tool, I figured it was time to complete the trilogy by integrating an LLM AI into Emacs.

As with many topics, there were a number of available Emacs packages, and it wasn't immediately obvious which was 'the best.' And then I watched this (to me) blandly named YouTube video: Every LLM in Emacs, with gptel and was hooked.

This 17 minute video blew my mind. If you're remotely interested in emacs and LLMs, stop reading this post and go watch this video. Heck, watch it a couple of times. In it, the gptel package developer goes through the why and how of gptel, and demonstrates some next-level uses of this package.

So gptel is my answer for adding them magic of ChatGPT to Emacs. gptel can be used both interactively and programmatically. I've found the former capability let's me have a running conversation with an 'assistant.' I can get answers to coding, writing or any other question on my mind without having to leave Emacs. Score.

But interactive use is just the beginning. By leveraging gptel-request, it's possible to automate common patterns. For example, I can set the region to include a word and run bs-gptel-define-word. In a few moments, ChatGPT will come back with a definition, examples, synonyms and antonyms. Here's the definition this function reports for FOMO:

In some respects, this is hardly exciting. There are a number of dictionary services are already integrated into Emacs, so why bother hand coding another? Yet, using gptel has two advantages. First, by changing the prompt, I can easily adjust the output. For example, here's the FOMO definition with a prompt that asks for active and passive voice examples:

The other benefit of using gptel for definitions is that the universe of what's considered a definable term is far larger. For example, I can ask for the 'definition' of a CSS property box-sizing: border-box.

Heck, it even handles slang. Here's the definition of slang: what the sigma

This would have been handy when we were traveling with our nieces and nephew, and this phrase came up repeatedly.

Another example of automating a task by leveraging gptel is gptel-proof. This is an early attempt at coding a proofreading tool within Emacs. The package works by taking an arbitrary region of text and asking ChatGPT to fix the spelling and grammar. The result is embedded back in the original document, surrounded by the familiar version control conflict markers. For example, here's what I see when I proofread this paragraph.

By using the conflict markers, I can use M-x vc-resolve-conflicts, to interactively compare and adopt the improved text.

What I like about this approach is that I don't need to blindly accept the LLM's changes. By using ediff, I'm combining both the magic of AI with the magic of emacs, to make, well, more magic. It's magical. A

This all feels like a very awkward start to using such a game-changing capability. But, at least I've started!

Here's some additional inspiration on the topic: Integrate Emacs with ChatGPT or any LLM, Powerful AI Prompts I have Known and Loved - that you can use, and Emacs pinky Saver: a voice driving GPT4 co-worker for emacs. together.ai is a platform for letting me interact with more LLMs than just ChatGPT.

Monday, August 19, 2024

Review: The Lost Apothecary

I randomly picked up The Lost Apothecary, by Sarah Penner, from my Mother-in-Law's (z"l) bookshelf, read a few pages and was hooked. F from there, I couldn't put it down. In short, while it's not perfect, it was a delightful read and one that was both entertaining and thought-provoking.

Spoilers Below. Go read the book.

The plot, the philosophizing, the characters, I'm here for it all. I appreciated the symmetry and timelessness of both the historic and modern-day story and was impressed with how poisons were tied into both. I fell into every trap Penner set for me, from thinking that James may be a decent guy to thinking Eliza was dead. I'm sure a more observant reader would have picked up on the (in hindsight) obvious clues; but not me.

I liked the story enough that I was fine with suspending my disbelief that a property in downtown London would lay untouched for hundreds of years. And the fact that just about every man in the text is some degree of sleazeball, well sure, why not. Girl power for the win!

I generally appreciated the book's philosophizing. When Caroline challenges that there's a difference between being happy and being fulfilled, I found myself agreeing. Clearly delaying gratification for a bigger goal is a powerful life skill. But what are the limits of this? More than anything, I appreciated that the book gave me a chance to chew on these ideas.

I also appreciated Nella's mission of capturing the names of the women she helps in her registrar. That humble act was a way of recording for posterity that which would normally be forgotten. One of the missions of my blog is to do the same: to try to leave a mark, however insignificant, for those to find in the future.

So yeah, Penner had me. That was, until the last two pages of the book. When Caroline decides that Eliza and the vial would be "one secret I would not share." I found myself mouthing a slow-motion 'Noooooooooo' as she chucked the vial in the Thames.

This decision to withhold Eliza's story from her research struck me as flawed in a number of ways. First off, it seems to have the ethical equivalence of a police officer planting evidence 'just this once.' And more to the theme of the text, isn't Caroline's goal to bring stories of regular people to life? Hiding Eliza and the physical evidence she existed seems directly counter to this.

Respecting the story itself, Eliza's elixir fended off hypothermia. If such a concoction could be replicated in the lab, Eliza's 'magic' could have potentially life-saving implications. How could Caroline not see that there's an opportunity to not just tell Eliza's story, but have it be elevated into one of discovery and world impact?

If you're looking for a fun, fast paced, historic read The Lost Apothecary may be just the tonic you're looking for.

Friday, August 16, 2024

Buzzard Hill, Appalachian Trail Hike - Close to DC, Far from Easy

[Composed: 7/2/2024]


Buzzard Hill is one of those hikes that looks perfect on paper: close to DC, relatively short (only 4'ish miles!) and with at least one notable feature, in this case, a waterfall. The hike is a tiny section of the Appalachian Trail, so it's easy to extend and could be turned into an overnight with ease. With all this going, how could the hike not be a winner?

With our niece C in town, we wanted to get some hiking time in. She expressed an interest in going on the AT so Buzzard Hill seemed like the perfect fit.

About 10 minutes in, I realized that this hike wasn't the slam dunk I'd hoped for. We were smack dab in the infamous section of the 2,197-mile AT, affectionately known as the 'Roller Coaster.' While the climbs weren't massive, they weren't trivial either. Up and down we hiked, and I realized that this trail wasn't the gentle introduction to the AT I'd hoped for. This was work, and after a summer of gaming and watching Netflix, C was feeling the grind.

We took the side trail to the waterfall and it was OK. There were multiple levels of waterfall to explore, but the rocks were wet, and the whole area was fairly treacherous. So while the waterfall wasn't a bust, it also didn't quite make up for the sweat equity spent getting there.

From the waterfall, we continued on to Buzzard Hill. More uphill. There's a very nice campsite at the summit, along with hints of great views. Alas, the vegetation makes it so there's no clear vista. Like the waterfall, it earns a 'nice but not spectacular' rating.

For nearly the entire length of the trail, pawpaw trees lined the path. Unfortunately, we only saw a couple of fruit, and they weren't ready to be harvested. Still, during the right time of year, this hike would be a glorious foraging location.

Another notable find on the trail was the '1000 miles from Georgia' marker. This helps put the AT in context, and you realize that for through-hikers this section of trail will hold a special place in their hearts.

I was excited to give C a first introduction to the AT. The thick tree cover provided for a maximum green-tunnel effect, but in this case, it helped keep us cool. We saw a bit of wildlife: a turtle, frog, a number of fascinating bugs, and a skink. Alas, we didn't see a wendigo like C had hoped for. Oh well, maybe next time.

Most importantly, I now appreciate that Buzzard Hill isn't an ideal option for introducing folks to the AT. What it gains in being close to DC, it loses in the elevation gain. It may have been a 4-mile hike, but it felt like a 10-miler.

Maybe I'll come back with Shira in the winter when we can roast hot dogs at the summit and take in the views. Or maybe I'll crack the pawpaw code here, and we'll come back for an epic haul.

Regardless, it was a real pleasure to hike with C. Whatever exhaustion she incurred helped save the next unfortunate soul we might have dragged out for a 'quick hike on the AT.' For that, C is a hero.