July 30, 2018
Fasting Prayer of a Young Boy
That fasting is good for the soul.
And though I'm a lad of tender years,
I thought I'd give it a go.
My stomach rumbles, my head is faint;
Oh, this is how I'm brought low.
I perish! Unless I break this fast
I started ten minutes ago.
-
July 11, 2018
vdiff_sha_define_swap.vpatch
Recently I tried building vtools on a windows system running cygwin. I found that there was one function it barfed on, SWAP_BE64
. I did some digging, and I found the code was taken from busybox. I dug around a bit there, and I found where the thing is defined, so I copied that definition into my copy of the program, and it worked.
Keep in mind, this function seems to depend on the endianness of the machine, so in the busybox code there are a bunch of #IFDEF
s surrounding this definition. If you are using a big-endian machine then you would want to apply a different definition for this function.
This is a patch using sha hashing. There seems to be some movement leaning towards using the Keccak hash for vpatches (see this discussion and that following it), so I might have to get a Keccak hasher and regrind this later.
File vdiff_sha_define_swap.vpatch
:
diff -uNr vdiff_a/vtools/manifest vdiff_b/vtools/manifest
--- vdiff_a/vtools/manifest cece6cf281356c63d1f0a935d8f772345b51f63bc77ada2b70646b395036a22a88962e06661dee77977e1d434290adec5d76e540597bbd2213a36cb5890a8cf8
+++ vdiff_b/vtools/manifest 2e651c3ae3f563a3ee7f6a0cfbd3f18e76bf57f81615643e6df3c60f6d6a2d868a5ff9809de76184ee9779091d621ef088d5f695c2c7d9d5b0fd040d7173ab8f
@@ -6,3 +6,5 @@
Fixes C99 compatibity for __attribute__((noreturn)), vdiff support for "No newline at end of file" directive.
2018-04-07 phf
Fixes for xalloc's use of static inline courtesy of spyked.
+2018-06-28 PeterL
+Added definition for SWAP_BE64 in sha.c (valid for littleendian system).
\ No newline at end of file
diff -uNr vdiff_a/vtools/src/sha.c vdiff_b/vtools/src/sha.c
--- vdiff_a/vtools/src/sha.c 8ef7baea0ae21e44b34318a0202e3a7c4ca1fe4df6c1a8a29d8a5eeee930926968ea9bd062c514460208bf89e2fa4ec958950c3776b47513cd5979961e4182c6
+++ vdiff_b/vtools/src/sha.c 3eac373f23f903ef55354750cf8921a705aefa2cb61a1e8acc0fc091fc357b434fd0598822f90beaa1d1c4ecf4ede4d2184eb12764f806d304fc70575967a4a5
@@ -3,6 +3,9 @@
#include
#include
+/* SWAP_BEnn means "convert CPU<->big_endian by swapping bytes" */
+# define SWAP_BE64(x) __bswap64(x)
+
/* \url{https://git.busybox.net/busybox/tree/libbb/hash_md5_sha.c} */
static inline uint64_t rotr64(uint64_t x, unsigned n) {
And here is the signature for the file, vdiff_sha_define_swap.vpatch.PeterL.sig
:
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAABAgAGBQJbRsWTAAoJELTi4Nystj0ltSUP/A9V+5pjBVYr6qOZLOYCOF6c
/pU4YvdVW9sMc6EZ/p0Vdq6bWGr/RIhkgMiPsHhnxsdHS6xSpEFGWOMj+mzOBjRd
7sJl3GEZ14kKbweP+Z/Uwky/yYG5MAKORLBGb24HF+aBdShq3GqQFcd2B9Rb/F3g
YgIwLY4gVBsFFgjTBR47/9rXJAgpJKb3S/dPQ3sdWoLXb1ZO4ayZfzcjeCmEpuyq
DbjSbPiiHvfoTSJ4/N8UdNSAccV1UKofnpnnhQ4A43mEQ3T00Q7tnI7NzW3wLD3K
3PPEQOduAffdrPbliigVLQhDOzHiIyuQhENVI7N8IQwUxvjF6RJ3A+YWHeMAvLf9
yTOf7DSIUWMee4YX02ZhPvclomrG9+PRJUkDsk7LqwoNxVEo5ZeXlPFIE4zBYQZg
F+my5bNl4OqJzJT/0voMMza6oDNXIigX/kSqJuCEuQ+dMX0XgbiejX94GmAWO+qB
DuyQuYCdslH8dVmEd1UBKQKL/6or6HFxTOSDDUUdfcRBbrWLFdToyaWMxIz3Ea5z
m8hcDi+olE5yTKz6DAvy0SDrOwlOk0cCXoeo1XuiVVwfdzRiYPFKWkWFqFleZghm
FIZif8TuRJl6LunzV2L9P2RZn2sNuN59cuwC0e7+7XW1XroP1VPmLNP+/yaeK/gR
kdTB76aB/ebzaUXqV+U4
=rxQr
-----END PGP SIGNATURE-----
-
Chicken Potato Soup
This is a yummy soup with lots of flavors. I made this soup in an InstaPot (electronic pressure cooker), but you could also make it more traditionally in a pot on the stove.
Ingredients
- 1 Tab butter
- 1 Tab cooking oil
- 3 cloves garlic, chopped finely
- About a pound of chicken breast, cubed into about 1 inch pieces
- About a pound of potatoes, cubed into about 1 inch pieces
- 1 yellow squash, cubed into about 1 inch pieces
- 2 cups chicken broth
- 1 tsp pepper
- 1 tsp thyme
- 1 tsp Garam Masala
- 1 lemon
Procedure - InstaPot
- Turn the InstaPot on with "Saute" mode. Add butter, oil, and garlic, stirring frequently. Once the oil is hot, let the garlic cook a minute until it gets soft.
- Add the chicken. Stir frequently, cook until the chicken is slightly browned on the outside.
- Add the potatoes, squash, broth, pepper, thyme, and Garam Masala. Stir everything together.
- Cut the lemon in half, squeeze the juice out of both sides into the pot.
- Close the InstaPot, cook on the poultry setting for 12 minutes.
Procedure - Stovetop
Proceed as above, saute the garlic and chicken on medium-high heat. Add all other ingredients, and add water to cover all ingredients, bring to a boil. Reduce the heat to a simmer and cook until the potatoes are soft (check by poking them with a fork).
-
July 10, 2018
Beaches
The first beach we visited was at the campsite; this was Lake Huron, but within the shadow of the Mackinaw Bridge. The water was cold but refreshing compared to the summer heat. This beach had some sand, but was mostly rocks. It was a perfectly clear day, with no wind, and so there were very little waves (perhaps 6 inches). It should be noted that the water here is amazingly clear, such that you can stand in water up to your shoulder and still see every detail on the bottom.
The next day we traveled north into the Upper Peninsula. We visited Tahquemenon Falls. It was a nice ten minute hike in the woods to see the falls, which were fun to see but I feel they are a bit over-hyped. We stopped at the first little beach area we came to on Lake Superior, but the beach was entirely make of very sharp rocks, so we didn't stay long. We then had lunch at a little diner in Paradise, MI, where we were directed by the waitress to a beach a bit further down the coast. This turned out to be on the south shore of Whitefish Bay, and it was a beautiful beach made entirely of amazingly soft sand. We had the beach almost to ourselves and played for several hours. The water was cold but bearable, with about one to two foot waves. Being on the south side of the lake, the trees here give shade onto the beach, which is nice for those of us like my family who are pasty white and sunburn easily.
The next beach we visited was on Lake Michigan. We drove about ten miles west of St. Ignace on US 2, at which point the highway runs right along the lake shore. We parked on the side of the highway and jumped in the water. This beach is entirely made of very fine sand, which is fun to play in but gets everywhere: into your clothes, into your towel, into the baby diaper, into the bag of chips, etc. There were also no trees here, the closet trees were about 100 meters the other way from the highway (the water is about 20 meters from the road), and so sunscreen is a necessity here. The sky was cloudless, but the wind had picked up some and so we spent all afternoon playing in the two to three foot waves.
-