Expand Cut Tags

No cut tags
[syndicated profile] alexwlchandotnet_feed

Posted by Alex Chan

In my previous post, I explained how I use the FSEvents API to detect changed files on macOS. It’s part of my livereload mechanism for working on this site. I make a change to a source file, that triggers a rebuild of the site, and then the development site automatically refreshes in my web browser. I’m trying to build this all myself, with no third-party dependencies.

Once I’ve detected a changed file and rebuilt the site, how do I automatically refresh my open browser windows? In this post, I’ll explain how I use HTTP long polling to tell pages when it’s time to reload.

HTTP long polling

Faster isn’t always better

In most HTTP servers I’ve built, when the server sends a response to a client, I want it to return as quickly as possible. When I’m writing HTTP clients that fetch data from servers, I expect the server to respond quickly. The entire interaction happens within a few seconds of the request – but it doesn’t have to be that way.

HTTP long polling is a technique where a client makes a normal HTTP request, but the server doesn’t respond immediately. Rather than closing or timing out the connection, both sides hold it open, and the server can send more data to the client over time.

This mechanism can allow the server to tell the browser when it’s time to reload the page. When the browser loads a page, it opens a long-lived HTTP connection to the server. The server only sends data when something has changed, so the browser waits to receive data and then reloads the page.

This technique is used in Tailscale – clients use HTTP long polling to get network updates from the control plane. When the tailscaled daemon starts, it opens a long-running connection to the control servers, and when something changes in the network, the servers send the updated network information (or “netmap”) down that connection. Clients can hold open a connection for a long time, and receive many updates on the same connection.

Sending reload events from a Python web server

All the scripts for my blog are written in Python, so I want to use Python to write a web server that serves a long-lived connection and tells the browser when to reload. For production Python web servers I’d use a proper server framework like Gunicorn or uWSGI, but for a small and low-traffic local server, I can just use the standard library’s http.server module.

To create a server, I need to create a subclass of BaseHTTPRequestHandler that handles GET requests, then pass that to an instance of HTTPServer.

Here’s a server that receives a GET request, holds open the connection, and writes “waiting…” once every second:

from http.server import HTTPServer, BaseHTTPRequestHandler
import time


class SlowHandler(BaseHTTPRequestHandler):
    """
    An HTTP handler that sends "waiting..." once a second on
    a long-running connection.
    """

    def do_GET(self) -> None:
        """
        Handle a new GET request from a client.
        """
        print("Client connected")
        
        # Send the initial HTTP headers.
        self.send_response(200)
        self.send_header("Content-type", "text/plain")
        self.end_headers()

        try:
            while True:
                self.wfile.write(b"waiting...\n")
                
                # Flush to stdout to ensure the client receives the data
                # immediately, without buffering.
                self.wfile.flush()
                
                # Sleep until we're ready to write again.
                time.sleep(1)
              
        # If the client closes the connection, we'll get a BrokenPipeError
        # the next time we try to write data.
        except BrokenPipeError:
            print("Client disconnected")


server_address = ("localhost", 5555)
server = HTTPServer(server_address, SlowHandler)
server.serve_forever()

If you run this script and make a GET request with curl, you’ll see “waiting…” printed in a loop:

$ curl http://localhost:5555/
waiting...
waiting...
waiting...

We could wire this up to check if there have been any changes in the last second, and write a different message to the connection – but that would introduce at least a second of latency into the browser getting updates. Ideally, we’d send a response as soon as an update is ready. How can we coordinate that within a single Python script?

The solution is another standard library feature I’ve not used before: threading.Event. This allows us to track the value of a single true/false flag, and we can use the wait() method to block until the flag is set to true.

First I create the event:

import threading

rebuild_event = threading.Event()

When the site is finished rebuilding, we set the flag to true, then clear it immediately (waiting for the next rebuild):

for changeset in watch_for_changed_files():
    rebuild_site(based_on=changeset)
    rebuild_event.set()
    rebuild_event.clear()

Then in the HTTP handler, we wait for the flag to be set and only then send a response:

class WaitForChangesHandler(BaseHTTPRequestHandler):
    """
    An HTTP handler that waits until the site is rebuilt to send a response.
    """

    def do_GET(self) -> None:
        """
        Handle a new GET request from a browser.
        """
        print("Client connected")
        
        try:
            rebuild_event.wait()

            self.send_response(200)
            self.send_header("Content-type", "text/plain")
            self.end_headers()

            self.wfile.write(b"reload\n")
            self.wfile.flush()
        except BrokenPipeError:
            print("Client disconnected")

We can also use threading to start the server in a background thread, and wait for file changes in the main thread:

server_address = ("localhost", 5555)
server = HTTPServer(server_address, WaitForChangesHandler)

threading.Thread(target=server.serve_forever, daemon=True).start()

for changeset in watch_for_changed_files():
    rebuild_site(based_on=changeset)
    rebuild_event.set()
    rebuild_event.clear()

When we make an HTTP call to the web server, it now waits until something changes, and only then sends a response:

$ curl http://localhost:5555/
time to reload

This minimises the delay between rebuilding the site and refreshing the page, which allows for very fast reloads when I change a source file.

Waiting for a long-polling server in JavaScript

We can use the built-in fetch() method to make a request to the server, wait for a response, and then trigger a page reload. This only requires a few lines of JavaScript:

async function waitForChanges() {
  await fetch('http://localhost:5555/wait-for-changes');
  window.location.reload();
}

