Topic

Computer Science

Computer science discussions covering algorithms, data structures, computational theory, and CS education from developer communities.

What this topic tracks

  • Engineering practices and ecosystem debates
  • Tools, architecture, and implementation lessons
  • Relevant discussions from developer communities

Computer Science · 768 stories

Recent stories

Each story's summary, with the places it was discussed.

Summaries are written by AI from the linked sources. Open the source for full context.

20 stories

Formal Verification, Pac-Man, and Me: 1 + 1 = 2. Until It's 255.

dev.to · 28 Nov

Computer Science

Formal verification uses mathematical proofs to show code satisfies every stated rule, unlike testing, and AI is making it cheaper and faster: Chuyue Sun’s Lean-based work reportedly took under half a day and $500 versus five months for three experts, though the comparison is qualified.

Math’s certainty depends on axioms, while real code has finite limits: Pac-Man’s one-byte level counter overflowed at 255, creating the unsolvable split screen. Proofs validate specifications, not whether humans chose the right rules.

How I came to write THAT paper with Leslie Lamport

lawrencecpaulson.github.io · 29 Nov

Programming Languages · History · Computer Science

Lawrence Paulson recounts how he became coauthor with Leslie Lamport on “Types Considered Harmful,” after rejecting Lamport’s critique of typed specification languages.

Editor Andrew Appel asked them to make it technically accurate while preserving its argument for untyped set-theoretic formalisms; despite another rejection round, TOPLAS published it with a disclaimer. Paulson says type systems have since matured and enabled verified systems including CompCert, seL4, and Amazon’s Nitro Isolation Engine, while untyped formalisms still invite errors and lack notation overloading.

Andrew Kensler's permute(), a function for stateless, constant-time pseudorandom-order array iteration

andrew-helmer.github.io · 11 Nov

Algorithms · C++ · Computer Science

Andrew Kensler’s `permute()` generates a pseudorandom permutation of array indices without storing the permutation.

It combines a seed-dependent invertible hash with cycle-walking to map any index into an arbitrary-length array, enabling unique sampling and parallel random access in average constant time. Iterating over k of n items therefore uses O(k) time and O(1) memory, unlike Fisher-Yates’ O(n) storage and time. It is not cryptographically secure and works well only up to roughly 2^27-sized domains.

Gleam case exhaustiveness, as a fan

oyster.pckt.blog · 10 Oct

Algorithms · Programming Languages · Computer Science

Gleam’s compiler validates case expressions for exhaustiveness and unreachable clauses, then reports precise missing patterns.

Its checker builds optimized decision trees from branch checks, drawing on pattern-matching research while extending it for guarded string prefixes, bit arrays, and type narrowing based on known values. Compile-time Fail nodes produce witness patterns by tracing dead ends backward, while imported names and formatting are preserved in diagnostics. This combines correctness, performance, and unusually detailed user feedback.

Labeled matches: why is this not in every regex engine?

iev.ee · 16 Sept

Algorithms · Performance · Computer Science

An article shows how resharp uses extended regular expressions, labeled DFA state machines, and lazy compilation for deterministic entity categorization.

Precomputing patterns enables low-energy scanning at up to 1.92 GB/s, vastly exceeding spaCy’s NER benchmark. Intersection, complement, Boolean algebra, and language-set analysis support exact date validation, overlap checks, and disjoint enum labels.

The State of Allocators in 2026 - 6 Months Later

cetra3.github.io · 9 Sept

Low-Level Programming · Programming Languages · Computer Science

Rust custom allocators are nearing stabilization, with a minimal Allocator API supporting Vec, Box, and potentially dyn Allocator.

Recent work addresses unsoundness involving unwinding, allocator cloning, Pin, covariance, and memory invalidation through proposed unsafe marker traits. More container support and pinning guarantees remain; final review and stable release are still several months away.

Interview with oofoe about REBOL, Forth, Decker, Janet and the VFx Industry

alexalejandre.com · 30 Aug

Algorithms · Programming Languages · Computer Science

An interview with @oofoe explores DSL design, REBOL, Forth, Janet, Racket, and Decker; “programming in the small”; PEG parsers, transpilation, compilation, GUIs, and human-sized codebases.

It also details Janet-based industrial tools and render-farm architecture for VFx, including client-server scheduling, resource fairness, and hot code updates, plus a career spanning games, visual novels, and IMAX production.

Abstracting effects with continuations

crowdhailer.me · 15 Jul

Programming Languages · Software Architecture · Computer Science

This article explores using continuations in Gleam to abstract computational effects.

