new

Blood tests reveal that the Coronavirus COVID-19 originated before September 2019 and China knew and hid its origins

COVID-19 antibodies have been found in blood samples as early as September, 2019. China knew about the virus' transmission to humans months before it announced such to the world. Why has the media and our government not investigated this gross negligence, if not mass murder? Continue reading



  • Accountants CPA Hartford
  • Articles
  • 39 blood samples positive for coronavirus antibodies
  • Blood tests reveal that the Coronavirus COVID-19 originated before September 2019 and China knew and hid its origins
  • CDC study
  • Chinese President Xi Jinping
  • coronavirus pandemic
  • COVID-19 a 'global fraud' by China that cost American lives
  • Dr. Anthony Fauci
  • Dr. Anthony Fauci went on Fox Business Network's "Bulls & Bears" to reassure Americans they could trust the Chinese government
  • DR. BRUCE AYLWARD
  • Dr. Li-Meng Yan
  • global fraud
  • italy
  • More than a year into the pandemic we still don't know its full story
  • Ron Klain
  • Ron Klain Joe Biden's pick for White House chief of staff told Axios on Jan. 27 that China has been "more transparent and more candid than it has been during past outbreaks"
  • South America
  • The coronavirus pandemic is a global fraud perpetrated by China abetted by the powerful
  • WHO.

new

The new fascism is the woke industrial complex consisting of big US corporations and the big governments of China and the United States

And so that is what I call the birth of this woke industrial complex. It is a new leviathan, a new monster, that is far more powerful than what Thomas Hobbes might have envisioned 400 years ago, and it is the biggest threat to individual liberty today. It is not big government alone. Its conservatives are reciting lines that they memorized in 1980, thinking that big government was the threat to individual liberty. Maybe it was in 1980. It's not today. It is this new hybrid of big government and big business and big government not just in the United States but big government in places like China, co-mingled with big business creating the actual threat to our liberty and our prosperity. Continue reading




new

A new pen clip for AxiDraw

Tiny product update: A new version of the pen holder for AxiDraw, with slots for quick adjustment between the vertical and 45 degree angle positions.




new

News Corp Responds to the Market for “Free”

The newspaper industry has faced a mighty challenge over the last few years. There is so much “free” content to complete with them. Newspaper revenue continues to plummet. Internet users are reluctant to pay for content. All the free content, supported by advertising revenue, has decimated the newspaper industry. The industry’s cousin, the magazine industry, is not far behind.

This trend can’t continue forever. Already, many people are asking themselves how much they can trust the information on the internet. The need for Reliability drives the demand for Snopes.com. How many “free” web sites can earn enough from advertising to pay all their bills? An effective industry answer to “free” may be forthcoming in the News Corp online newspaper called “The Daily.” The Daily will cover general news, sports, arts and opinion in a format dedicated to the Apple iPad. In addition to the written content, the product will carry high definition video and 360 degree photos. The same product will be available in a few months for the Android-based tablet computers.

The Daily will sell for $.99 a week, or $39.99 a year, a very low price compared to newspapers. With this model, the product receives revenues both from the subscribers and from advertisers. Subscribers have the Reliability benefit of knowing that the content producer cares about facts, accuracy and readable writing style. Advertisers pay for eyeballs that follow a Reliable product.

The Daily is what we call a Next Leader product. This is a product that offers much better than industry standard performance for a low price to a specific subset of industry customers. The Next Leader can offer the very low price because it has a much lower cost structure than is typical in the industry. There are two basic types of Next Leaders. The first are Reformer products. This type of Next Leader product reduces the benefits for the user (usually Function benefits) while increasing the benefits for the buyer (usually Reliability and Convenience benefits) compared to the industry Standard Leader product. The second of the two types of Next Leader products are Transformer products. These products increase the benefits of the user but offer, at least initially, fewer benefits to the buyer than the Standard Leader product offers. The Daily is a Reformer product. It offers the Convenience of formatting fit for a tablet computer so it provides easier access for a segment of the industry’s customers. Its low cost structure results from its elimination of printing presses and distribution costs.

If this new tablet-based product offers a quality read, it will hasten the day when virtually every newspaper and magazine is offered first online and only secondarily in hard copy. The online versions will come at a fraction of the cost of the hard copy versions. Readership is certain to grow.




new

A New Friend

So this weekend, I made a new freind. Her name is Cuda, and she is a very special dog.







She lives all the way on the other side of our big country. She came here with her people to be in a dog show. She also works hard to show people that you need to be responsible.







My dad said she took 3rd place in her dog show, but I think he is kidding me .....





I can tell she is a winner !!!!




- Jonny




new

Two Weeks With My New Knee


It has been almost two weeks since my surgery and it has been boring. I have destroyed two and a half beds and let myself out of my crate one time before she put carabiners on the door. Also, I have destroyed one hard plastic cone,
one nice soft cone that was borrowed and now my mom has to find a new one to replace it,
one horrible blue donut thing from my last post, one pair of pants,
and one stuffy. The stuffy was my reward for not destroying anything on Friday.
I have not removed any of my sutures though. I'm sure everyone will be proud of me for that.

Today my mom stayed home with me to talk on the phone, make faces at paper and stare at the computer all day. I got to go outside and spend some time helping her talk on the phone while staring at paper. It was nice and sunny so I nibbled on some grass,
checked on some of the plants,
and looked for my squirrel friend (without running over and looking up his tree).
Ubas are meant for bouncing and running and having fun. There is nothing fun about all this sitting around in crates. I feel a whole lot better, my knee isn't acting so naughty and I keep telling her I'm healed, but she doesn't believe me. She says I have WEEKS more to go before I can jump and twirl and leap and play with my flirt pole. I only had a tibial crest transposition, a wedge recession sulcoplasty and lateral fascial imbrication. Can someone please tell her that my knee is all better now?

hugs,
Uba




new

Newsletter subscription update

 I have to change platforms for the newsletter.

Mailchimp cuts off free use at 2000 subscribers and there were (a lot!) more of you than that.


I've switched to TinyLetter, but they ask that instead of just importing names, people subscribe.

It prevents a lot of bounce backs from stale addresses.