window.addEventListener("DOMContentLoaded", waitForChanges);

This is only added to local builds, so the live site won’t fetch localhost:5555 on your computer.

If the livereload server is different to the server that’s serving this JavaScript, we need to tweak the Access-Control-Allow-Origin header to allow the page to talk to the livereload server:

self.send_response(200)
self.send_header("Access-Control-Allow-Origin", "*")
self.send_header("Content-type", "text/plain")
self.end_headers()

For a live application we’d want to scope this more tightly than *, but for a server that’s only used for local development it’s fine.

Making this code more robust

Using threading to support multiple connections

The basic HTTPServer can only handle one connection at a time, so if I have two browser windows open, only one of them can receive the reload event. This is sub-optimal – when something changes, every browser window should reload.

We can fix this by replacing HTTPServer with ThreadingHTTPServer, which creates a new thread for every request:

from http.server import ThreadingHTTPServer

server_address = ("localhost", 5555)
server = ThreadingHTTPServer(server_address, WaitForChangesHandler)

threading.Thread(target=server.serve_forever, daemon=True).start()

I’m not sure how this scales for a very large number of long-running requests, but I’ll only ever have a small, single-digit number of browser windows open, and it’s plenty for that.

Avoiding default fetch() timeouts

Although we don’t set an explicit timeout in our fetch() call, browsers apply their own default timeout. For example, a quick search suggests Firefox used to set a 30 second timeout (I couldn’t immediately find a reference about whether that’s still true). If the server doesn’t respond in that time, the connection is closed and no more data is received.

That means that if I go longer than the default timeout without making changes, the browser will close the connection to the livereload server, and then it won’t be notified about further changes.

We can fix this by changing the server so it always responds within 20 seconds (or another timeout of our choice). It sends a 200 OK immediately if there’s a change, or a 204 No Content if it hits the timeout before a change happens. Then the on-page JavaScript can run in a loop, and only reload when it gets a 200 OK.

We can pass a timeout parameter to rebuild_event.wait(), which blocks until the flag is set or the timeout expires, and returns the current value of the flag. Here’s the updated server:

class WaitForChangesHandler(BaseHTTPRequestHandler):
    """
    An HTTP handler that sends one of two responses:
    
    *   200 OK -- the site has changed, reload the page, or
    *   204 No Content -- nothing has changed recently, make a new GET request
    
    """

    def do_GET(self) -> None:
        """
        Handle a new GET request from a browser.
        """                
        try:
            has_changes = rebuild_event.wait(timeout=20)
            
            if has_changes:
                self.send_response(200)
                self.send_header("Access-Control-Allow-Origin", "*")
                self.send_header("Content-type", "text/plain")
                self.end_headers()

                self.wfile.write(b"reload\n")
                self.wfile.flush()
            else:
                self.send_response(204)
                self.end_headers()
        except BrokenPipeError:
            pass

Then in the JavaScript, we make requests in a loop, check the status code of each response, and only reload if we get a 200 OK:

async function waitForChanges() {
  while (true) {
    const response = await fetch('http://localhost:5555/wait-for-changes');

    if (response.status === 200) {
      window.location.reload();
      break;
    }
  }
}

If the fetch() call fails – for example, if the server gets restarted – the loop will break, and then the window will stop receiving updates. We can fix this by wrapping the body of the loop with a try … except, and in the except we tell the function to wait a second before trying again:

async function waitForChanges() {
  while (true) {
    try {
      const response = await fetch('http://localhost:5555/wait-for-changes');

      if (response.status === 200) {
        window.location.reload();
        break;
      }
    } catch {
      await new Promise(resolve => setTimeout(resolve, 1000));
    }
  }
}

This is the code I’ve been using for several weeks now, and it’s held up well.

Rejected approaches

Using third-party libraries. Initially I was using the python-livereload library, which bundles a copy of livereload-js, but I wanted to write my own implementation – partly to avoid dependencies, partly to understand how it works.

Polling the client. I could write a timestamp to a file at the end of a build, serve that file as part of the site, and have JavaScript on the page continuously poll that file for changes. I prefer waiting for changes, because it avoids unnecessary work and CPU cycles.

Manipulate the browser directly. The server and my web browser are almost always on the same machine. Rather than have the browser trigger the reload, the rebuild script could use something like AppleScript to find matching browser windows and trigger a reload.

That would be the ultimate “only has to work on my machine” solution, but it might be more complicated, because I’d have to write new code for every browser I use. (I routinely test with Safari, Firefox, and Chrome.) It also wouldn’t work if I’m using a web browser on a different machine, for example when I’m testing how the site looks on a phone.

Use WebSockets to tell the web page about changes. That’s how livereload-js works, and WebSockets are a good tool for creating a persistent connection between a server and a client. They’re capable of two-way communication – for example, Slack uses WebSockets to maintain a connection between the Slack app and their servers.

I didn’t use WebSockets because they’re more complicated to implement on the server (there’s no WebSockets server in the Python standard library), and I don’t need their flexibility. My server–browser communication is strictly one-way, so HTTP long polling is fine.

The result

Here’s a diagram which illustrates the code we’ve written: when the site is rebuilt, we call rebuild_event.set(), which unblocks a rebuild_event.wait() in the web server. The web server sends an HTTP 200 OK to the web browser, which has been waiting for a response to GET /wait-for-changes. The browser reloads the page, and the cycle starts again. (Click for a larger version.)

