Yesterday I: 2023-02-08

  • Wearables appear to be heating up, probably time to revisit Beam
    • Monacle appeared on the front page of HN today
    • Still getting ads for similar AR glasses on Amazon
    • Combined with a smart-watch or even just a quick haptic button, I think Beam could be a reasonable reality

Python websockets

Gracefully Stopping a Server

#!/usr/bin/env python

import asyncio
import signal
import websockets

async def echo(websocket):
    async for message in websocket:
        await websocket.send(message)

async def server():
    # Set the stop condition when receiving SIGTERM.
    loop = asyncio.get_running_loop()
    stop = loop.create_future()
    loop.add_signal_handler(signal.SIGTERM, stop.set_result, None)

    async with websockets.serve(echo, "localhost", 8765):
        await stop



Python releasing the GIL in C code

#include "Python.h"
PyObject *pyfunc(PyObject *self, PyObject *args)
    // Threaded C code. 
    // Must not use Python API functions
    return result;



"people managers" should be measured by:

  1. How well they retain people
  2. How effective their teams are at accomplishing their goals and expectations
  3. How few people they can have to still reasonably accomplish goals without being a detriment to 1 and 2
    • Things get complicated when abstract and difficult to identify and manage interactions between 1 and 3
      • For example, if your team is understaffed and unable to properly engineer things, rework existing things, document, train up new hires, etc. it can eventually lead to failing at 1
      • Further, while individuals may be willing to communicate dissatisfaction, not everyone will
        • Emphasizes importance of trust between ICs and managers
        • Once that trust is loss, it's far harder to gain it back

  • You can execute CLJS in blocks in Logseq
        (inc 1)