Urgent.News

What's breaking now, across hundreds of outlets.

Tech

Building a Deterministic Fire-Code CAD Engine in TypeScript and Cloudflare Workers

When an event producer or tent rental company pulls an operational fire permit for a 40x60 tent or a 200-guest hotel ballroom gala, the local fire marshal does not accept a rough sketch from Canva or Lucidchart. Inspectors check concrete numbers: occupant load under IFC Table 1004.5, minimum exit count and 72-inch tent exit widths under IFC Table 3103.11, the one-half diagonal exit remoteness…

Developing a pure-TypeScript 13x13 crossword crossword solver and 100-page vector PDF engine on Cloudflare Workers proved challenging. Cloudflare Workers restrict the use of Python runtimes or headless browsers, limiting our ability to efficiently process complex tasks. To overcome this limitation, we built a deterministic 13x13 bitmask CSP solver that tackles contributor clues, which are short, irregular, and unpredictable.

This solver divides the grid construction process into two bounded stages: skeleton placement and bitmask CSP fill. By limiting the number of steps in the skeleton placement stage and governing the bitmask CSP fill stage, we ensured that even dense intersections would not exceed Worker CPU budgets. The deterministic nature of this solver guarantees that regenerating a book after moderation or order fulfillment yields the exact same puzzles and answer keys.

For the 100-page 6x9 vector PDF, we opted against rendering HTML through Chromium, which could add cold starts and memory spikes. Instead, we directly built the entire interior and dynamic-spine cover wrap with pdf-lib. This approach ensures vector grid lines, crisp clue numbering, dedication pages, and answer keys stream out without rasterization bloat.

The 100-page interior renders in under 200ms, while the cover wrap completes in under 30ms, providing a fast and efficient printing process. Idempotent fulfillment on D1 paid print orders is managed through an atomic compare-and-swap state transition in Cloudflare D1, backed by an idempotent Stripe webhook log. This ensures retried webhooks never create duplicate print jobs.

The live 13x13 solver and 3-page sample PDF layout can be tested in the ClueBook Preview, or users can create a group puzzle at getcluebook.com.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

This story

This is one outlet's version. Read the fullest account.

Every outlet that reported this, and when →

Read the original at dev.to →

Report a problem with this story

More in Tech

Startup Transactional Email for Reports (With Deliverability and Suppression Polling)

A healthtech startup needs a practical transactional email deliverability stack for generated report attachments. The constraint that changes the decision is ownership of the report revision: the…

  • Startup must retain opaque report identifier, revision, and content digest for durable state.
  • Worker resolves attachments based on recorded revision, not latest report available.
  • Polling interval of 60 seconds proposed, with near-minute wait for repeated evidence.

I compared 5 Zi Wei Dou Shu calculators. Only one gets foreign birth times right.

There are five Zi Wei Dou Shu (Purple Star Astrology) calculators that rank on the first page of Bing for "zi wei dou shu calculator". I tried all of them with the same birth data.

  • Four calculators produced incorrect charts due to incorrect time zone assumption
  • Mingpan-1xu calculator correctly handled foreign time zone
  • Developers should audit geographic and temporal assumptions in astrology tools

What Grad School Taught Me About Writing CPU-Friendly Code

I recently started my Master's in Computer Engineering, and one of my first courses is Advanced Computer Architecture . While reading Computer Architecture: A Quantitative Approach by David A.

  • Grad school taught Data-Level Parallelism concept
  • Leveraging SIMD, caches, branch prediction, multiple cores
  • NumPy arrays enable vectorized operations and SIMD

When CCTV Issues the Warning: Measuring the Response at Cannock Station

A CCTV alert can tell a railway operator that someone has entered a dangerous area. At Cannock station in England, the response goes further: cameras at the platform ends detect people entering the…

  • Cannock station's CCTV system detects trespassers in dangerous areas.
  • Dual response includes audible warning and alert for monitoring officer.
  • System deters nearly half of trespassers, improves security response.

More from Friday 27 November →