Web browser Python HTTP server Rebuild script Web browser Python HTTP server Rebuild script reload_event.wait() Browser window loads Rebuild completes reload_event.wait() unblocks window.location.reload() GET /wait-for-changes reload_event.set() HTTP 200 OK ("reload")

Here’s the final Python web server:

from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
import threading


rebuild_event = threading.Event()


class WaitForChangesHandler(BaseHTTPRequestHandler):
    """
    An HTTP handler that sends one of two responses:
    
    *   200 OK -- the site has changed, reload the page, or
    *   204 No Content -- nothing has changed recently, make a new GET request
    
    """

    def do_GET(self) -> None:
        """
        Handle a new GET request from a browser.
        """                
        try:
            has_changes = rebuild_event.wait(timeout=20)
            
            if has_changes:
                self.send_response(200)
                self.send_header("Access-Control-Allow-Origin", "*")            
                self.send_header("Content-type", "text/plain")
                self.end_headers()

                self.wfile.write(b"reload\n")
                self.wfile.flush()
            else:
                self.send_response(204)
                self.send_header("Access-Control-Allow-Origin", "*")            
                self.end_headers()
        except BrokenPipeError:
            pass


server_address = ("localhost", 5555)
server = ThreadingHTTPServer(server_address, WaitForChangesHandler)

threading.Thread(target=server.serve_forever, daemon=True).start()

for changeset in watch_for_changed_files():
    rebuild_site(based_on=changeset)
    rebuild_event.set()
    rebuild_event.clear()

and here’s the JavaScript that gets embedded in the page:

async function waitForChanges() {
  while (true) {
    try {
      const response = await fetch('http://localhost:5555/wait-for-changes');

      if (response.status === 200) {
        window.location.reload();
        break;
      }
    } catch {
      await new Promise(resolve => setTimeout(resolve, 1000));
    }
  }
}

window.addEventListener("DOMContentLoaded", waitForChanges);

Combined with the previous post, whenever I make a change to a source file, the effect is reflected near-instantly in my web browser. Informal benchmarking shows there’s only about 150 milliseconds between saving a file in my text editor and my browser reloading with the changes, which is on par with the fastest human reaction times.

This makes working on the site feel incredibly smooth. As I’m working on complex layouts or editing a tricky sentence, I can save my work and see the changes. The rendered site looks different to monospaced code in my text editor, and I often spot new mistakes or issues that way.

For a long time I’d have reached for a third-party library to do this, and it’s pretty satisfying to have written my own. The whole thing is only 150 lines of code, and I understand exactly what it’s doing.

[If the formatting of this post looks odd in your feed reader, visit the original article]

Heh

May. 14th, 2026 01:20 am
ysobel: (easily distracted)
[personal profile] ysobel
So I've been watching the Poirot that aired on PBS back in the 90s, with David Suchetand I'm watching this one episode, and one of the characters looks familiar.

Now I'm not always great at placing actors, and I'm not super good at remembering names. But some people have distinctive... well in this case, a combination of ears and nose and way of moving his mouth. And I say to myself, either that is Christopher Eccleston, about ten years younger than Ninth Doctor, or it's someone very much a lookalike.

(It was CE, per credits. Ten points!)

Just One Thing (14 May 2026)

May. 14th, 2026 09:23 am
nanila: me (Default)
[personal profile] nanila posting in [community profile] awesomeers
It's challenge time!

Comment with Just One Thing you've accomplished in the last 24 hours or so. It doesn't have to be a hard thing, or even a thing that you think is particularly awesome. Just a thing that you did.

Feel free to share more than one thing if you're feeling particularly accomplished! Extra credit: find someone in the comments and give them props for what they achieved!

Nothing is too big, too small, too strange or too cryptic. And in case you'd rather do this in private, anonymous comments are screened. I will only unscreen if you ask me to.

Go!

Thankful Thursday

May. 14th, 2026 08:24 am
mdlbear: Wild turkey hen close-up (turkey)
[personal profile] mdlbear

Today I am thankful for...

  • Ticia and Bronx.
  • (Framework 12)Lilac.
  • Diclofenac and compression gloves. NO thanks for trigger finger and whatever is wrong with my left shoulder.
  • But thanks for them not being incapacitating.
  • D.F.D.F. this weekend.

[syndicated profile] lois_mcmaster_bujold_feed
A reminder...

I will be signing for Penric's Intrigues, and whatever else of mine folks want signed, this Saturday May 16th at 1 PM at Uncle Hugo's Science Fiction Bookstore here in Minneapolis.

Hugo's website with all the particulars here:

http://www.unclehugo.com/prod/index.s...

Hope to see you there!

Click back one post for links to the podcast interview I recently did for the book.

Ta, L.

posted by Lois McMaster Bujold on May, 13
[syndicated profile] aam_feed

Posted by Ask a Manager

It’s five answers to five questions. Here we go…

1. My interviewer didn’t ask me any questions

I just had my second ever job interview (I’m a college student applying to a student job on an editorial team at a big media company). I feel pretty good about it. The atmosphere was nice and relaxed, they seemed enthusiastic about me and my experience, there were no major blunders.

However, what really surprised me was the lack of questions on their part. Most of the interview time was spent on them telling me about their processes and the duties I would have on the job. I was asked one (!) question by one of the interviewers and it was a very general one. He asked me to tell him about the internship I recently had at a related company and “about my life in general.”

I’m satisfied with the answer I gave, but … I prepared for so much more! I spent hours researching the company, thinking of possible questions and preparing answers to them. Now I feel like there were barely any opportunities to showcase my abilities and interest in the job.

