# Finite-state machine

A finite-state machine is an abstract computational model with a finite set of states and a state-transition function.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Arista cEOS Does Not Apply ACLs to Control-Plane Traffic

DevFeed: [Arista cEOS Does Not Apply ACLs to Control-Plane Traffic](<https://devfeed.tech/articles/arista-ceos-does-not-apply-acls-to-control-plane-traffic-11421.md>)

Original publisher: [Read original article](<https://blog.ipspace.net/2026/08/arista-ceos-acl-control-plane-traffic/>)

Published: 2026-08-24T05:20:00Z

Content type: opinion

Language: en

Sources: [ipSpace.net blog](<https://devfeed.tech/sources/ipspace-net-blog.md>)

Topics: [Network](<https://devfeed.tech/topics/network.md>), [BGP](<https://devfeed.tech/topics/bgp.md>), [Containers](<https://devfeed.tech/topics/containers.md>), [Finite-state machine](<https://devfeed.tech/topics/finite-state-machine.md>), [configuration](<https://devfeed.tech/topics/configuration.md>)

Tags: [bgp](<https://devfeed.tech/tags/bgp.md>), [containers](<https://devfeed.tech/tags/containers.md>), [netlab](<https://devfeed.tech/tags/netlab.md>), [network](<https://devfeed.tech/tags/network.md>), [release](<https://devfeed.tech/tags/release.md>), [security](<https://devfeed.tech/tags/security.md>), [testing](<https://devfeed.tech/tags/testing.md>)

### AI overview

The article reports that Arista cEOS containers do not apply inbound ACLs to control-plane traffic or to traffic sent to the container's own IP addresses. This behavior differs from Arista vEOS virtual machines and can cause BGP connectivity tests using ACLs to produce unexpected results.

### Source excerpt

When someone starts singing the Use Digital Twins to Test Your Network hymn (or, more recently, tells you how AI agents can do that to validate their ideas), ask them about these minor details. If they persist, point them (not that it would help) to this long list of gotchas. That list just got longer: Arista cEOS container does not apply inbound ACLs to control-plane traffic (Arista vEOS VM does). Read more ...

## Exploring the BGP Neighbor CONNECT State

DevFeed: [Exploring the BGP Neighbor CONNECT State](<https://devfeed.tech/articles/exploring-the-bgp-neighbor-connect-state-11422.md>)

Original publisher: [Read original article](<https://blog.ipspace.net/2026/08/exploring-bgp-connect-state/>)

Published: 2026-08-18T05:16:00Z

Content type: article

Language: en

Sources: [ipSpace.net blog](<https://devfeed.tech/sources/ipspace-net-blog.md>)

Topics: [BGP](<https://devfeed.tech/topics/bgp.md>), [networking](<https://devfeed.tech/topics/networking.md>), [Finite-state machine](<https://devfeed.tech/topics/finite-state-machine.md>), [Routing (disambiguation)](<https://devfeed.tech/topics/routing.md>)

Tags: [bgp](<https://devfeed.tech/tags/bgp.md>), [blog-post](<https://devfeed.tech/tags/blog-post.md>), [debug](<https://devfeed.tech/tags/debug.md>), [routing](<https://devfeed.tech/tags/routing.md>)

### AI overview

An exploration of how Cisco IOS/XE presents the BGP neighbor CONNECT state during an incoming TCP session. The article tests several lab scenarios involving passive neighbors, static discard routes, ACLs, and suppressed ICMP unreachable messages, finding that CONNECT appears in BGP debugging output while the neighbor remains Idle in the displayed operational state.

### Source excerpt

Sakar left an interesting comment on my The Curious Case of the BGP Connect State blog post, claiming that Cisco IOS/XE goes through a CONNECT state when opening an incoming BGP session. I wanted to double-check this behavior, so I needed a scenario where one router would keep sending TCP SYN requests, the other would not (or we wouldn't learn anything), and the two routers could not communicate (or they'd quickly go into the OPEN state). Here's my first attempt at meeting those requirements: Read more ...

## Introducing pg\_re2, fast, RE2-powered regular expressions in Postgres

DevFeed: [Introducing pg\_re2, fast, RE2-powered regular expressions in Postgres](<https://devfeed.tech/articles/introducing-pg-re2-fast-re2-powered-regular-expressions-in-postgres-5337.md>)

Original publisher: [Read original article](<https://clickhouse.com/blog/introducing-pg_re2-regex-in-postgres>)

Author: David Wheeler; Philip Dubé

Published: 2026-07-08T18:12:04Z

Content type: article

Language: en

Sources: [ClickHouse Blog](<https://devfeed.tech/sources/clickhouse-blog.md>)

Topics: [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [Regular expression](<https://devfeed.tech/topics/regular-expression.md>), [Extension](<https://devfeed.tech/topics/extension.md>), [Benchmark](<https://devfeed.tech/topics/benchmark.md>), [Finite-state machine](<https://devfeed.tech/topics/finite-state-machine.md>), [Automaton](<https://devfeed.tech/topics/automaton.md>), [clickhouse](<https://devfeed.tech/topics/clickhouse.md>), [Open Source](<https://devfeed.tech/topics/open-source.md>)

Tags: [algorithms](<https://devfeed.tech/tags/algorithms.md>), [article](<https://devfeed.tech/tags/article.md>), [aws](<https://devfeed.tech/tags/aws.md>), [benchmark](<https://devfeed.tech/tags/benchmark.md>), [benchmarks](<https://devfeed.tech/tags/benchmarks.md>), [clickhouse](<https://devfeed.tech/tags/clickhouse.md>), [development](<https://devfeed.tech/tags/development.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [extension](<https://devfeed.tech/tags/extension.md>), [open](<https://devfeed.tech/tags/open.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [performance](<https://devfeed.tech/tags/performance.md>), [postgres](<https://devfeed.tech/tags/postgres.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [sql](<https://devfeed.tech/tags/sql.md>)

### AI overview

This article introduces pg_re2, a PostgreSQL extension that adds fast RE2-powered regular expression functions. It explains the performance and compatibility rationale, compares RE2 with PostgreSQL's native engine, and reports benchmark results showing RE2 outperforming the native functions in the tested cases.

### Source excerpt

Introducing pg_re2, a Postgres extension that brings ClickHouse's fast RE2-powered regular expressions to Postgres, with benchmarks and pg_clickhouse pushdown integration.

## From Structured Outputs to A2UI Surfaces: Migrating to Flutter GenUI SDK

DevFeed: [From Structured Outputs to A2UI Surfaces: Migrating to Flutter GenUI SDK](<https://devfeed.tech/articles/from-structured-outputs-to-a2ui-surfaces-migrating-to-flutter-genui-sdk-23050.md>)

Original publisher: [Read original article](<https://medium.com/flutter-community/from-structured-outputs-to-a2ui-surfaces-migrating-to-flutter-genui-sdk-4f09aeacee80?source=rss----86fb29d7cc6a---4>)

Author: Cagatay Ulusoy

Published: 2026-07-08T15:52:59Z

Content type: tutorial

Language: en

Sources: [Flutter Community - Medium](<https://devfeed.tech/sources/flutter-community-medium.md>)

Topics: [Flutter](<https://devfeed.tech/topics/flutter.md>), [SDKs](<https://devfeed.tech/topics/sdks.md>), [Finite-state machine](<https://devfeed.tech/topics/finite-state-machine.md>), [JSON](<https://devfeed.tech/topics/json.md>), [Firebase](<https://devfeed.tech/topics/firebase.md>), [Database](<https://devfeed.tech/topics/database.md>)

Tags: [a2ui](<https://devfeed.tech/tags/a2ui.md>), [ai](<https://devfeed.tech/tags/ai.md>), [firebase](<https://devfeed.tech/tags/firebase.md>), [flutter](<https://devfeed.tech/tags/flutter.md>), [gemini](<https://devfeed.tech/tags/gemini.md>), [generative-ui](<https://devfeed.tech/tags/generative-ui.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [json](<https://devfeed.tech/tags/json.md>), [sdk](<https://devfeed.tech/tags/sdk.md>), [state](<https://devfeed.tech/tags/state.md>)

### AI overview

A tutorial on migrating a hand-built generative UI feature based on Gemini structured outputs to the official Flutter GenUI SDK. It describes a Finnish language-learning app that generates images on demand and uses a five-step wizard to improve image variety.

### Source excerpt

Part 3 of a series "Building Image Assisted Language Learning Practice with Flutter, Firebase and Gemini." Part 1 built the image generation and annotation pipeline. Part 2 built a generative UI framework by hand, using Gemini structured outputs. This part is the migration: same feature, official Flutter GenUI SDK. A year ago, Finnish It was just a side project. This spring, I watched it at the Google Cloud Next developer keynote, and again in the Flutter keynote at Google I/O. It still feels surreal to type that. I am grateful to the Flutter and Firebase teams for the collaboration. This series is my way of giving back. I hope it makes Flutter GenUI SDK click for you the way building this feature made it click for me. Finnish it app featured in Cloud Next and Google IOQuick Recap One of the app's practice exercises is simple: show the learner an image, and they describe it in 🇫🇮 Finnish. The images are generated on demand, not fetched from a fixed image database. In Part 2 the problem was variety. A broad topic like "a native Finnish animal in its habitat" kept producing the same handful of scenes. Turning up temperature did not fix it, because it was never really a sampling problem. An under-specified prompt has a few big probability peaks, and the sampler just jitters around them. The fix was to stop asking the model to "be random" and move the entropy into the UI: a five-step wizard where the user picks the season, the setting, the story, the framing, and the visible details. Gemini designs the questions; the user provides the variety. That worked. The repetition problem was solved. The machine I built by hand To make it work, I built a small finite state machine (FSM) which walked the user through five steps. Each step asked Gemini for question set, constrained by a response schema, and parsed the JSON into a typed object that a widget could render: final response = await model.generateContent( [Content.text(_buildRefinementStateRequest(state, topic, selections

## Solving regex crosswords with Z3

DevFeed: [Solving regex crosswords with Z3](<https://devfeed.tech/articles/solving-regex-crosswords-with-z3-21962.md>)

Original publisher: [Read original article](<https://blog.nelhage.com/post/regex-crosswords-z3/>)

Author: Nelson Elhage

Published: 2025-10-21T14:00:00Z

Content type: tutorial

Language: en

Sources: [Nelson Elhage](<https://devfeed.tech/sources/nelson-elhage.md>)

Topics: [Regular expression](<https://devfeed.tech/topics/regular-expression.md>), [Automaton](<https://devfeed.tech/topics/automaton.md>), [Finite-state machine](<https://devfeed.tech/topics/finite-state-machine.md>), [Python](<https://devfeed.tech/topics/python.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [dfa](<https://devfeed.tech/tags/dfa.md>), [experimentation](<https://devfeed.tech/tags/experimentation.md>), [performance](<https://devfeed.tech/tags/performance.md>), [python](<https://devfeed.tech/tags/python.md>), [regex](<https://devfeed.tech/tags/regex.md>)

### AI overview

This technical post explains how to solve regular-expression crossword puzzles with a Z3-backed solver. It describes encoding regular expressions as deterministic finite automata, using a Python library to convert regex syntax to finite-state machines, and exploring solver performance and implementation improvements.

### Source excerpt

For a while now, I've been fascinated by Z3 and by SMT solving more broadly. While on pat leave recently, I was reminded of the existence of regular-expression crossword puzzles, and allowed myself to get nerdsniped by writing a Z3-backed solver. I expected to spend perhaps an afternoon cranking out a quick solver; I ended up getting sucked into understanding and debugging Z3 performance, and learning far more about Z3 and about SMT than I expected.

## Design Decisions Behind app.build, a Prompt-to-App Generator

DevFeed: [Design Decisions Behind app.build, a Prompt-to-App Generator](<https://devfeed.tech/articles/design-decisions-behind-app-build-a-prompt-to-app-generator-5195.md>)

Original publisher: [Read original article](<https://neon.com/blog/design-decisions-behind-app-build>)

Author: Arseni Kravchenko

Published: 2025-06-26T14:36:49Z

Content type: article

Language: en

Sources: [Blog -- Neon Docs](<https://devfeed.tech/sources/blog-neon-docs.md>)

Topics: [App](<https://devfeed.tech/topics/app.md>), [Code generation](<https://devfeed.tech/topics/code-generation.md>), [Artificial Intelligence](<https://devfeed.tech/topics/ai.md>), [CRUD](<https://devfeed.tech/topics/crud.md>), [Finite-state machine](<https://devfeed.tech/topics/finite-state-machine.md>), [AI-assisted coding](<https://devfeed.tech/topics/ai-assisted-coding.md>), [Open Source](<https://devfeed.tech/topics/open-source.md>), [Web](<https://devfeed.tech/topics/web.md>), [Claude](<https://devfeed.tech/topics/claude.md>), [cursor](<https://devfeed.tech/topics/cursor.md>)

Tags: [agent](<https://devfeed.tech/tags/agent.md>), [ai](<https://devfeed.tech/tags/ai.md>), [app](<https://devfeed.tech/tags/app.md>), [code](<https://devfeed.tech/tags/code.md>), [code-generation](<https://devfeed.tech/tags/code-generation.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [product](<https://devfeed.tech/tags/product.md>), [validation](<https://devfeed.tech/tags/validation.md>), [web](<https://devfeed.tech/tags/web.md>), [web-apps](<https://devfeed.tech/tags/web-apps.md>)

### AI overview

This article explains the design decisions behind app.build, an open-source AI code generator for CRUD web applications. It prioritized reliability over advanced capabilities through limited scope, FSM-guided tree-search actors, extensive validation, and error-analysis feedback loops for context management.

### Source excerpt

TL;DR: We built app.build, a reliable open-source AI code generator by: limiting initial scope to CRUD web apps, using FSM-guided tree-search actors, implementing extensive validation, and encapsulating context management using an error analysis feedback loop. These architectural...

## Understanding and Observing the BGP Connect State

DevFeed: [Understanding and Observing the BGP Connect State](<https://devfeed.tech/articles/the-curious-case-of-the-bgp-connect-state-11112.md>)

Original publisher: [Read original article](<https://blog.ipspace.net/2025/01/bgp-connect-state/>)

Published: 2025-01-30T06:55:00Z

Content type: article

Language: en

Sources: [ipSpace.net blog](<https://devfeed.tech/sources/ipspace-net-blog.md>)

Topics: [BGP](<https://devfeed.tech/topics/bgp.md>), [Finite-state machine](<https://devfeed.tech/topics/finite-state-machine.md>), [Cisco](<https://devfeed.tech/topics/cisco.md>)

Tags: [arp](<https://devfeed.tech/tags/arp.md>), [bgp](<https://devfeed.tech/tags/bgp.md>), [cisco](<https://devfeed.tech/tags/cisco.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [machine](<https://devfeed.tech/tags/machine.md>), [mpls](<https://devfeed.tech/tags/mpls.md>), [state](<https://devfeed.tech/tags/state.md>), [tcp](<https://devfeed.tech/tags/tcp.md>)

### AI overview

The article explains why the BGP Connect state is difficult to observe, especially on Cisco IOS, whose implementation predates the state and does not display it. It describes the BGP state transitions and conditions that can cause a peer to remain in Connect long enough to observe, including dropped TCP SYN packets and certain routing or filtering configurations.

### Source excerpt

I got this question from Paul: Have you ever seen a BGP peer in the "Connect" state? In 20 years, I have never been able to see or reproduce this state, nor any mention in a debug/log. I am starting to believe that all the documentation is BS, and this does not exist. The BGP Finite State Machine (FSM) (at least the one defined in RFC 4271 and amended in RFC 9687) is "a bit" hard to grasp but the basics haven't changed from the ancient days of RFC 1771: Read more ...

## Getting into formal specification, and getting my team into it too

DevFeed: [Getting into formal specification, and getting my team into it too](<https://devfeed.tech/articles/getting-into-formal-specification-and-getting-my-team-into-it-too-12522.md>)

Original publisher: [Read original article](<http://brooker.co.za/blog/2022/07/29/getting-into-tla.html>)

Author: Marc Brooker

Published: 2022-07-29T00:00:00Z

Content type: article

Language: en

Sources: [Marc Brooker's Blog](<https://devfeed.tech/sources/marc-brooker-s-blog.md>), [Marc Brooker's Blog](<https://devfeed.tech/sources/marc-brooker-s-blog-2.md>)

Topics: [Math and Logic](<https://devfeed.tech/topics/math-and-logic.md>), [Finite-state machine](<https://devfeed.tech/topics/finite-state-machine.md>), [debugging](<https://devfeed.tech/topics/debugging.md>), [Replication](<https://devfeed.tech/topics/replication.md>), [Network](<https://devfeed.tech/topics/network.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [debugging](<https://devfeed.tech/tags/debugging.md>), [network](<https://devfeed.tech/tags/network.md>), [replication](<https://devfeed.tech/tags/replication.md>), [software](<https://devfeed.tech/tags/software.md>), [tools](<https://devfeed.tech/tags/tools.md>)

### AI overview

The article explains how a software engineer adopted formal specification while working on Amazon EBS control-plane changes. After debugging complex anti-entropy code with frequent failures during network partitions and system changes, the team modeled state transitions explicitly and explored Alloy and Spin before adopting TLA+ for reasoning about convergence and replication correctness.

### Source excerpt

Getting into formal specification, and getting my team into it too Getting started is the hard part Sometimes I write long email replies to people at work asking me questions. Sometimes those emails seem like they could be useful to more than just the recipient. This is one of those emails: a reply to a software engineer asking me how they could adopt formal specification in their team, and how I got into it. Sometime around 2011 I was working on some major changes to the EBS control plane. We had this anti-entropy system, which had the job of converging the actual system state (e.g. the state of the volumes on the storage fleet, and clients on the EC2 fleet1) with the intended system state in the control plane (e.g. the customer requested that this volume is deleted). We had a mess of ad-hoc code that took four sources of state (two storage servers, one EC2 client, the control plane), applied a lot of logic, and tried to figure out the steps to take to converge the states. Lots and lots of code. Debugging it was hard, and bugs were frequent. Most painfully, I think, wasn't that the bugs were frequent. It's that they came in bursts. The code would behave for months, then there would be a network partition, or a change in another system, and loads of weird stuff would happen all at once. Then we'd try to fix something, and it'd just break in another way. So we all took a day and drew up a huge state table on this big whiteboard in the hall, and circles and arrows showing the state transitions we wanted. A day well spent: we simplified the code significantly, and whacked a lot of bugs. But I wanted to do better. Specifically, I wanted to be able to know whether this mess of circles and arrows would always converge the state. I went looking for tools, and found and used Alloy for a while. Then Marc Levy introduced me to Spin, which I used for a while but never became particularly comfortable with. The next year we were trying to reason through some changes to replicati

## An introduction to the pg\_auto\_failover project

DevFeed: [An introduction to the pg\_auto\_failover project](<https://devfeed.tech/articles/an-introduction-to-the-pg-auto-failover-project-34615.md>)

Original publisher: [Read original article](<https://tapoueh.org/blog/2021/11/an-introduction-to-the-pg_auto_failover-project/>)

Author: Dimitri Fontaine PostgreSQL Major Contributor; Author

Published: 2021-11-10T16:11:29Z

Content type: article

Language: en

Sources: [Dimitri Fontaine](<https://devfeed.tech/sources/dimitri-fontaine.md>)

Topics: [Open Source](<https://devfeed.tech/topics/open-source.md>), [GitHub](<https://devfeed.tech/topics/github.md>), [Finite-state machine](<https://devfeed.tech/topics/finite-state-machine.md>), [on-prem](<https://devfeed.tech/topics/on-prem.md>), [Debian](<https://devfeed.tech/topics/debian.md>), [patroni](<https://devfeed.tech/topics/patroni.md>)

Tags: [article](<https://devfeed.tech/tags/article.md>), [automated](<https://devfeed.tech/tags/automated.md>), [consensus](<https://devfeed.tech/tags/consensus.md>), [debian](<https://devfeed.tech/tags/debian.md>), [failover](<https://devfeed.tech/tags/failover.md>), [github](<https://devfeed.tech/tags/github.md>), [guide](<https://devfeed.tech/tags/guide.md>), [introduction](<https://devfeed.tech/tags/introduction.md>), [on-prem](<https://devfeed.tech/tags/on-prem.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [patroni](<https://devfeed.tech/tags/patroni.md>), [project](<https://devfeed.tech/tags/project.md>), [state](<https://devfeed.tech/tags/state.md>)

### AI overview

An introduction to pg_auto_failover, covering why the project was created, its goal of simplifying production PostgreSQL failover, and its early design as a centralized finite-state machine for orchestrating failover and switchover.

### Source excerpt

We just released pg_auto_failover version 1.6.3 on GitHub, and the binary packages should be already available at the usual PGDG and CitusData places, both for debian based distributions and RPM based distributions too. This article is an introduction to the pg_auto_failover project: we answer the Five W questions, starting with why does the project exist in the first place? TL;DR pg_auto_failover is an awesome project. It fills the gap between "Postgres is awesome, makes developping my application so much easier, it solves so many problems for me!" and the next step "so, how do I run Postgres in Production?". If you're not sure how to bridge that gap yourself, how to deploy your first production system with automated failover, then pg_auto_failover is for you. It is simple to use, user friendly, and well documented. Star it on the pg_auto_failover GitHub repository and get started today. Consider contributing to the project, it is fully Open Source, and you are welcome to join us. Buckle up, our guide tour is starting now!

## On Types

DevFeed: [On Types](<https://devfeed.tech/articles/on-types-21794.md>)

Original publisher: [Read original article](<http://blog.cleancoder.com/uncle-bob/2021/06/25/OnTypes.html>)

Published: 2021-06-25T00:00:00Z

Content type: article

Language: en

Sources: [Robert C. Martin](<https://devfeed.tech/sources/robert-c-martin.md>), [The Clean Code Blog](<https://devfeed.tech/sources/the-clean-code-blog.md>)

Topics: [Code](<https://devfeed.tech/topics/code.md>), [Assembly](<https://devfeed.tech/topics/assembly.md>), [Finite-state machine](<https://devfeed.tech/topics/finite-state-machine.md>), [IO](<https://devfeed.tech/topics/io.md>), [Operating system](<https://devfeed.tech/topics/operating-system.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [ibm](<https://devfeed.tech/tags/ibm.md>), [io](<https://devfeed.tech/tags/io.md>), [memory](<https://devfeed.tech/tags/memory.md>), [program](<https://devfeed.tech/tags/program.md>), [state](<https://devfeed.tech/tags/state.md>)

### AI overview

An autobiographical account of early programming experiences from 1964 through the early 1970s, covering finite-state machines, binary machine language, assembly programming, magnetic-tape record processing, and programming on systems with limited memory and no operating system.

### Source excerpt

I wrote my first program in 1964. The name of the program was: Mr Patternson's Computerized Gate, and it was implemented on a little plastic computer named DIGICOMP-I, which was a cute little three bit finite state machine with 6 AND gates. The first electronic computer I ever wrote a program for was an ECP-18 in 1966. This was a 15 bit wide machine with 1024 words of drum memory. The programs I wrote were all in binary machine language and were entered through the front-panel switches. In the years between 1967 and 1969 my father would drive my friend, Tim Conrad, and I 25 miles to the Digital Equipment Corp sales office, where we would spend our Saturdays entering programs into the PDP-8 that they had on the floor. They were very gracious to allow us such access and freedom. The code we wrote was in PAL-D assembler (which was written by Ed Yourdon when he was 21 years old). My very first job as a programmer was temporary. A matter of two weeks. I was 17, and the year was 1969. My father went to the CEO of a nearby insurance actuarial firm, ASC Tabulating, and in his inimitable fashion, told them that they would be hiring me for a summer job. He had a way of being very convincing. The program I wrote for ASC was named IDSET. It was written in Honeywell H200 assembler (the language was called Easycoder and was based on IBM 1401 Autocoder). The purpose was to read student records from a magnetic tape and insert ID codes into those records, and then write them out onto a new tape. With some coaching, I was able to get that program to work. Upon graduating High School, in 1971, I got a job at ASC again; but this time as a third-shift off-line printer operator. We were printing junk mail, which was a brand new thing back then. A few months later I was hired as a full-time programmer analyst at ASC, and was assigned to work on huge re-write of a massive accounting and records system for Local 705 Trucker's union in Chicago. The existing system ran on a great big GE Datan

## Transforming Nested Loops into a Single Loop with State

DevFeed: [Transforming Nested Loops into a Single Loop with State](<https://devfeed.tech/articles/loopy-21790.md>)

Original publisher: [Read original article](<http://blog.cleancoder.com/uncle-bob/2020/09/30/loopy.html>)

Published: 2020-09-30T00:00:00Z

Content type: tutorial

Language: en

Sources: [Robert C. Martin](<https://devfeed.tech/sources/robert-c-martin.md>), [The Clean Code Blog](<https://devfeed.tech/sources/the-clean-code-blog.md>)

Topics: [Code](<https://devfeed.tech/topics/code.md>), [Clojure](<https://devfeed.tech/topics/clojure.md>), [Finite-state machine](<https://devfeed.tech/topics/finite-state-machine.md>), [Algorithms](<https://devfeed.tech/topics/algorithms.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [clojure](<https://devfeed.tech/tags/clojure.md>), [code](<https://devfeed.tech/tags/code.md>), [flow](<https://devfeed.tech/tags/flow.md>), [go](<https://devfeed.tech/tags/go.md>), [i](<https://devfeed.tech/tags/i.md>), [journey](<https://devfeed.tech/tags/journey.md>), [loops](<https://devfeed.tech/tags/loops.md>), [machine](<https://devfeed.tech/tags/machine.md>), [model](<https://devfeed.tech/tags/model.md>), [state](<https://devfeed.tech/tags/state.md>)

### AI overview

This article compares the standard Java solution to the Prime Factors Kata with a Clojure implementation using a single recursive loop. It then shows how nested-loop behavior can be represented with state and transformed into a single loop, culminating in a Moore model finite-state machine.

### Source excerpt

The following is a segment of a journey. It has no obvious beginning point, nor does it actually end up anywhere. The value, if any, is in the journey itself. The code below is the standard solution to the Prime Factors Kata. public List<Integer> factorsOf(int n) { ArrayList<Integer> factors = new ArrayList<>(); for (int d = 2; n > 1; d++) for (; n % d == 0; n /= d) factors.add(d); return factors; } However, I was doing this kata in Clojure the other day and I wound up with a different solution. It looked like this: (defn prime-factors [n] (loop [n n d 2 factors []] (if (> n 1) (if (zero? (mod n d)) (recur (/ n d) d (conj factors d)) (recur n (inc d) factors)) factors))) The algorithm is pretty much the same. I mean if you tracked the value of n, d, and factors they would go through the same changes. On the other hand the code in Java is a doubly nested loop; but the code in Clojure is a single recursive loop with two recursion points. That's interesting. I could write the recursive algorithm in Java like this: private List<Integer> factorsOf(int n) { return factorsOf(n, 2, new ArrayList<Integer>()); } private List<Integer> factorsOf(int n, int d, List<Integer> factors) { if (n>1) { if (n%d == 0) { factors.add(d); return factorsOf(n/d, d, factors); } else { return factorsOf(n, d+1, factors); } } return factors; } And then, since this is tail recursive, I could rewrite it as a straight loop. private List<Integer> factorsOf(int n, int d, List<Integer> factors) { while (true) { if (n > 1) { if (n % d == 0) { factors.add(d); n /= d; } else { d++; } } else return factors; } } For all intents and purposes this code executes the same algorithm as the standard solution; but it does not have a doubly nested loop. We have transformed the code from a doubly nested loop, to a single loop, without affecting the algorithm. Is this always possible? In other words: given a program with a nested loop, is there a way to write the same program with a single loop? The answer to that is

## October 2019 In Review

DevFeed: [October 2019 In Review](<https://devfeed.tech/articles/october-2019-in-review-22372.md>)

Original publisher: [Read original article](<https://www.red-lang.org/2019/10/october-2019-in-review.html>)

Author: Unknown (noreply@blogger.com)

Published: 2019-10-25T06:14:00Z

Content type: article

Language: en

Sources: [Red](<https://devfeed.tech/sources/red.md>)

Topics: [Red](<https://devfeed.tech/topics/red.md>), [Finite-state machine](<https://devfeed.tech/topics/finite-state-machine.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>), [cpu](<https://devfeed.tech/topics/cpu.md>), [Code](<https://devfeed.tech/topics/code.md>), [Wiki](<https://devfeed.tech/topics/wiki.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [cpu](<https://devfeed.tech/tags/cpu.md>), [documentation](<https://devfeed.tech/tags/documentation.md>), [github](<https://devfeed.tech/tags/github.md>), [performance](<https://devfeed.tech/tags/performance.md>), [testing](<https://devfeed.tech/tags/testing.md>)

### AI overview

An October 2019 Red language review reports major progress on the fast-lexer branch. Benchmarks describe substantially faster loading for large word and integer inputs, while the implementation remains unfinished and still requires keyword-loading and symbol-table optimizations. The article also highlights community guides, code statistics, build archives, and development tools.

### Source excerpt

Over the last few weeks the Red Lang core team drilled down to make some truly great progress on Red's fast-lexer branch--while we also gained valuable support from the contributions of Red doers and makers as they consolidate a world of useful information and resources. Fast-Lexer Benchmarks In the fast-lexer branch of Red, you can see lots of new work from Red creator @dockimbel (Nenad Rakocevic) and core teammate @qxtie. Among other fixes and optimizations, they substituted a hashtable for what had previously been a large array in context! The numbers so far: Loading 100'000 words (5 to 15 characters, 1MB file): Red (master): 19000ms. Red (fast-lexer): 150ms. Nenad's observations on further testing: "FYI, we just [ran] some simple benchmarks on the new low-level lexer for Red using 1M 10-digit integers. The new lexer completes the loading about 100 times faster than the current high-level one. Loading 1M 10-digit integers in one block: Red: 175ms; R2: 136ms; R3: 113ms. "We use a faster method than Rebol, relying on several lookup tables and a big FSM with pre-calculated transition table (while Rebol relies on a lot of code for scanning, with many branches, so bad for modern CPU with branch predictions). With an optimizing backend, Red's LOAD should in theory run 2-3 times faster than Rebol's one. (Though, we still need to optimize the symbol table loading in order to reach peak performance). Given that Rebol relies on optimized C code while Red relies on sub-optimal code from R/S compiler, that speaks volume about the efficiency of our own approach. So, Red/Pro should give us a much faster LOAD. "The lexer is not finished yet, but the hard part is done. We still need to figure out an efficient way to load keywords, like escaped character names (`^(line), ^(page), ...) and month nouns in dates." This is a huge accomplishment, and it's shaping up to make future goals even more impressive. The fast-lexer branch is a work in progress, but stay tuned: Nenad has more t

## Regular expressions obfuscation under the microscope

DevFeed: [Regular expressions obfuscation under the microscope](<https://devfeed.tech/articles/regular-expressions-obfuscation-under-the-microscope-39688.md>)

Original publisher: [Read original article](<https://doar-e.github.io/blog/2013/08/24/regular-expressions-obfuscation-under-the-microscope/>)

Author: Axel "0vercl0k" Souchet

Published: 2013-08-24T19:35:00Z

Content type: tutorial

Language: en

Sources: [Diary of a reverse-engineer](<https://devfeed.tech/sources/diary-of-a-reverse-engineer.md>)

Topics: [obfuscation](<https://devfeed.tech/topics/obfuscation.md>), [Finite-state machine](<https://devfeed.tech/topics/finite-state-machine.md>), [Regular expression](<https://devfeed.tech/topics/regular-expression.md>), [Reverse Engineering](<https://devfeed.tech/topics/reverse-engineering.md>), [Assembly](<https://devfeed.tech/topics/assembly.md>), [C](<https://devfeed.tech/topics/c.md>)

Tags: [assembly](<https://devfeed.tech/tags/assembly.md>), [c](<https://devfeed.tech/tags/c.md>), [obfuscation](<https://devfeed.tech/tags/obfuscation.md>), [regex](<https://devfeed.tech/tags/regex.md>), [regular-expressions](<https://devfeed.tech/tags/regular-expressions.md>), [reverse-engineering](<https://devfeed.tech/tags/reverse-engineering.md>)

### AI overview

This tutorial explains how regular expressions can be compiled into finite-state machines and represented directly in assembly or C, making them harder to analyze. It demonstrates a simple manual implementation and discusses recognizing and obfuscating compiled regexes during reverse-engineering work.

### Source excerpt

Introduction Some months ago I came across a strange couple of functions that was kind of playing with a finite-state automaton to validate an input. At first glance, I didn't really notice it was in fact a regex being processed, that's exactly why I spent quite some time to understand ...

## Introduction to Cellular Automata

DevFeed: [Introduction to Cellular Automata](<https://devfeed.tech/articles/the-wild-world-of-cellular-automata-40214.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2011/06/29/conways-game-of-life/>)

Published: 2011-06-29T21:08:45Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Cellular automaton](<https://devfeed.tech/topics/cellular-automaton.md>), [Automaton](<https://devfeed.tech/topics/automaton.md>), [Finite-state machine](<https://devfeed.tech/topics/finite-state-machine.md>)

Tags: [cellular-automata](<https://devfeed.tech/tags/cellular-automata.md>), [computability-theory](<https://devfeed.tech/tags/computability-theory.md>), [conus](<https://devfeed.tech/tags/conus.md>), [conway](<https://devfeed.tech/tags/conway.md>), [life](<https://devfeed.tech/tags/life.md>), [mathematica](<https://devfeed.tech/tags/mathematica.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [patterns](<https://devfeed.tech/tags/patterns.md>), [programming](<https://devfeed.tech/tags/programming.md>), [rules](<https://devfeed.tech/tags/rules.md>), [simulation](<https://devfeed.tech/tags/simulation.md>), [turing-machine](<https://devfeed.tech/tags/turing-machine.md>)

### AI overview

An introductory tutorial on cellular automata, explaining cells, states, transition rules, simultaneous updates, and a one-dimensional binary example.

### Source excerpt

Cellular Automata There is a long history of mathematical models for computation. One very important one is the Turing Machine, which is the foundation of our implementations of actual computers today. On the other end of the spectrum, one of the simpler models of computation (often simply called a system) is a cellular automaton. Surprisingly enough, there are deep connections between the two. But before we get ahead of ourselves, let's see what these automata can do.

## Why developers should be force-fed state machines

DevFeed: [Why developers should be force-fed state machines](<https://devfeed.tech/articles/why-developers-should-be-force-fed-state-machines-1258.md>)

Original publisher: [Read original article](<https://shopify.engineering/17488160-why-developers-should-be-force-fed-state-machines>)

Author: Willem van Bergen

Published: 2011-06-13T14:41:00Z

Content type: opinion

Language: en

Sources: [Shopify Engineering](<https://devfeed.tech/sources/shopify-engineering.md>), [Shopify Engineering - Shopify Engineering](<https://devfeed.tech/sources/shopify-engineering-shopify-engineering.md>)

Topics: [Finite-state machine](<https://devfeed.tech/topics/finite-state-machine.md>), [web applications](<https://devfeed.tech/topics/web-applications.md>), [math](<https://devfeed.tech/topics/math.md>), [Rails](<https://devfeed.tech/topics/rails.md>)

Tags: [awareness](<https://devfeed.tech/tags/awareness.md>), [bugs](<https://devfeed.tech/tags/bugs.md>), [developers](<https://devfeed.tech/tags/developers.md>), [math](<https://devfeed.tech/tags/math.md>), [modelling](<https://devfeed.tech/tags/modelling.md>), [ruby](<https://devfeed.tech/tags/ruby.md>), [web-applications](<https://devfeed.tech/tags/web-applications.md>)

### AI overview

The article argues that developers of web applications should use finite-state machines to design and model domain objects. It explains that state machines expose edge cases, reduce bugs and undefined behavior, clarify external APIs, and draw on mathematical and computer science research. Examples include accounts, subscriptions, invoices, orders, and blog posts, with Ruby on Rails presented as an implementation option.

### Source excerpt

This post is meant to create more awareness about state machines in the web application developer crowd. If you don't know what state machines are, please read up on them first. Wikipedia is a good place to start, as always. State machines are awesome The main reason for using state machines is to help the design process. It is much easier to figure out all the possible edge conditions by drawing out the state machine on paper.

## Background writers

DevFeed: [Background writers](<https://devfeed.tech/articles/background-writers-34368.md>)

Original publisher: [Read original article](<https://tapoueh.org/blog/2010/07/background-writers/>)

Author: Dimitri Fontaine PostgreSQL Major Contributor; Author

Published: 2010-07-19T14:30:00Z

Content type: opinion

Language: en

Sources: [Dimitri Fontaine](<https://devfeed.tech/sources/dimitri-fontaine.md>)

Topics: [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [Processes](<https://devfeed.tech/topics/processes.md>), [Erlang](<https://devfeed.tech/topics/erlang.md>), [Finite-state machine](<https://devfeed.tech/topics/finite-state-machine.md>)

Tags: [article](<https://devfeed.tech/tags/article.md>), [database](<https://devfeed.tech/tags/database.md>), [erlang](<https://devfeed.tech/tags/erlang.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [processes](<https://devfeed.tech/tags/processes.md>), [worker](<https://devfeed.tech/tags/worker.md>)

### AI overview

The article discusses proposals to generalize PostgreSQL background workers, building on the autovacuum process and related patches. It considers an extensibility API for external processes and workers, drawing ideas from Erlang supervision and finite-state-machine behaviors.

### Source excerpt

There's currently a thread on hackers about bg worker: overview and a series of 6 patches. Thanks a lot Markus! This is all about generalizing a concept already in use in the autovacuum process, where you have an independent subsystem that require having an autonomous daemon running and able to start its own workers. I've been advocating about generalizing this concept for awhile already, in order to have postmaster able to communicate to subsystems when to shut down and start and reload, etc. Some external processes are only external because there's no need to include them by default in to the database engine, not because there's no sense to having them in there.