Login
You're viewing the code4lib.social public feed.
  • Jul 25, 2024, 11:32 PM

    I really like the process (or at least _my_ process) of developing protocol-things with @glyph 's Automat ... maybe I should blog a blog-post about it 🤔

    💬 1🔄 0⭐ 0

Replies

  • 💬 1🔄 0⭐ 0
  • Jul 25, 2024, 11:38 PM

    @meejah after a torturous API design process I am mostly putting the finishing touches on it now, just struggling with the fact that this is a very odd thing where I have an object where the relevant method-dispatch wants to happen based on the type of the *last* argument, not `self`

    💬 1🔄 0⭐ 0
  • Jul 25, 2024, 11:39 PM

    @glyph That does sound a little weird ;) is the in-progress / proposed design or examples somewhere?

    💬 1🔄 0⭐ 0
  • Jul 25, 2024, 11:40 PM

    @glyph Also, it still does the diagrams right?

    That's like 90% of the point of my first post: you can "write the diagrams" with Python code which -- when you're happen with the state-machine diagram -- becomes the starting point for where you fill in the "real" code (at this point, my diagrams usually get ... bigger ;)

    💬 0🔄 0⭐ 0
  • 💬 1🔄 0⭐ 0
  • Jul 25, 2024, 11:43 PM

    @meejah But, to answer your question: yes, it still does the diagrams. I'm still using the same core "Automaton" object for the state transitions, and most of the logic for the diagrammer was based on that. I've tightened up the types on that one too to make it generic ;)

    💬 1🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0