What does the lack of questions mean? Is it normal? Is it a sign that they weren’t interested in me after all? Or, to the contrary, is it a sign that they’re already set on hiring me and didn’t feel the need to ask many questions? Please help clear up my confusion! (In case you’re wondering: This is the only interview / final stage, there will not be more interviews that could potentially include actual questions. They said they’ll get back to me with their hiring decision in a couple of weeks.)

It mostly means they’re a bad interviewer.

It’s possible they feel like the stakes aren’t that high with a student job and so they’re more interested in warm bodies and they figured they’d just tell you about the work and see if you want to do it — but I’d argue that also falls under the “bad interviewer” umbrella, because even in a very junior level job, there are great candidates and terrible candidates and everyone in between.

Sometimes, too, the person who is charged with interviewing student candidates is fairly junior themselves and doesn’t have much/any experience hiring and so they’re sort of winging it … but you can see this with more experienced managers, too.

Chalk it up to a bad interviewer.

2. Wedding gift for my boss

My whole team and few coworkers in other departments are invited to my boss’s wedding in August. I wouldn’t have RSVP’d yes except that everyone else at work who was invited is going, so I am too. It’s a weekend in a very popular midwest summer destination about six hours from where we all live, and the cheapest hotel is ~$400 per night with a minimum three-night stay. Honestly, the money is not an issue and my husband and I are not stretching the budget to attend. That said, I feel odd about gifting my boss cash? Especially with the above costs considered. But is a boxed gift appropriate? They don’t’ have a registry that I can find (it’s a second marriage for both and they have lived together for a very long time). Is cash in an envelope going to be weird when 1) it’s my boss and 2) I know that they make three times my salary? Mabye I’m overthinking but the dynamics just feel odd and I’d love some direction.

Yeah, don’t give an envelope of cash. Frankly, I think this is a case where it’s okay to attend a wedding and just give a card, because this is your boss and the rules about not feeling pressured to give upward are still in play, despite it being a wedding. But if you’re uncomfortable with that, can you and your coworkers go in on a group gift based on something you think your boss would like? Everyone else is probably struggling with this problem too and that would solve it for all of you. (Just don’t pressure anyone to contribute — ask other people what they’re doing and present it as an option if people want to.)

Also! You don’t have to go just because your coworkers are going. A minimum three-night stay six hours away is an enormous ask, and I wonder if she issued invitations without actually expecting most of her colleagues to make it! If you’ve already RSVP’d, you may feel locked in, but if we could go back in time I’d encourage you to feel comfortable having a conflict that weekend and just sending well wishes.

3. How to say I won’t work with a specific child again

I have been dealing with a difficult situation at work, and am considering presenting management with an ultimatum. I work in early years education and for the past few months a child in my class (A) has been hitting me, kicking me, throwing water at me, etc. A has additional support needs and is young enough that they cannot injure me (although I did have one bruise that took two weeks to fade). I am one of several teachers in the class but this energy is only directly at me. We’ve had weeks with no incidents, or up to four incidents in one day. The stress of this has caused me to break down in tears several times, once so badly I went home for the day.

I was just informed I will “probably” be teaching A’s class again next year. I do not know if I will be able to return next year if this is the case. Management have said the right things to me about ensuring my safety and that I can take time away if I need to, but the only measure that’s in place is I write down the details of the incidents when they occur and to my knowledge no one has ever looked at this. I have had to fight for acknowledgement that this is a serious problem that requires action and am feeling burnt out and unappreciated. After months of my complaints, the school has started arrangements to hire a shadow teacher to support A but there is no guarantee this will stop this behavior.

I have worked here for several years with consistently glowing performance reviews. I am also uniquely valuable as I possess desirable niche skillset X but without common qualification Y which would entitle me to a 50% higher salary. These things are never certain but I believe they’d be willing to do a lot to keep me. I’m also in the fortunate position of being able to survive financially without this job, although I adore it and would be very sad to leave.

My question is about how to approach this. I read an old letter about presenting an ultimatum and you advised against over-explaining. I agree with this, and am lucky in that there’s not really a middle position, just don’t make me teach A anymore, which makes things a lot simpler. I work for an extremely small school, there’s no HR, and I suspect the reaction I’ll get will be confused sympathy. I don’t feel that anyone understands how stressful the months constant vigilance and random attacks have been and therefore my threatening to quit will make me look overemotional and unprofessional.

You don’t need to go straight to “I will quit over this” — just ask directly for what you want. For example: “I am not comfortable teaching A again for safety reasons and would like them to be placed in a different class.” You might also point out that since A hasn’t attacked anyone else, they might be more likely to thrive with another teacher — but either way, clearly state that you are requesting to have A moved.

If they refuse and you’re willing to quit over it, the next step would be a statement like, “I want to be up-front that this is something I am considering leaving over. Is that the best solution or is there anything else we can do?”

Caveat: I don’t know enough about early years education to know how often this kind of behavior comes up and if it’s something people working with young children are expected to be willing to work around (or for that matter, what the right steps are for the school to be taking, although I imagine other steps do exist since young children are essentially feral creatures). If they see it as something that anyone working with this age group needs to be prepared for, they may feel like the issue is bigger than the situation with A and that it’s more of a mismatch with the work. That doesn’t necessarily change anything about how you should proceed, but it’s something to include in your thinking too.

Related:
how to say “I’ll quit over this”

4. People keep asking me for unpaid consulting after I say no