By representing logic generically, developers can separate business rules from implementation details like Results or Promises. This approach enables a single function to handle synchronous, fallible, or asynchronous operations by delegating the execution strategy to specific runners, improving code reusability and maintainability.

All of the String types

lambdalemon.gay · 7 Apr

Programming Languages · Rust · Computer Science

Programming languages handle strings differently based on memory management, mutability, and encoding requirements.

This analysis explores string implementations across various languages, including Rust, C, C++, Go, Zig, Java, C#, Python, Swift, and Pascal, highlighting how they manage character sets like UTF-8/UTF-16 and structural properties like null-termination versus explicit length tracking.

A Case Against Currying

emi-h.com · 22 Mar

Programming Languages · Software Architecture · Computer Science

The article critiques the functional programming convention of currying.

While elegant and facilitating partial application, the author argues that currying creates unconventional function shapes and asymmetry that complicate type system modeling and composition. The author proposes the tuple style as a clearer, more logical alternative and suggests exploring improved syntactic sugar for partial application instead.

Code reviews do find bugs

entropicthoughts.com · 11 Mar

Software Architecture · Testing · Computer Science

The article refutes a 2015 Microsoft study claiming code reviews are ineffective at finding bugs.

Citing research, it argues code reviews catch 60% of defects with only 15% more time investment. Beyond bug detection, reviews are highly effective for rapid knowledge sharing, codebase familiarity, and maintaining long-term code quality through small, frequent iterations.

TLA+ By Example

tlabyexample.com · 24 Feb

Distributed Systems · Testing · Computer Science

An introductory guide to TLA+, covering syntax, data structures, and model checking.

It features a practical tutorial for modeling a Bounded BlockingQueue involving producers and consumers, based on the BlockingQueue specification. This educational resource provides a hands-on approach to formal methods and system verification.

confusables.txt and NFKC disagree on 31 characters

paultendo.github.io · 21 Feb

Authentication · Cybersecurity · Computer Science

The Unicode Consortium's confusables.txt and NFKC normalization disagree on 31 characters, such as the Long S (ſ).

While confusables.txt prioritizes visual similarity for security detection, NFKC focuses on semantic equivalence. Developers building login systems must understand these divergences to effectively prevent homoglyph attacks and manage character normalization without creating security loopholes.

Compiler Education Deserves a Revolution

thunderseethe.dev · 19 Feb

Performance · Programming Languages · Computer Science

Modern compiler architecture has shifted from sequential pipelines to query-based models.

This approach, utilized by Rust, Swift, and Kotlin, facilitates incremental compilation and powers IDE features like LSP. By structuring compilation as interdependent queries, compilers only process necessary changes, enabling faster feedback and error resilience compared to traditional whole-program passes.

Exploring Linux on a LoongArch Mini PC

wezm.net · 26 Jan

Hardware · Linux · Computer Science

This article explores the technician's experience with the Loongson 3A6000 CPU, a 64-bit LoongArch64 RISC architecture developed by Loongson Technology.

The author details the hardware specifications of the MOREFINE M700S mini-PC, highlighting its performance and energy efficiency challenges compared to x86_64 and ARM rivals. While the architecture is 'Linux-first' due to its lack of Windows and macOS support, the author successfully installed Chimera Linux, despite encountering some EGL-related graphical issues with Wayland. The analysis also touches on software compatibility, specifically within the Rust ecosystem. Many packages marked as broken on LoongArch are due to outdated dependencies like the nix or rustix crates. The author’s contributions, including upstream PRs for projects like the 'tiny' IRC client, demonstrate the active community effort required to integrate this emerging Chinese ISA into the broader open-source landscape.

The lost art of XML

marcosmagueta.com · 20 Jan

Programming Languages · Software Architecture · Computer Science

This article argues that XML remains a superior data format compared to JSON and YAML, suggesting its abandonment was driven by developer convenience and the dominance of JavaScript rather than technical failure.

It highlights XML's robust features like schemas, namespaces, and self-description as essential for rigorous engineering, contrasting them with the limitations and ad-hoc validation typical of JSON based systems.

Type-safe eval in Grace

haskellforall.com · 20 Jan

Generative AI · Programming Languages · Computer Science

The Grace programming language introduces a type-safe implementation of the eval function, which traditionally poses security risks.

By utilizing staged bidirectional type-checking, Grace ensures that code strings are validated against expected types before execution, allowing for secure dynamic imports from GitHub, HTTP, or even LLM-generated prompts. This architecture enables unique features like privacy-protecting prompt engineering, where a large language model manipulates sensitive data shapes without ever seeing the actual values.

Where it came fromLobstersDev.toCreate a Snapbyte.dev digest and choose Computer Science as one of your topics.Build your digest