So, if you want to get the newsletter (and of course the reason this is happening is there's one in the works) just click here to resubscribe.


If you don't, no worries.




new

Meet the VMAX VX2 Pro scooter – Your new favorite ride

NEWS – The VMAX VX2 PRO. This isn’t just any electric scooter; it’s a Swiss-engineered marvel that’s changing the game for urban commuters and thrill-seekers alike. Power That Packs a Punch Let’s talk power, because that’s where the VX2 PRO by VMAX really shines. This electric scooter comes with a 500-watt motor that can peak […]




new

Funwhole Christmas Newsstand Building Block review

REVIEW – Fall is here, and the weather has turned chilly at night.  That means Christmas is coming soon, and before I can say “Jingle Bells” it will be time to decorate the house.  While many of the decorations in our house are traditions that have been used for years, we are always up for […]




new

THE SPELLSHOP is an instant New York Times, USA Today, and Indie Bestseller!!!

THE SPELLSHOP IS A NEW YORK TIMES BESTSELLER (#7), A USA TODAY BESTSELLER (#13), AND AN INDIE BESTSELLER (#10)!!!!!!!! I’M SOBBING!!!! Thank you so much to everyone at Bramble/Tor/Macmillan who made my dreams come true, including the incredible Ali Fisher, Dianna Vega, Caro Perny, and Julia Bergen! Thank you so much to my amazing agent Andrea Somberg who has been with me for 18 years and 28 books! And thank you to the wonderful booksellers and readers who made this possible!!!! I love you all so much!!!







new

New ebook editions of Hominids and its sequels

I’m thrilled to announce new ebook editions of my Hugo Award-winning novel Hominids, its Hugo Award-nominated sequel Humans, and the bestselling final volume Hybrids. Together, they are the Neanderthal Parallax trilogy, which won the Canadian Science Fiction and Fantasy Award (“the Aurora”) for best work of the entire decade. The trilogy tells of a parallel […]




new

TIFF Day 7: Concert Films are the New Concerts

Beans [Canada, Tracey Deer, 4] As the 1990 Oka standoff envelops her Mohawk community, a shy tween achiever (Kiawentiio) decides to toughen up by ingratiating herself to the tough kids. Mixing the docudrama and coming-of-age structures offsets the inherent trickiness of both, but it wouldn’t work without an appealing and touching performance from its charismatic young lead.

Akilla’s Escape [Canada, Charles Officer, 4] Weed dealer hoping to leave the business (Saul Wiliiams) tries to recover his boss’ ripped-off cash and product without sacrificing a young gang member who reminds him of his younger self. Moody, laconic crime drama contextualized by the political history of Jamaican gangsterism.

Williams, a recording artist, also supplies the score. The kinds of films that play at the festival often economize by favoring black credit  screens over full title sequences, so it’s always a bracing change of pace to see a well-done one. The title sequence for this not only delivers a welcome jolt of mood and energy but does a lot of the storytelling work that would otherwise have to be done with expository dialogue.

New Order [Mexico, Michel Franco, 4] A wedding thrown by a wealthy family during a growing insurrection suffers a murderous attack by protestors and the kidnapping of the bride. Wildly disturbing vision of political violence and degradation takes its time unreeling its allegorical purpose.

David Byrne’s American Utopia [US, Spike Lee, 4] Filmed version of the Broadway version of David Byrne’s recent tour features joyous choreography, simple but arresting stagecraft, and songs from his Talking Heads and solo eras. When you shoot a concert film featuring David Byrne, you have to bring it, and Lee does that ably, finding countlesss different ways to shoot within a proscenium.

David Byrne has always been a hugely important artist to me, but I was surprised how moved I was to get to feel that I was at a live concert.


Capsule review boilerplate: Ratings are out of 5. I’ll be collecting these reviews in order of preference in a master post the Monday after the fest. Films shown on the festival circuit will appear in theaters, disc and/or streaming over the next year plus.



  • toronto international film festival

new

Maps of the News - December 2009 Edition -


Since our inception as a division of the National Geographic Society in 1915, National Geographic Maps (originally the Cartographic Division) has routinely published maps that illustrate the news of the world. Our first supplement map, which appeared in the May 1918 issue of NATIONAL GEOGRAPHIC, titled the Western Theatre of War, served as a useful reference for overseas military personnel and soldier's families alike. Similarly our February 1967 map of Vietnam, Cambodia, and Laos, and recently, our Iraq and the Heart of the Middle East titles filled similar roles.

Maps are an excellent tool for the newshound, providing an accurate sense of place to issues local and abroad. To assist those that are interested in further understanding global news stories through good maps - we're pleased to announce a new monthly feature here on Contours that will highlight maps pertinent to today's news stories.

:: December 2009, Maps of the News ::

Afghanistan and Pakistan. Revised in Fall of 2009, this political map of the region contains thousands of place names, ideal for following news stories and deployed family members. Like all National Geographic cartography, our new Afghanistan and Pakistan map was carefully researched and edited and contains thousands of place names.

Iraq, Iran and the Middle East. This region dominates daily news stories. Our Middle East wall map covers over 18 nations in the region including: Iran, Iraq, Afghanistan, Pakistan, Syria, Jordan, and more.

Philippines. Follow the recent eruption of the Mayon volcano in the Philippines, with our Asia classic and executive style wall maps for the continent.

Vancouver and the Winter Olympics. A detailed city guide, perfect for global travelers attending the 2010 Winter Olympics.


Brazil and the Summer Olympics. As Brazil enters the limelight and begins preparations for the 2012 Summer Olympic games in Rio, our Brazil wall map makes an ideal addition to your map collection. Completed in the summer of 2009, this large 41" x 41" wall map is one of the most detailed maps available for the country.




new

Maps of the News - January Edition

January has been a big month for global news. From the devastating earthquake in Haiti to the damaging storms throughout the US which brought mudslides to California and snow to Florida.

On a more positive side, the Winter Olympics in Vancouver start in just 16 days, with opening ceremonies taking place on February 12th.

To illustrate these stories and more - here are this month's suggested National Geographic Maps:

Haiti::
West Indies Two-Sided Wall Map:: Has a political map of the Caribbean, including Haiti. For a historical perspective on the region, NATIONAL GEOGRAPHIC published three different supplement maps in 1913, 1922, and 1947 which specifically detailed the Caribbean region. These maps are available via our NG Map Collection Website - simply search for "caribbean".

US Weather::
National Geographic has a wide variety of US wall maps. Our most popular two titles are our US Clasic and US Executive editions. Both maps come in a variety of sizes and formats including enlarged and laminated. Additionally we started publishing a new series of State specific wall maps last year, and have released 8 States so far, including California.

Winter Olympics::
For those lucky enough to be heading to Vancouver to attend the 2010 Winter Olympics, be sure to carry along our Destination Vancouver city travel map. Updated in 2009, the Vancouver city map contains a detailed and easy to read street map with the locations of points of interest, hotels, public transportation and more.

Check back in a few weeks for our February installment of "Maps of the News". Additionally, we love your questions and comments. If you have a place or news story that you're looking for a map of, feel free to post a comment below, or connect with us on twitter @NatGeoMaps.




new

Maps of the News - March 2010

For those actively following the World's news, here is our monthly quick reference to National Geographic maps which add perspective to today's news stories.

WORLD

The 8.8 Magnitude earthquake in Chile, has left substantial devastation to the port town on Concepcion and left thousands homeless in the Capital city of Santiago. Our recently updated South America Wall Map contains place names for most major and secondary cities, plus physical features, and major transportation networks.



When I first heard about the Tsunami threat for the Hawaiian Islands, Australia, Japan and the islands of the Pacific on Saturday, I turned to our World Pacific Centered wall map. Unlike the wall map you likely had hanging in your classroom, which was Atlantic Ocean centered, our Pacific Centered edition provides a seamless view of the entire Ocean. This different perspective made it easier to understand the path of the Tsunami waves and helped clarify why places such as the California, Oregon and Washington coasts were under the warning as well.

Beyond the Chilean earthquake, this winter seems especially harsh, and on Sunday, France and four other countries were battered by a deadly storm named "Xynthia". In its wake the storm left 51 dead, millions without power, and generated extensive property damage throughout the region. Winds in excess of 130MPH were recorded over the Pyrenees with 100 MPH gusts along the Atlantic coast. National Geographic has a collection of up-to-date reference maps for most of the countries in Europe including: France, Belgium & The Netherlands, Spain & Portugal, and Germany. Additionally we recently revised our Europe wall map, which is available in several styles.


US

Here on the home front, winter weather continued to make headlines last week with the Northeast receiving another record breaking snowfall. National Geographic publishes a wide variety of United States Wall Maps, varying in style, size, and format that will assist with following nearly any US based news story.

The Tsunami warning for the Hawaiian Islands last Saturday had me turning to one of our most beautiful wall maps, The Hawaiian Islands, which exposes the dramatic terrain of the ocean floor around the island chain.




SPORTS

Now that the Winter Olympics have concluded, it's time to turn our eyes south to Arizona and Florida as MLB Spring Training kicks off today. If you're heading to watch any of the games, we have two useful maps for your glovebox, the Florida State Guide Map and the Arizona State Guide Map. Both maps have up-to-date road networks for the State, plus detailed inset maps for the major cities, like the Spring Training hubs of Tampa, Ft. Myers, Scottsdale and Tucson. While I'm a big fan of GPS for turn-by-turn directions, sometimes its just a little faster to use a real map, and you certainly get a better perspective of what's ahead when on a road trip.



As always - we love to hear your comments, questions and ideas for future posts.




new

Great write up by The Oregonian on our new Washington Cascades trail maps...

Five new National Geographic maps complete coverage of Washington Cascades

Published: Tuesday, September 07, 2010, 3:15 AM
Terry Richard, The Oregonian
Washington's Cacades are covered.

With the release of five new maps this summer by National Geographic, the rugged mountains of Washington are covered from the British Columbia border to Oregon.

The maps are sold under the Trails Illustrated brand.

New titles this year area Mount St. Helens/Mount Adams, Goat Rocks/Norse Peak/William O. Douglas Wilderness Areas, Alpine Lakes Wilderness, Glacier Peak Wilderness and Mount Baker/Boulder River Wilderness Areas.

They go along with several other titles already in print to complete the coverage: North Cascades National Park, Mount Rainier National Park and Columbia River Gorge National Scenic Area.

The full-color maps are printed on hefty water-proof, tear resistant paper. National Geographic is one of the best mapmakers in the business, so the maps meet the highest standards.

The maps are topographical, but they cover such a large area that the contour interval is 50 feet. This is a little too big for serious off-trail mountain navigation, but National Geographic also sells state map series on CD Roms under the Topo brand with 20-foot contour intervals.

The new printed maps maps are excellent for hiking and driving. They show most of the trails and most of the roadside amenities, in easy-to-read formats.

Your map files may already contain U.S. Forest Service maps of the areas, but these maps often go 15 years or more between updates. The new Nat Geo maps are the best new maps at this time for the areas they cover.

Look for them at stores that sell maps, though getting this many new titles in any particular store may be difficult.

One place that does have them all is the Nature of the Northwest in Portland, at 800 N.E. Oregon St., Suite 965. Phone number is 971-673-2331.

You can also order them from National Geographic. Cover price is $11.95. For more information visit Trails Illustrated Washington maps.

-- Terry Richard





new

New program will see pregnant mothers and babies protected from life-threatening virus - SBS

  1. New program will see pregnant mothers and babies protected from life-threatening virus  SBS
  2. World-leading approach to protect babies from RSV  Department of Health
  3. Government-funded RSV vaccines to protect infants from severe disease  Australian Pharmacist
  4. 'Very scary': Wagga mum's plea for parents to protect babies through RSV jab  The Daily Advertiser
  5. Guild backs free RSV vaccinations  Australian Journal of Pharmacy






new

Streaks of fire are about to take over Australian skies during the Leonid meteor shower. Here’s how to see them - nbnnews.com.au

  1. Streaks of fire are about to take over Australian skies during the Leonid meteor shower. Here’s how to see them  nbnnews.com.au
  2. The Northern Taurid meteor shower could produce fireballs. Here’s how to watch  CNN
  3. Northern Taurid meteor shower hits peak activity this week: When and where to watch  USA TODAY
  4. Leonid Meteor Shower May Put on a Surprise Show This Week  ScienceAlert
  5. Starwatch: Leonid meteor shower returns to skies in November  The Guardian












new

Outback Queensland residents spend thousands on flights, grapple with Qantas service changes - ABC News

  1. Outback Queensland residents spend thousands on flights, grapple with Qantas service changes  ABC News
  2. Airlines that love competition: Do you see pigs fly?  Sydney Morning Herald
  3. Predictably, domestic airfares surged after the collapse of Rex. There aren’t many good solutions  The Conversation
  4. Report finds just how much airfares spiked since end of Rex. One route doubled  The Canberra Times
  5. Qantas’ single excuse for fare price hike  news.com.au




new

Beijing and Washington stops provide clues for Indonesia's direction under Prabowo Subianto - ABC News

  1. Beijing and Washington stops provide clues for Indonesia's direction under Prabowo Subianto  ABC News
  2. Prabowo pledges co-operation with Trump  The Australian Financial Review
  3. Indonesian president meets Biden and speaks with Trump  The Canberra Times
  4. At White House, Indonesia's new leader straddles US-China rivalry  VOA Asia
  5. Will Prabowo Subianto cosy up to Donald Trump or to China?  The Economist




new

Germany to hold snap election in February after government's coalition collapse - ABC News

  1. Germany to hold snap election in February after government's coalition collapse  ABC News
  2. The briefcase, the Porsche and the collapse of the German government – podcast  The Guardian
  3. Germany set for snap election following collapse of Olaf Scholz’s coalition  The Conversation
  4. President calls German early election plan 'realistic'  DW (English)





new

Murder charge after beloved Elvis impersonator found dead after karaoke night - 9News

  1. Murder charge after beloved Elvis impersonator found dead after karaoke night  9News
  2. Beloved Elvis impersonator allegedly murdered after karaoke night  Sydney Morning Herald
  3. Love Island winner's best mate is accused of killing beloved grandad - after the Good Samaritan had tried to h  Daily Mail
  4. Video: Elvis impersonator named as alleged murder victim  WAtoday





new

Car crashes with another outside pub during police chase in Sydney’s southwest - 7NEWS

  1. Car crashes with another outside pub during police chase in Sydney’s southwest  7NEWS
  2. ‘Flying past me’: Two hurt as car smashes into fence after police chase  Daily Telegraph
  3. Critical incident investigation into crash following police pursuit  Sydney Morning Herald
  4. Violent carjacking linked to Sydney crash that split car in two, police say  9News
  5. Update on crash after police chase  news.com.au




new

Legitimacy of two Victorian local government elections in question after duplicate votes detected - ABC News

  1. Legitimacy of two Victorian local government elections in question after duplicate votes detected  ABC News
  2. Victorian council election results 2024 LIVE updates: Suspected postal vote tampering in council elections  Sydney Morning Herald
  3. VEC investigates potential vote tampering in two Melbourne councils  The Age




new

New content on radar.spacebar.org

Here is the new content:

I've mentioned that I have been working on running a five-minute mile on the treadmill this year, a goal that at one point seemed in reach. I think I also complained that I got sick and that when I got back to it, they had swapped out all the treadmills for fancy treadmills with built-in Netflix and air conditioning and stuff like that, which I now refer to as "Bob's Tred Mill." There's some good things about these, and some things that make me crazy, but one thing that especially made me crazy is they felt significantly faster than the old Precor ones I was used to. It's definitely a real thing that treadmills are sometimes not calibrated correctly (or the tread stretches out or slips, etc.) but it was also possible that being sick set me back more than I thought. The important thing is to get The Data instead of just The Upset Feelings so I was shopping for things like those hand-held unicycles that you can wheel around to measure how long things (like streets) are, as it does seem like the kind of device that I would own, looking at like the world's most accurate hand-held unicycle thing, and then I noticed at the last thing that most of them have a MAX SPEED of something like 10mph, which would not do. I finally had the brain-stroke that I could use a laser tachometer to do it, since these have a max speed more like 99999 RPM. So I measured the tread length with some chalk marks and put reflective tape on there. The treadmill will go at different speeds when loaded (running on it) vs unloaded, which also depends on your weight and stride and stuff a little, so you also gotta engage in the dexterity-testing act of measuring while running on it, which looked like this:


POV: You are me


Pointing the laser at the reflective tape dot (visible right next to the laser dot here) as it flies by while running kinda fast is definitely tricky, although I must say that it was one of those times when I thought, "I've been training my whole life for this!" and you can see that I'm showing off a little bit here by also photographing it at the same time. But you are not impressed since it reports 0 RPM. The nice thing about the tachometer is that it only needs a pair of observations to give you a frequency, and you can easily tell if you missed the tape, which you do often on account of the shaking, because you get some integer multiple that's way off from the right answer. Anyway I dutifully took multiple readings unloaded and loaded at (nominally) 6mph, 7mph, ... 12mph and made a spreadsheet with all the results converted, and... found that the treadmill is just about 1% too fast loaded, all across the board. This would be just 3 seconds for a five-minute mile, which is not nothing, but it definitely does not vindicate my Upset Feelings (I was thinking it felt more like 10%). My best guess is that the old treadmills were (all?) actually too slow, which is annoying because now I doubt some of the unofficial 5k records I painfully set for myself during the summer. But, well, the thing about endeavoring to do challenging things is: No Cheating!

In project news, I feel I have a foothold now to get myself out of this math hole, as I've finally migrated this algorithm to work only with 64-bit integer arithmetic and so I can port it to GPU soon and then be out of ideas about how to make it faster. I have no idea if there's a good story to be told for this project, but I'll try (and also, it is okay if sometimes the hobby programming doesn't lead to a video or Sigbovik paper, you know?). And speaking of Sigbovik: Heroes have emerged quite on time this year, so it's certainly looking like there will be a proceedings and conference (perhaps with livestream), so start writing those papers now.

Aside from the math hole, I've been making some progress on two other concurrent projects. It's getting normal again (even quiet) at work and winter break is coming up, and I'm looking forward to having some several-day stretches to work on them.

I played through Golf Peaks (well, I haven't beat all the bonus levels yet but I've been working back to front so it's just a matter of a little time at this point), which was a very nice little puzzle game that does almost everything right. Other than the very irritating music in one world, I think my only disappointment was that it doesn't elegantly handle infinite-length puts. I'm also still working on Return to Monkey Island, which I do like, although it doesn't hold up to my memory of the first two. I think one of the problems with modern point-and-click adventure games is the voices, actually: Not because the voice acting bothers me, but because it goes so slow compared to reading. It's like when you just want to figure out the maximum speed of the hand-held unicycle and they're trying to get you to watch a video instead of just reading. Tears of the Kingdom (which I'm still savoring, but getting close to the end now) does a good job with this; you do hear snippets of voices, which helps with the characterization, but you can blow through the dialog at a pretty fast pace. Probably a lot cheaper, too!




new

Happy New Year 2024!

Hello and happy Honda-days, Toyota-thon, etc.!

It's the tail end of winter break here, and we did a little traveling to see family, etc.. But I've been keeping the calendar light so that I have plenty of time for projects. There are too many in the works simultaneously, which is a bad sign, but during break I made significant progress on all of them. I also added a new one, with the idea that it would be a "small hack" so that I'd be sure to have something for SIGBOVIK (not everything needs to be epic, right?). It already works, but now I'm in the midst of writing a PDF file generator, which is also a bad sign.

Now that I'm nearly done going in and out of my attic so much, it seemed like good timing to attend to the dangerously acrobatic way that I always get in, which is to stand at the very top of a ladder and then mantle up using the floor joists. It's not actually that dangerous even though the ladder demands that you Never Stand Above This Line (how am I supposed to stand in the attic then, ladder?!), but I regularly lose my phone out of my pocket in the last leg-swinging step, which is at least dangerous to the phone. Without belaboring the tale, I ended up "having" to go to Harbor Freight to invest in some suspiciously cheap tools like a set of black pipe threading dies, pipe wrenches, pipe cutter, and while I was there I got a new vise. Worried that the vise would be too easy to install, I wisely purchased carriage bolts with square necks, so I had to file down the mounting holes of this thing:


JPEG File


This provided a good occasion to listen to some albums in the basement and order some new files. It is now very firmly and satisfyingly bolted to that satisfyingly timeworn workbench. Not pictured is how I needed to grind down the bolts so that the cabinet door below could open and close again (I use this cabinet to store old vises).


Codename: Viseman


The only thing I have used the new vise for so far is to flatten one of the washers that was used to attach the old, crappy vise, so that I could weld that washer to the charging terminal on my Roomba so that it's able to charge again, so that I could vacuum up all the steel filings on my basement floor. Anyway, getting back now to the original task of making the entrance to the attic a similar amount of athletic but less fraught, I installed this pull-up bar:


workout


The only hard part of this was getting the pipe to be just the right length, and threaded, but I am now equipped to do such tasks.

Winter is also a time for hibernation. I played through The Talos Principle II. I really loved the first Talos Principle, which had no business being as good as it was (the team was mainly known for Serious Sam, an over-the-top first-person shooter). Talos is a puzzle game with a pretty interesting story and fairly thoughtful writing. The sequel is good and definitely worth playing if you liked the original. It has a bit of the "Portal 2" effect where they clearly had a bigger budget and wanted to add all this polish, but did miss some of what made the original magic along the way. As you know I love to play games "the wrong way," and so I'm always looking for ways to break the puzzles in this game. I felt like the first one let me get away with more hijinks, like you'd stack items to make your way up somewhere, and a third of the time it'd be a Star (expected for 100%), a third of the time it'd be an Easter egg (acknowledging your prowess), and a third of the time you'd just fall out of the map forever and have to reset (true victory). I did fall out of the level several times on this sequel, but it seemed to me that the puzzles were more tightly constrained. Then again, I watched the current world record speedruns and there's certainly a lot of hijinks possible, so maybe I'm just losing my edge! I also played through Party Hard. It's a "murder all the people in 2D" game very similar to the Hotline Miami games, and not as good, but its absurd mood and unfair chaotic difficulty did grow on me. Right now I am "playing" (the) Gnorp Apologue, an idle game that has its charms, but, well, it's an idle game and I think it is cruel to ever recommend those. It was written in Rust!




new

New(ish) Stuff

A friend recently asked me to cast an eye over a summons she has received for a speeding offence. She was going too fast for a speed awareness course or a fixed penalty, and was duly reported. She is going through the Single Justice Procedure, which is a new one on me, but I expect that it consists of one JP sitting alone with a clerk, dealing with the simpler cases. In days gone by I used to sit alone on Saturdays when I could usually expect about ten or fifteen cases, mostly remands or discharges. My maximum power was a penalty of one pound or one day's imprisonment, which could fill the bill for he usual overnight drunks and nuisances. The real work was deciding on bail, and that is a serious matter when you are on your own.
I shall be interested to see how the new procedure works in practice; no doubt my one-time colleagues will be able to fill me in.




new

Ramses: A new mission racing to land on asteroid Apophis

When a skyscraper-sized asteroid narrowly misses Earth in 2029, three spacecraft may be along for the ride.




new

New insights into asteroid properties: A STEP Grant update

A Planetary Society-funded project to understand asteroids achieved its main goals and scientific objectives this year.




new

Learned something new

Learned something new today— resin fidget spinner. ????




new

Quicklisp news: October 2024 Quicklisp dist update now available

 New projects: 

  • adp-github — ADP extension to generate github markdown files. — MIT
  • adp-plain — Add Documentation, Please... using plain text. An extension of ADP to generate files with barely additional features. — MIT
  • allioli — Alliolification — MIT
  • alternate-asdf-system-connections — Allows for ASDF system to be connected so that auto-loading may occur. This is a fork of asdf-system-connections and incorporates a load-system-driven mechanism for loading dependencies and also loads the dependencies of the connections. — MIT
  • cbor — CBOR encoder/decoder — MIT
  • charje.documentation — Documentation is an opinionated yet customizable docstring parsing library. — AGPL V3 or any later version
  • chipi — House automation bus in Common Lisp — Apache-2
  • cl-aseprite — Aseprite file format parser — GPLv3
  • cl-astar — A heavily optimized yet flexible A* pathfinding algorithm implementation — MIT
  • cl-ceigen-lite — A Common Lisp wrapper around CEIGEN-LITE - which is itself a C wrapper around the C++ Eigen library. — MIT
  • cl-cf — Computations using continued fractions — GPL-3
  • cl-concord — CONCORD implementation based on Common Lisp — LGPL
  • cl-duckdb — CFFI wrapper around the DuckDB C API — MIT License
  • cl-fastcgi — FastCGI wrapper for Common Lisp — BSD License
  • cl-flx — Rewrite emacs-flx in Common Lisp — MIT
  • cl-frugal-uuid — Common Lisp UUID library with zero dependencies — MIT License
  • cl-gog-galaxy — A wrapper for the GOG Galaxy SDK — zlib
  • cl-lc — List comprehensions — MIT
  • cl-naive-ptrees — Functions to make it easier to work with plist(s) and plist trees. Works with plist(s) pairs as units and not as individual list items. — MIT
  • cl-qoa — An implementation of the Quite Okay Audio format. — zlib
  • cl-reddit — Reddit client api library — BSD
  • cl-resvg — An up-to-date bindings library for the resvg SVG rendering library — zlib
  • cl-trivial-clock — Common Lisp library to get accurate wall-clock times on multiple platforms — MIT License
  • clack-cors — A Clack middleware to set CORS related HTTP headers. — Unlicense
  • clack-prometheus — Clack middleware to serve stats in Prometheus format. — Unlicense
  • clith — Common Lisp wITH macro. A general WITH macro. — MIT
  • clj-arrows — Implements Clojure-styled threading/transformation macros. — MIT
  • clos-encounters — A collection of OOP patterns benefiting from the CLOS MOP. — Unlicense
  • coalton — An efficient, statically typed functional programming language that supercharges Common Lisp. — MIT
  • cocoas — A toolkit library to help deal with CoreFoundation, Cocoa, and objc — zlib
  • com.danielkeogh.graph — A fast an reliable graph library. — MIT
  • fast-mpsc-queue — Multi-Producer Single-Consumer queue implementation. — MIT
  • file-finder — File finder. Enable rapid file search, inspection and manipulation. — GPL3+
  • golden-utils — A utility library. — MIT
  • hiccl — HTML generator for Common Lisp — MIT
  • hsx — Hypertext S-expression — MIT
  • hunchentoot-stuck-connection-monitor — Monitors hunchentoot connections and logs the connections stuck in the same state for a long time (due to slow or inactive clients and network stream timeouts that hunchentoot tries to utilize not working properly). Offers an option to shutdown the stuck connections sockets manually or automatically, thus unblocking the connection threads and preventing thread and socket leak. See https://github.com/edicl/hunchentoot/issues/189 — BSD-2-Clause
  • incless — A portable and extensible Common Lisp printer implementation (core) — BSD
  • inravina — A portable and extensible Common Lisp pretty printer. — MIT
  • invistra — A portable and extensible Common Lisp FORMAT implementation — BSD
  • knx-conn — KNXnet/IP implementation in Common Lisp — GNU GPL, version 3
  • machine-state — Retrieve machine state information about CPU time, memory usage, etc. — zlib
  • myweb — simple web server written in common lisp for educational reasons — LGPLv3
  • noisy — Perlin noise for arbitrary numbers of dimensions. — MIT
  • nontrivial-gray-streams — A compatibility layer for Gray streams including extensions — MIT
  • open-with — Open a file in a suitable external program — zlib
  • openai-openapi-client — Openai API client — AGPLv3+
  • openrpc — CI for Common Lisp OpenRPC library. — BSD
  • parse-number-range — Parses LOOP's convenient "for-as-arithmetic" syntax into 5 simple values: from, to, limit-kind (:inclusive, :exclusive or nil if unbounded), by (step) and direction (+ or -)). Further related utilities are provided. Intended for easy implementation of analogous functionality in other constructs. — Public Domain
  • precise-time — Precise time measurements — zlib
  • pregexp — Portable regular expressions for Common Lisp — MIT-like
  • progressons — Display a progress bar on one line. — MIT
  • quaviver — A portable and extensible floating point string library — MIT
  • quilc — A CLI front-end for the Quil compiler — Apache License 2.0 (See LICENSE.txt)
  • qvm — An implementation of the Quantum Abstract Machine. — Apache License 2.0 (See LICENSE.txt)
  • random-sampling — Functions to generate random samples with various distributions — zlib
  • rs-dlx — Knuth's Algorithm X with dancing links. — Modified BSD License
  • scrapycl — The web scraping framework for writing crawlers in Common Lisp. — Unlicense
  • smoothers — Statistical methods to create approximating functions that attempt to capture important patterns in the data, while leaving out noise or other fine-scale structures/rapid phenomena. — MS-PL
  • trivial-adjust-simple-array — A tiny utility to change array size ensuring it is simple. — MIT
  • trivial-system-loader — A system installation/loading abstraction for Common Lisp — MIT
  • trivial-toplevel-commands — Trivial Toplevel Commands allows to define toplevel commands available on most implementations in a portable fashion. — BSD-3 Clause
  • trivial-toplevel-prompt — Portability library to customize REPL prompts. — BSD-3 Clause
  • utf8-input-stream — A UTF-8 string input stream over a binary stream for Common Lisp — MIT
  • whereiseveryone.command-line-args — Automatically create a command-line-argument parser for a given Common Lisp function definition. — AGPL v3 or any later version

Updated projects: 3b-bmfont, 3bgl-shader, 3bmd, 3d-math, 3d-spaces, 40ants-asdf-system, 40ants-slynk, access, acclimation, action-list, adhoc, adopt, adp, agnostic-lizard, alexandria, alexandria-plus, anatevka, anypool, april, arc-compat, architecture.builder-protocol, array-utils, arrow-macros, assoc-utils, async-process, atomics, auto-restart, aws-sdk-lisp, babel, bdef, bike, binary-structures, binding-arrows, birch, blackbird, bordeaux-threads, calm, carrier, caveman, ccldoc, cephes.cl, cepl, cerberus, cffi, cffi-object, cffi-ops, chanl, chunga, ci, ci-utils, ciao, cl-6502, cl-algebraic-data-type, cl-all, cl-ansi-term, cl-async, cl-atelier, cl-autowrap, cl-base32, cl-bmas, cl-bmp, cl-bnf, cl-brewer, cl-buchberger, cl-cmark, cl-collider, cl-colors2, cl-confidence, cl-containers, cl-cookie, cl-csv, cl-custom-hash-table, cl-cxx-jit, cl-data-structures, cl-dbi, cl-digraph, cl-dot, cl-enchant, cl-environments, cl-fast-ecs, cl-fbx, cl-fluent-logger, cl-form-types, cl-forms, cl-freetype2, cl-gamepad, cl-github-v3, cl-gltf, cl-gobject-introspection, cl-graph, cl-grip, cl-gserver, cl-hamcrest, cl-hash-util, cl-html-readme, cl-i18n, cl-info, cl-ini, cl-ipfs-api2, cl-kanren, cl-lib-helper, cl-liballegro, cl-liballegro-nuklear, cl-log, cl-markless, cl-marshal, cl-migratum, cl-mixed, cl-modio, cl-mount-info, cl-mpg123, cl-mssql, cl-mustache, cl-mysql, cl-neovim, cl-netpbm, cl-oju, cl-opengl, cl-opensearch-query-builder, cl-opus, cl-patterns, cl-plus-ssl-osx-fix, cl-ppcre, cl-project, cl-protobufs, cl-pslib, cl-pslib-barcode, cl-rashell, cl-readline, cl-sat.minisat, cl-sdl2-image, cl-sdl2-mixer, cl-sdl2-ttf, cl-sendgrid, cl-sentry-client, cl-skkserv, cl-smtp, cl-ssh-keys, cl-steamworks, cl-str, cl-svg, cl-telegram-bot, cl-threadpool, cl-tiled, cl-torrents, cl-tqdm, cl-transducers, cl-transit, cl-unicode, cl-unification, cl-unix-sockets, cl-utils, cl-vectors, cl-vorbis, cl-wavefront, cl-webdriver-client, cl-webkit, cl-webmachine, cl-who, clack, clack-pretend, clad, classimp, clast, clath, clavier, clazy, clerk, clgplot, climacs, clingon, clip, clj-con, clj-re, clobber, clog, clog-ace, clog-collection, clog-plotly, clog-terminal, clohost, closer-mop, clss, cluffer, clunit2, clx, cmd, codata-recommended-values, codex, coleslaw, collectors, colored, com-on, common-lisp-jupyter, commondoc-markdown, compiler-macro-notes, conduit-packages, consfigurator, contextl, croatoan, ctype, cytoscape-clj, damn-fast-priority-queue, dartscluuid, data-frame, data-lens, datafly, dbus, decompress, defenum, definer, definitions, deflate, defmain, deploy, depot, deptree, dexador, dissect, djula, dns-client, doc, docs-builder, dsm, dufy, easter-gauss, easy-audio, easy-macros, easy-routes, eclector, equals, erjoalgo-webutil, erudite, esrap, event-emitter, external-program, external-symbol-not-found, fare-csv, fare-scripts, fast-http, fast-websocket, file-attributes, file-notify, file-select, filesystem-utils, fiveam, fiveam-matchers, flexi-streams, float-features, flow, fn, fset, functional-trees, fuzzy-dates, gadgets, generic-cl, github-api-cl, glfw, glsl-toolkit, harmony, hashtrie, helambdap, http2, hunchentoot, imago, in-nomine, inferior-shell, introspect-environment, ironclad, jose, js, json-mop, jsonrpc, jzon, khazern, lack, lass, lemmy-api, letv, lichat-protocol, lichat-tcp-client, linear-programming, lisp-binary, lisp-chat, lisp-critic, lisp-pay, lisp-stat, lispcord, lla, local-time, log4cl-extras, logging, lru-cache, magicl, maiden, maidenhead, manifolds, math, mcclim, memory-regions, messagebox, method-combination-utilities, mgl-pax, misc-extensions, mito, mk-defsystem, mmap, mnas-package, mnas-string, moira, multiposter, mutility, mutils, named-closure, ndebug, neural-classifier, new-op, nibbles, nibbles-streams, ningle, nodgui, north, numerical-utilities, nytpu.lisp-utils, omglib, ook, open-location-code, openapi-generator, orizuru-orm, overlord, papyrus, parachute, parse-number, pathname-utils, petalisp, phos, picl, plot, plump, plump-sexp, pngload, policy-cond, polymorphic-functions, postmodern, ppath, prometheus-gc, psychiq, purgatory, py4cl, py4cl2, py4cl2-cffi, qlot, qoi, query-fs, quick-patch, quickhull, quri, random-state, reblocks, reblocks-auth, reblocks-file-server, reblocks-lass, reblocks-navigation-widget, reblocks-parenscript, reblocks-prometheus, reblocks-typeahead, reblocks-ui, reblocks-websocket, rove, s-dot2, sandalphon.lambda-list, sb-fastcgi, sc-extensions, sel, select, serapeum, shasht, shop3, si-kanren, sketch, slime, slite, sly, snooze, spinneret, staple, static-vectors, statistics, stepster, stmx, stripe, swank-crew, swank-protocol, sxql, symath, system-locale, taglib, teddy, ten, testiere, tfeb-lisp-hax, tfm, tiny-routes, tooter, trivia, trivial-arguments, trivial-clipboard, trivial-file-size, trivial-gray-streams, trivial-main-thread, trivial-octet-streams, trivial-package-locks, trivial-package-manager, trivial-sanitize, trivial-shell, type-templates, typo, uax-15, uiop, usocket, vellum, vellum-binary, vellum-csv, vellum-postmodern, verbose, vernacular, vom, websocket-driver, winhttp, with-branching, with-contexts, woo, xhtmlambda, xml-emitter, yason, zippy, zpb-ttf.

Removed projects: abstract-arrays, ahungry-fleece, cl-cheshire-cat, cl-darksky, cl-epoch, cl-naive-store, convolution-kernel, dense-arrays, extensible-compound-types, extensible-optimizing-coerce, fast-generic-functions, flac-metadata, freebsd-ffi, listoflist, luckless, one-more-re-nightmare, postmodern-localtime, stumpwm-dynamic-float, stumpwm-sndioctl, unicly.

To get this update, use:

 (ql:update-dist "quicklisp")

Sorry this update took so long. My goal is to resume monthly releases.

Enjoy!




new

TurtleWare: Dynamic Vars - A New Hope

Table of Contents

  1. Dynamic Bindings
  2. The problem
  3. The solution
  4. Dynamic slots
  5. The context
  6. Summary

Dynamic Bindings

Common Lisp has an important language feature called dynamic binding. It is possible to rebind a dynamic variable somewhere on the call stack and downstream functions will see that new value, and when the stack is unwound, the old value is brought back.

While Common Lisp does not specify multi-threading, it seems to be a consensus among various implementations that dynamic bindings are thread-local, allowing for controlling the computing context in a safe way.

Before we start experiments, let's define a package to isolate our namespace:

(defpackage "EU.TURTLEWARE.BLOG/DLET"
  (:local-nicknames ("MOP" #+closer-mop "C2MOP"
                           #+(and (not closer-mop) ecl) "MOP"
                           #+(and (not closer-mop) ccl) "CCL"
                           #+(and (not closer-mop) sbcl) "SB-MOP"))
  (:use "CL"))
(in-package "EU.TURTLEWARE.BLOG/DLET")

Dynamic binding of variables is transparent to the programmer, because the operator LET is used for both lexical and dynamic bindings. For example:

(defvar *dynamic-variable* 42)

(defun test ()
  (let ((*dynamic-variable* 15)
        (lexical-variable 12))
    (lambda ()
      (print (cons *dynamic-variable* lexical-variable)))))

(funcall (test))
;;; (42 . 12)

(let ((*dynamic-variable* 'xx))
  (funcall (test)))
;;; (xx . 12)

Additionally the language specifies a special operator PROGV that gives the programmer a control over the dynamic binding mechanism, by allowing passing the dynamic variable by value instead of its name. Dynamic variables are represented by symbols:

(progv (list '*dynamic-variable*) (list 'zz)
  (funcall (test)))
;;; (zz . 12)

The problem

Nowadays it is common to encapsulate the state in the instance of a class. Sometimes that state is dynamic. It would be nice if we could use dynamic binding to control it. That said slots are not variables, and if there are many objects of the same class with different states, then using dynamic variables defined with DEFVAR is not feasible.

Consider the following classes which we want to be thread-safe:

(defgeneric call-with-ink (cont window ink))

(defclass window-1 ()
  ((ink :initform 'red :accessor ink)))

(defmethod call-with-ink (cont (win window-1) ink)
  (let ((old-ink (ink win)))
    (setf (ink win) ink)
    (unwind-protect (funcall cont)
      (setf (ink win) old-ink))))

(defclass window-2 ()
  ())

(defvar *ink* 'blue)
(defmethod ink ((window window-2)) *ink*)

(defmethod call-with-ink (cont (win window-2) ink)
  (let ((*ink* ink))
    (funcall cont)))

The first example is clearly not thread safe. If we access the WINDOW-1 instance from multiple threads, then they will overwrite a value of the slot INK.

The second example is not good either, because when we have many instances of WINDOW-2 then they share the binding. Nesting CALL-WITH-INK will overwrite the binding of another window.

The solution

The solution is to use PROGV:

(defclass window-3 ()
  ((ink :initform (gensym))))

(defmethod initialize-instance :after ((win window-3) &key)
  (setf (symbol-value (slot-value win 'ink)) 'red))

(defmethod call-with-ink (cont (win window-3) ink)
  (progv (list (slot-value win 'ink)) (list ink)
    (funcall cont)))

This way each instance has its own dynamic variable that may be rebound with a designated operator CALL-WITH-INK. It is thread-safe and private. We may add some syntactic sugar so it is more similar to let:

(defmacro dlet (bindings &body body)
  (loop for (var val) in bindings
        collect var into vars
        collect val into vals
        finally (return `(progv (list ,@vars) (list ,@vals)
                           ,@body))))

(defmacro dset (&rest pairs)
  `(setf ,@(loop for (var val) on pairs by #'cddr
                 collect `(symbol-value ,var)
                 collect val)))

(defmacro dref (variable)
  `(symbol-value ,variable))

Dynamic slots

While meta-classes are not easily composable, it is worth noting that we can mold it better into the language by specifying that slot itself has a dynamic value. This way CLOS aficionados will have a new tool in their arsenal.

The approach we'll take is that a fresh symbol is stored as the value of each instance-allocated slot, and then accessors for the slot value will use these symbols as a dynamic variable. Here are low-level accessors:

;;; Accessing and binding symbols behind the slot. We don't use SLOT-VALUE,
;;; because it will return the _value_ of the dynamic variable, and not the
;;; variable itself.
(defun slot-dvar (object slotd)
  (mop:standard-instance-access
   object (mop:slot-definition-location slotd)))

(defun slot-dvar* (object slot-name)
  (let* ((class (class-of object))
         (slotd (find slot-name (mop:class-slots class)
                      :key #'mop:slot-definition-name)))
    (slot-dvar object slotd)))

(defmacro slot-dlet (bindings &body body)
  `(dlet ,(loop for ((object slot-name) val) in bindings
                 collect `((slot-dvar* ,object ,slot-name) ,val))
     ,@body))

Now we'll define the meta-class. We need that to specialize functions responsible for processing slot definitions and the instance allocation. Notice, that we make use of a kludge to communicate between COMPUTE-EFFECTIVE-SLOT-DEFINITION and EFFECTIVE-SLOT-DEFINITION-CLASS – this is because the latter has no access to the direct slot definitions.

;;; The metaclass CLASS-WITH-DYNAMIC-SLOTS specifies alternative effective slot
;;; definitions for slots with an initarg :dynamic.
(defclass class-with-dynamic-slots (standard-class) ())

;;; Class with dynamic slots may be subclasses of the standard class.
(defmethod mop:validate-superclass ((class class-with-dynamic-slots)
                                    (super standard-class))
  t)

;;; When allocating the instance we initialize all slots to a fresh symbol that
;;; represents the dynamic variable.
(defmethod allocate-instance ((class class-with-dynamic-slots) &rest initargs)
  (declare (ignore initargs))
  (let ((object (call-next-method)))
    (loop for slotd in (mop:class-slots class)
          when (typep slotd 'dynamic-effective-slot) do
            (setf (mop:standard-instance-access
                   object
                   (mop:slot-definition-location slotd))
                  (gensym (string (mop:slot-definition-name slotd)))))
    object))

;;; To improve potential composability of CLASS-WITH-DYNAMIC-SLOTS with other
;;; metaclasses we treat specially only slots that has :DYNAMIC in initargs,
;;; otherwise we call the next method.
(defmethod mop:direct-slot-definition-class
    ((class class-with-dynamic-slots) &rest initargs)
  (loop for (key val) on initargs by #'cddr
        when (eq key :dynamic)
          do (return-from mop:direct-slot-definition-class
               (find-class 'dynamic-direct-slot)))
  (call-next-method))

;;; The metaobject protocol did not specify an elegant way to communicate
;;; between the direct slot definition and the effective slot definition.
;;; Luckily we have dynamic bindings! :-)
(defvar *kludge/mop-deficiency/dynamic-slot-p* nil)
(defmethod mop:compute-effective-slot-definition
    ((class class-with-dynamic-slots)
     name
     direct-slotds)
  (if (typep (first direct-slotds) 'dynamic-direct-slot)
      (let* ((*kludge/mop-deficiency/dynamic-slot-p* t))
        (call-next-method))
      (call-next-method)))

(defmethod mop:effective-slot-definition-class
    ((class class-with-dynamic-slots) &rest initargs)
  (declare (ignore initargs))
  (if *kludge/mop-deficiency/dynamic-slot-p*
      (find-class 'dynamic-effective-slot)
      (call-next-method)))

Finally we define a direct and an effective slot classes, and specialize slot accessors that are invoked by the instance accessors.

;;; There is a considerable boilerplate involving customizing slots.
;;;
;;; - direct slot definition: local to a single defclass form
;;;
;;; - effective slot definition: combination of all direct slots with the same
;;;   name in the class and its superclasses
;;;
(defclass dynamic-direct-slot (mop:standard-direct-slot-definition)
  ((dynamic :initform nil :initarg :dynamic :reader dynamic-slot-p)))

;;; DYNAMIC-EFFECTIVE-SLOT is implemented to return as slot-value values of the
;;; dynamic variable that is stored with the instance.
;;;
;;; It would be nice if we could specify :ALLOCATION :DYNAMIC for the slot, but
;;; then STANDARD-INSTANCE-ACCESS would go belly up. We could make a clever
;;; workaround, but who cares?
(defclass dynamic-effective-slot (mop:standard-effective-slot-definition)
  ())

(defmethod mop:slot-value-using-class
    ((class class-with-dynamic-slots)
     object
     (slotd dynamic-effective-slot))
  (dref (slot-dvar object slotd)))

(defmethod (setf mop:slot-value-using-class)
    (new-value
     (class class-with-dynamic-slots)
     object
     (slotd dynamic-effective-slot))
  (dset (slot-dvar object slotd) new-value))

(defmethod mop:slot-boundp-using-class
  ((class class-with-dynamic-slots)
   object
   (slotd dynamic-effective-slot))
  (boundp (slot-dvar object slotd)))

(defmethod mop:slot-makunbound-using-class
  ((class class-with-dynamic-slots)
   object
   (slotd dynamic-effective-slot))
  (makunbound (slot-dvar object slotd)))

With this, we can finally define a class with slots that have dynamic values. What's more, we may bind them like dynamic variables.

;;; Let there be light.
(defclass window-4 ()
  ((ink :initform 'red :dynamic t :accessor ink)
   (normal :initform 'normal :accessor normal))
  (:metaclass class-with-dynamic-slots))

(let ((object (make-instance 'window-4)))
  (slot-dlet (((object 'ink) 15))
    (print (ink object)))
  (print (ink object)))

ContextL provides a similar solution with dynamic slots, although it provides much more, like layered classes. This example is much more self-contained.

The context

Lately I'm working on the repaint queue for McCLIM. While doing so I've decided to make stream operations thread-safe, so it is possible to draw on the stream and write to it from arbitrary thread asynchronously. The access to the output record history needs to be clearly locked, so that may be solved by the mutex. Graphics state is another story, consider the following functions running from separate threads:

(defun team-red ()
  (with-drawing-options (stream :ink +dark-red+)
    (loop for i from 0 below 50000 do
      (write-string (format nil "XXX: ~5d~%" i) stream))))

(defun team-blue ()
  (with-drawing-options (stream :ink +dark-blue+)
    (loop for i from 0 below 50000 do
      (write-string (format nil "YYY: ~5d~%" i) stream))))

(defun team-pink ()
  (with-drawing-options (stream :ink +deep-pink+)
    (loop for i from 0 below 25000 do
      (case (random 2)
        (0 (draw-rectangle* stream 200 (* i 100) 250 (+ (* i 100) 50)))
        (1 (draw-circle* stream 225 (+ (* i 100) 25) 25))))))

(defun gonow (stream)
  (window-clear stream)
  (time (let ((a (clim-sys:make-process #'team-red))
              (b (clim-sys:make-process #'team-blue))
              (c (clim-sys:make-process #'team-grue)))
          (bt:join-thread a)
          (bt:join-thread b)
          (bt:join-thread c)
          (format stream "done!~%")))  )

Operations like WRITE-STRING and DRAW-RECTANGLE can be implemented by holding a lock over the shared resource without much disruption. The drawing color on the other hand is set outside of the loop, so if we had locked the graphics state with a lock, then these functions would be serialized despite being called from different processes. The solution to this problem is to make graphics context a dynamic slot that is accessed with WITH-DRAWING-OPTIONS.

Summary

I hope that I've convinced you that dynamic variables are cool (I'm sure that majority of readers here are already convinced), and that dynamic slots are even cooler :-). Watch forward to the upcoming McCLIM release!

If you like technical writeups like this, please consider supporting me on Patreon.





new

When you hate your friend rsquo s new friend

When you hate your friend rsquo s new friend



View Comic!







new

Eight injured in explosion at oil refinery in UP's Mathura - ANI News

  1. Eight injured in explosion at oil refinery in UP's Mathura  ANI News
  2. 8 injured, three critical in major explosion at Indian Oil plant in UP's Mathura  India Today
  3. Eight injured in fire at IndianOil’s Mathura refinery  BusinessLine
  4. Mathura refinery blast: Indian Oil refinery explosion injures 12 people  The Financial Express
  5. At least 8 injured in explosion at Mathura refinery  The Indian Express




new

nonrenewable resource

Today on Married To The Sea: nonrenewable resource


This RSS feed is brought to you by Drew and Natalie's podcast Garbage Brain University. Our new series Everything Is Real explores the world of cryptids, aliens, quantum physics, the occult, and more. If you use this RSS feed, please consider supporting us by becoming a patron. Patronage includes membership to our private Discord server and other bonus material non-patrons never see!