I’m taking three to six months away from paid employment. I want to move into a new field that’s significantly different — for anonymity, let’s say teapot making to space tech. The only way to focus sufficient time and capacity to achieve this is to take time out from full-time employment. I’m making good progress, and one of my actions has been to reach out to my network to see if they have space tech connections or leads. Sometimes they ask for my resume which, while weighted heavily towards the experience I’m building in space tech, also references teapot making.

What I have found is that some connections interpret this as me being available for unpaid teapot consultancy. I am highly experienced in my old field (30 years) and if I was to consult, I’d charge and earn high fees. However, what is most important right now is time. I have a full program of professional activities to build my space tech reputation and knowledge. I am not looking for teapot projects (paid or unpaid) to fill in time.

I state clearly to these connections that I am fully focused on space tech for the next two months and will not take on other projects until then, but I’ll bookmark their project and if I decide to refocus on teapots after that, I’ll get back in contact. This message does not seem to get through. I get persistent requests to continue to be involved in teapot startups — like emailing me details of a project (which I haven’t discussed or agreed to support) on a Sunday and texting me wanting to speak the same day, then texting me again on Monday morning following up. I’ve had similar experiences where I decline a project and the requestor keeps asking, or behaves as though I’ve agreed to do it when I have said no.

Is this usual in business? Do I need to just to keep reiterating the message that I am focusing only on space tech for the next two months, or is this a culture/communication difference and other wording would be more effective? I want to remain professional and keep the option for future business open (if space tech doesn’t work out), while also communicating clearly without appearing abrupt or rude. Are there any insights or scripts you can provide?

No, it’s not usual, which makes me think something about your wording might not be as clear as it needs to be (although it sounds pretty clear!). I would stop saying that you’ll bookmark their project and get back to them if something changes, since that may be muddying the message. Instead, just say, “I’m not currently taking on teapot projects so can’t help, but best of luck with it.” If you can refer them to someone else instead, you can do that. But otherwise stick with “I’m not currently taking on this work” and don’t get into whether you might change your mind in the future.

After you do that, if someone continues to ask for your involvement, say this: “I apologize if I wasn’t clear: I am not available to assist with this. I hope you can find someone who can help!”

5. Can my job make me close the store five nights a week?

I am a key holder closing the shop three days a week and the other days I do restocking, customer service, etc. Now my bosses are trying to give me five days to close, which I don’t want because it is a lot responsibility and I burn out. Can they force me to do that?

Yes, they can make it a requirement of your job. But you can try pushing back, by explaining that you don’t want to or you’re not available at those hours that many nights per week or whatever makes sense. They can still decide it’s a job requirement for you now, but you can have a discussion about it where you attempt to change their minds. If they want to keep you, they should have at least some incentive to try to find other solutions (if they exist).

The post interviewer didn’t ask me any questions, people keep asking for unpaid consulting, and more appeared first on Ask a Manager.

[personal profile] tcampbell1000 posting in [community profile] scans_daily
Part 95b of 105.

When I started looking into this, I believed Countdown to Infinite Crisis #1 was the first story to suggest Max was a straight-up bad guy, even after his ordeal with the sentient computer. This is not true. His last appearance in JLA, in 1996, is at least ambiguous…



And two John Ostrander stories in 2000 and 2001 also tinkered with Max’s moral alignment, one much more blatantly than the other. Maybe Ostrander was angling to get Max onto the next Suicide Squad? )

More Vague, But More Useful

May. 12th, 2026 03:22 pm
[syndicated profile] in_the_pipeline_feed

I think that many synthetic organic chemists will be able to relate to the approach described in this paper, on software-aided route design. Its authors are trying to make such software take a viewpoint from higher over the synthesis, rather than working out every reaction. As noted in this commentary, for larger molecules that can leave you with a forest of rather-similar routes that differ in choice of protecting groups, relative oxidation states, order of reactions and other details that (in many cases) can well be adjusted when work is underway.

Instead, the idea is to generalize more about functional groups and bond disconnections. What you get is a route that’s based somewhat more on abstractions, but ones that a synthetic chemist can recognize and work with: “OK, there’s going to need to be an aminomethylene group coming off here; we’ll assume that’s going to be derived from some sort of carbonyl - could be an amide formation followed by reduction, or a reductive amination off an aldehyde, whatever.” That sort of thing, as you can see at right. It’s more of a strategic approach than a tactics-based approach. This way the different routes that might be generated really do have a greater chance of being different from each other, rather than being lists of variations on a theme. Looking at the paper, you can tell that it took a lot of human-intensive curation to generate the general pathways, but I think it’s worth the effort.

This is a lot closer to how most experienced chemists think, and the software hands off its suggestions in a form that a chemist is ready to evaluate and work with. Honestly, that’s what many of us do with a machine-generated route anyway - “It says here I need a methyl ester, but there are alternatives that I need to keep in mind”. The approach even avoids (a bit) the trap of having to depend on the huge shaggy mass of reported reactions, some of which may be real and some of which may not. “We’ll assume that there is a way to get this metal-catalyzed coupling step to work” is probably a lot closer to the truth than “Here, trust these exact conditions from this paper over here”. I mean, you might want to start with those, sure, but with only limited expectations that they will do the job for you. I well remember my first boss in my first job in this business sighing as yet another paper or patent reaction didn’t work as advertised, and saying “Lie, all lies”.

There’s still a huge amount of work to do to make computer-based retrosynthesis realize its promise; the problems mentioned in this post haven’t gone away. In the end, I think we’re still going to have to recapitulate much of the literature under more controlled conditions (and, I would recommend, with more attention to reaction scope than the original papers may have provided!) It will be an interesting problem to figure out where to direct such efforts for maximum impact, i.e., which parts of the chemistry literature need the most shoring up for the biggest real-world effect? Better knowledge of the rules behind metal-catalyzed couplings are an obvious place to start (there are rules, right?), but nominations for other candidates are welcome below. . .

[syndicated profile] gallusrostromegalus_feed


grammarpedant:

thefugitivesaint:

Rabindranath Tagore (1861-1941), poem 85 from “The Gardener”, 1914

Translated by the author from the original Bengali. New York: The Macmillan Company.

It is an hundred years hence now. Go open your doors.

Day 1940: “Major red flags.”

May. 13th, 2026 04:32 pm
[syndicated profile] wtfjht_feed

Posted by Matt Kiser

Day 1940

Today in one sentence: Senate Republicans blocked a resolution to stop Trump’s war with Iran for the seventh time; the Senate confirmed Kevin Warsh as Federal Reserve chair; U.S. producer prices rose 1.4% in April and 6% from a year earlier; the Trump administration will withhold $1.3 billion in federal Medicaid reimbursements from California; the Department of Homeland Security’s inspector general is investigating ICE’s $38 billion warehouse-to-detention program; Trump’s Justice Department is discussing whether to settle Trump’s $10 billion lawsuit against the IRS, an agency he oversees; and the White House is considering a plan for Trump to issue 250 pardons to mark America’s 250th birthday.


1/ Senate Republicans blocked a resolution to stop Trump’s war with Iran for the seventh time. However, Republican Lisa Murkowski joined Rand Paul and Susan Collins in supporting the Democratic measure, leaving it one vote short. The Trump administration claims the April ceasefire “terminated” hostilities, making congressional authorization unnecessary. But U.S. forces remain deployed in the region, the blockade of the Strait of Hormuz continues, and Defense Secretary Pete Hegseth claims Trump can resume strikes without Congress. “It doesn’t appear that hostilities have ended,” Murkowski said. (CBS News / New York Times / The Hill / Washington Post / Associated Press)

2/ The Senate confirmed Kevin Warsh as Federal Reserve chair in a 54-45 vote. Warsh will replace Federal Reserve Chair Jerome Powell, whose term ends Friday. Powell, however, plans to remain on the Board of Governors. Terms for governors last 14 years, while the chair’s term lasts four years. Warsh, who replaces Stephen Miran on the board, has pledged independence, but Sen. Elizabeth Warren called him a “sock puppet” for Trump. Inflation tied to the Iran war and Trump’s tariffs has complicated Trump’s demand for lower interest rates, and markets are currently not expecting a June rate cut. (CNBC / Bloomberg / Politico / Wall Street Journal / Washington Post)

3/ U.S. producer prices rose 1.4% in April and 6% from a year earlier – the biggest annual increase since late 2022. Energy costs led the increase, with gasoline up 15.6%, with services, trade margins, and shipping costs also rising. The data followed a 3.8% annual increase in consumer prices. (Associated Press / CNBC / Reuters / New York Times / Axios)

4/ The Trump administration will withhold $1.3 billion in federal Medicaid reimbursements from California. JD Vance claimed California had “not taken fraud very seriously,” while Mehmet Oz said the state must “come to the table” to explain outlier billing. Oz said California’s records showed “major red flags,” including $630 million in billing, $500 million in home health services, and $200 million in questionable spending. California, however, disputed the accusation, saying its home care program grew because it’s “keeping more people OUT of far more expensive nursing homes.” CMS also imposed a six-month freeze on new Medicare enrollments for hospice and home health agencies, but current Medicaid beneficiaries and existing Medicare providers aren’t supposed to lose coverage or services. (Reuters / Associated Press / CBS News / NBC News / Wall Street Journal / New York Times / Politico)

5/ The Department of Homeland Security’s inspector general is investigating ICE’s $38 billion warehouse-to-detention program. Under former DHS Secretary Kristi Noem, DHS paid at least $1 billion for nine facilities, while ICE bought 11 vacant warehouses that weren’t zoned for detention at Noem’s direction. New DHS Secretary Markwayne Mullin has since paused the plan. (Wall Street Journal)

6/ Trump’s Justice Department is discussing whether to settle Trump’s $10 billion lawsuit against the IRS, an agency he oversees. Trump sued after a former IRS contractor leaked his tax records, claiming the agency “wrongly allowed” a “rogue, politically-motivated employee” to disclose them. The talks come as U.S. District Judge Kathleen Williams is questioning whether Trump and the IRS are truly opposing parties, since Trump is both the plaintiff and the president overseeing the defendant agency. Options under discussion include having the IRS drop audits of Trump, his family, and his businesses, paying Trump taxpayer funds, or giving him some other unspecified public benefit as part of a pre-deadline settlement. (New York Times / CNN)

7/ The White House is considering a plan for Trump to issue 250 pardons to mark America’s 250th birthday. The discussions are preliminary, and some officials have raised concerns about granting so many pardons before the midterms. There were more than 16,000 formal pardon requests last year. (Wall Street Journal)

The 2026 midterms are in 174 days; the 2028 presidential election is in 909 days.


😒 Dept. of Election Meddling.

  1. South Carolina GOP Gov. Henry McMaster is expected to announce a special session on redistricting. The new map would eliminate Democratic Rep. Jim Clyburn’s seat, leaving the state with seven likely red seats and no Democratic-leaning ones. (Politico)
  2. Republicans in the Louisiana Senate voted to advance a new congressional map that would eliminate one of Louisiana’s two majority-Black districts and give Republicans a 5-1 advantage. (NBC News)
  3. The Missouri Supreme Court approved the state’s Republican-drawn map, creating an additional Republican-leaning seat. (Politico)
  4. Alabama Gov. Kay Ivey set special primary elections for four House races using its 2023 congressional map that includes one majority-Black district. (New York Times)
  5. Georgia Gov. Brian Kemp is calling a special legislative session to redraw his state’s congressional map for the 2028 cycle. Kemp declined to take up redistricting for this cycle. (Politico)


Support today’s essential newsletter and resist the daily shock and awe: Become a member

Subscribe: Get the Daily Update in your inbox for free

Daily Check-In

May. 13th, 2026 06:00 pm
starwatcher: Western windmill, clouds in background, trees around base. (Default)
[personal profile] starwatcher posting in [community profile] fandom_checkin
 
This is your check-in post for today. The poll will be open from midnight Universal or Zulu Time (8pm Eastern Time) on Wednesday May 13, to midnight on Thursday, May 14. (8pm Eastern Time).

Poll #34588 Daily Check-in
Open to: Access List, detailed results viewable to: Access List, participants: 19

How are you doing?

I am OK.
13 (68.4%)

I am not OK, but don't need help right now.
6 (31.6%)

I could use some help.
0 (0.0%)

How many other humans live with you?

I am living single.
7 (36.8%)

One other person.
10 (52.6%)

More than one other person.
2 (10.5%)




Please, talk about how things are going for you in the comments, ask for advice or help if you need it, or just discuss whatever you feel like.
 
jesse_the_k: kitty pawing the surface of vinyl record (scratch this!)
[personal profile] jesse_the_k

This is our song for me and MyGuy. When we met in 1977, we both lived right on Lake Mendota. We walked everywhere — fortunately, Madison is a lovely city for strolling.

Listen on YouTube or stream it here )

The cool thing is we actually did talk about all the things in these lyrics

Wouldn’t it be nice to walk together
Baring our souls while wearing out the leather
We could talk shop, harmonize a song
Wouldn’t it be nice to walk along

I’ll show you houses of architectural renown
Some are still standing, some have fallen down
Farm houses buried under Canada’s snow
Spanish villas on the Boulevards of Mexico

And I’ll learn to tell the ash from the oak
And if you don’t know I won’t make no joke
We’ll climb to the top to view the world from above
Or carve our initials in the trunk like teenagers in love

And when we get hungry we’ll stop to eat
Gotta think of our stomachs and rest our feet
If we get thirsty we’ll have a drink or two
In a mountain top bar with a mountain top view

And when we get tired we’ll stop to rest
And if you still want to talk you can bare your breast
If it’s Winter and cold we’ll take a rooming-house room
If it’s Summer and warm we’ll sleep under the moon

And we’ll talk about the sports we played
‘Bout the time you got busted or the time I got laid
We’ll talk blood and how we were bred
Talk about the folks both living and dead

This song like this walk I find hard to end
Be my lover or be my friend
In sneakers or boots or regulation shoes
Walking beside you I’ll never get the walking blues.

https://www.mcgarrigles.com/music/dancer-with-bruised-knees/walking-song

[syndicated profile] otw_news_feed

Posted by therealmorticia

Do you have experience in managing or leading people? Are you a frequent Bluesky, Twitter | X, or RedNote user who enjoys helping others? Are you interested in the rescue and preservation of fanworks? The Organization for Transformative Works is recruiting!

We’re excited to announce the opening of applications for:

  • Fanlore Chair Track Volunteer – closing 20 May 2026 at 23:59 UTC or after 40 applications
  • Communications Social Media Moderator – closing 20 May 2026 at 23:59 UTC or after 60 applicants
  • Communications Social Media Moderator (Chinese) – closing 20 May 2026 at 23:59 UTC or after 60 applicants
  • Open Doors Import Assistant – closing 20 May 2026 at 23:59 UTC or after 40 applications

We have included more information on each role below. Open roles and applications will always be available at the volunteering page. If you don’t see a role that fits with your skills and interests now, keep an eye on the listings. We plan to put up new applications every few weeks, and we will also publicize new roles as they become available.

All applications generate a confirmation page and an auto-reply to your e-mail address. We encourage you to read the confirmation page and to whitelist our email address in your e-mail client. If you do not receive the auto-reply within 24 hours, please check your spam filters and then contact us.

If you have questions regarding volunteering for the OTW, check out our Volunteering FAQ.

Fanlore Chair Track Volunteer

Do you have experience in managing or leading people? Are you an organizational wizard? Do you have an interest in preserving fannish history or experience in wiki editing? The Fanlore committee is looking for new Chair Track Volunteers to join our team!

Fanlore is the committee responsible for maintaining and promoting the Fanlore wiki. We promote Fanlore on social media, run Fanlore editing challenges, support Fanlore editors, write the wiki’s policy and help pages, and respond to emails from editors and readers. The Chair Track Volunteer position is for people who have the time and dedication to learn all about our operations so that they can be considered for the role of committee Chair.

We’re looking for someone who has experience in wiki editing and an understanding of social media, who is comfortable with personnel management and training new recruits, and who is experienced in leadership or management whether in a business or nonprofit environment. Candidates also need strong time management skills and the ability to work on and track multiple tasks at a time. If that’s you, please apply!

For your application to be considered, you will be required to complete a short task within one week of submitting your application.

You must be 18+ in order to apply for this role.

Applications are due 20 May 2026 or after 40 applications

Apply to be a Fanlore Chair Track Volunteer at the volunteering page! If you have further questions, please contact us.

Communications Social Media Moderator

Are you familiar with Bluesky and Twitter | X? Do you want to help connect the public with the OTW?

The Communications committee is recruiting for Social Media Moderators to help us manage our Bluesky and Twitter | X. Social Media Moderators will help the OTW maintain an active presence on their platform, creating or reblogging a range of posts of relevance and interest to the OTW’s userbase, and doing outreach to fan groups and individuals on the site. Moderators are also responsible for handling user questions and managing responses to the OTW’s news content. You will be working as part of a team, and you must be able to dedicate at least 3-4 hours each week to the OTW.

For this position, we are seeking people who are familiar with both platforms as they are managed jointly by the same team of people and who ideally have experience moderating a social media page. We are also interested in hearing from those with customer service experience, especially in an online environment. We expect you to have an interest in fandom at large and an understanding of the concerns and activities of the OTW (although we will, of course, provide you with training once you start).

You must be 18+ in order to apply for this role. If you’re a frequent Bluesky or Twitter | X user who enjoys helping others, have a wide-ranging interests across the fandom space, and are curious and willing to learn, we’d love to hear from you!

Applications are due 20 May 2026 or after 60 applications

Apply to be a Communications Social Media Moderator at the volunteering page! If you have further questions, please contact us.

Communications Social Media Moderator (Chinese)

Do you use RedNote? Do you want to connect Chinese fans with the OTW?

The Communications committee is recruiting for RedNote Moderators to help start up and oversee the OTW’s presence on RedNote, the Chinese social networking site.

RedNote Moderators will be part of a team creating content for the OTW RedNote, posting regularly about topics related to the OTW. Moderators will also respond to user questions and comments to help them find answers to their questions about the OTW’s projects. Additionally, they will act as a link between the OTW and the RedNote community, providing updates to the rest of the OTW on trends and events within Chinese fan communities.

You are required to be fluent in both English and Mandarin Chinese and must be over 18 to apply for this role.

We are looking for volunteers familiar with RedNote and passionate about outreach on the platform. They should be able to maintain a consistent level of work, collaborate inside the team and with other committees, ask for help when needed, and be proactive about suggesting ways the OTW can better connect with its users. If you’re interested in doing outreach to Chinese-language fandom communities, this is the position for you!

Applications are due 20 May 2026 or after 60 applications

Apply to be a Communications Social Media Moderator (Chinese) at the volunteering page! If you have further questions, please contact us.

Open Doors Import Assistant

Do you enjoy spreadsheets, self-paced projects, and helping protect fanworks from getting lost over time? Are you interested in the rescue and preservation of fanworks? Do you still guiltily–or not so guiltily–love the first fanwork that opened your eyes to fandom?

Open Doors is a committee dedicated to preserving fanworks in their many formats, and we’re looking for volunteers to support this goal. The work we do preserves fan history, love, and dedication to fandom: we keep fanworks from offline and at-risk archives from being lost, divert fanzines from the trash, and more.

Our import assistants contribute to our goal by:

  • Importing works to AO3 from rescued digital archives and fanzines
  • Searching AO3 for existing copies of works that creators have already uploaded themselves (to prevent us from importing duplicate versions when we import an archive)
  • Compiling and correcting spreadsheets of works from an archive to be imported and/or tags to use on those works
  • Copyediting/proofreading works from fanzines that have been scanned from PDFs (to ensure that the scanned works were transcribed properly by the software we used)

The training is self-directed, and so is the work for the most part, though we also have weekly working meetings/parties for people to all chip in and work on tasks together! Import assistants can generally alternate the types of tasks they work on. At any one time, we usually have several tasks of different types available.

To apply for this role, you must be at least 18 years old and legally of age to open explicit fanworks in your local jurisdiction.

If you’re interested, click on through for a longer description of what we’re looking for and the time commitment. For your application to be considered, you will be required to complete a short task within 3 days of submitting your application.

Applications are due 20 May 2026 or after 40 applications

Apply to be an Open Doors Import Assistant at the volunteering page! If you have further questions, please contact us.

[ SECRET POST #7068 ]

May. 13th, 2026 05:06 pm
case: (Default)
[personal profile] case posting in [community profile] fandomsecrets

⌈ Secret Post #7068 ⌋

Warning: Some secrets are NOT worksafe and may contain SPOILERS.


01.



More! )


Notes:

Secrets Left to Post: 01 pages, 18 secrets from Secret Submission Post #1009.
Secrets Not Posted: [ 0 - broken links ], [ 0 - not!secrets ], [ 0 - not!fandom ], [ 0 - too big ], [ 0 - repeat ].
Current Secret Submissions Post: here.
Suggestions, comments, and concerns should go here.

Profile

azurelunatic: Vivid pink Alaskan wild rose. (Default)
Azure Jane Lunatic (Azz) 🌺

May 2026

S M T W T F S
     12
3456 789
10111213141516
17181920212223
24252627282930
31      

Most Popular Tags

Style Credit

Page generated May. 14th, 2026 11:21 am
Powered by Dreamwidth Studios