RSSAmplifier

Blog

Bytepawn - Marton Trencseni

bytepawn.comRSS feed ↗172 posts

Latest posts

András Lányi and the Problem of Human-Scale Politics

A reading of András Lányi’s essay “Flight from the Camp of the Victors”, focusing on ecological politics, coercion, goodwill, the fragility of decentralization, and whether modern democracies are a more stable equilibrium than Lányi’s human-scale political vision.

Single round-trip optimization for Paxos with PaxosLease masters

In the previous article, I combined Paxos and PaxosLease into a small master-based replicated state machine. The obvious inefficiency was that every command still ran a full two-phase Paxos round. In this article, I add the simplest possible optimization: once a node has become master and completed one full Paxos round, later fresh log slots can skip the prepare phase and go directly to propose.

Combining Paxos and PaxosLease

The article walks through the integration of durable Paxos with PaxosLease to arrive at a small master-based replicated state machine: Paxos decides the command log, PaxosLease decides who is allowed to append to it, and clients must discover the current master before submitting writes.

Writing a simple Rust async message queue server

A follow-up to the async MQ series: building the same small message queue server in Rust using Tokio, channels, Arc, and Mutex, while learning Rust’s ownership and async model along the way.

Multi-Paxos with Disk Persistence

This post extends the simple Multi-Paxos implementation with disk persistence, ensuring acceptor promises and the replicated log survive restarts, and showing how log replay restores state after crashes.

What Ilya Sutskever, Satya Nadella, and Sam Altman think about AI progress in 2025

This article contrasts how Ilya Sutskever, Satya Nadella, and Sam Altman think about AI progress, from research and generalization, through infrastructure and economics, to agents, scaling, and societal impact.

What does ChatGPT think about Viktor Orban's 15 years as Hungary's leader?

I asked ChatGPT to summarize the top 10 positives and negatives of Orban Viktor's 15 years as Hungary's leader.

PaxosLease: Extending and Releasing Leases

This article extends the basic PaxosLease algorithm with practical lease renewal and explicit release semantics, showing a full working Python/Flask implementation and explaining why the protocol remains safe without disks or synchronized clocks.

Implementing PaxosLease in Python with HTTP Flask

This article introduces PaxosLease, a simplified Paxos variant that uses expiring leases instead of persistent values to enable fast, reliable master election in distributed systems.

Multi-Paxos: Building a Simple Replicated Log in Python

This post builds a minimal Multi-Paxos system in Python with Flask HTTP endpoints, showing how repeated Paxos rounds form a fault-tolerant replicated log.

Paxos: Lamport's Crown Jewel for Replicated State Machines

A straightforward explanation of Paxos using a simple Python Flask HTTP implementation to show how distributed systems achieve consensus in the presence of faults.

Marketing Effectiveness and Experimentation Measurement

A deep dive into how to structure a marketing measurement and experimentation framework — from universal control groups and campaign holdouts to attribution windows, outlier handling, and statistical rigor. Based on lessons from building a real-world policy for large-scale marketing analytics.

Modern Monetary Theory: What’s Missing from the Narrative

I explore several points that are rarely explained in Modern Monetary Theory narratives: from taxation in non-tax economies to central bank independence, inflation targets, and the many forms of money that exist beyond government spending. These are areas where the story of MMT could be told more completely.

The MMT Case for Governments Funding Open Source Software

I argue that widely used digital infrastructure like operating systems, compilers and browsers deserve public investment, just like roads, hospitals, and schools.

A brief discussion of the Practical Byzantine Fault Tolerance (PBFT) algorithm

This article explains how Practical Byzantine Fault Tolerance (PBFT) builds on Lamport’s theoretical consensus algorithms by introducing leaders, quorums, and cryptographic optimizations to make Byzantine consensus practical, contrasts it with Paxos and crash-fault tolerance, and explores its influence on modern blockchain protocols.

Lamport's Byzantine Consensus algorithm with Signatures

This article, following Lamport's work, extends the original Byzantine Generals algorithm from “oral-messages” to signed messages, showing how digital signatures drastically simplify the problem and reduce message complexity, with an implementation given in Python using Flask HTTP nodes.

Applications of Byzantine Consensus

This article examines where Lamport's original oral-messages Byzantine Generals algorithm does and does not apply in practice, contrasting unsuitable cases like distributed databases and rocket launches with a suitable case in redundant flight control systems.

A more general implementation of Lamport's Byzantine Consensus algorithm in Python

This follow-up factors Lamport’s Byzantine Generals algorithm into a generalized class that's independent of I/O and payloads. Any node can initiate a round (be "king"), values can be arbitrary strings, and multiple rounds can run concurrently.

Lamport's Byzantine Generals algorithm in Python

I discuss Lamport's Byzantine Generals problem and why it requires a total of N≥3M+1 nodes with M malicious nodes, and then implement the solution using Python with HTTP Flask servers.

Lamport's logical clocks and the Ricart–Agrawala Distributed Mutual Exclusion algorithm in Python

This post shows how to implement the Ricart–Agrawala Distributed Mutual Exclusion algorithm with Lamport's logical clocks using HTTP Flask servers.

Exploring Lamport's Bakery algorithm in Python

This post shows how to implement Lamport’s Bakery algorithm with Python HTTP Flask servers. The Python code is short and readable, helping newcomers grasp the algorithm’s logic without the syntactic overhead of C++. The asynchronous HTTP flow also generates plenty of overlap between workers, so the need for mutual exclusion is obvious. Exposing the variables through REST endpoints enables…

Exploring Lamport's Bakery algorithm in C++20

I explore Lamport’s Bakery algorithm and show how a naive C++20 implementation breaks on weak memory models, how to fix it with std::atomic , and how to implement bounded tickets.

Karpathy: AI is changing Software Engineering

Andrej Karpathy says we’re marching from hand-written “Software 1.0” to NN-driven “2.0” and, finally, LLM-powered “3.0.” In my view, neural nets haven’t eaten deterministic code—kernels, browsers, games, and most business logic still run old-school. What has changed is the supply chain: LLM co-pilots (“Software 1.5”) already touch nearly every commit, nudging us towards language and architectures…

Writing a simple async message queue server in C++, Python and JavaScript — Summary

I summarize thoughts and lessons learned of implementing the same async message queue server in C++, Python and JavaScript over the past 2 years.

Writing a simple C++20 async message queue server - Part III

I write the final version of the async message queue server in modern C++20, wire compatible with the Python and Javascript versions.

White noise into random walks

A visual and analytical walk from pure white noise to a true random walk.

Random Walks and the Dickey-Fuller Test - Part II

The article examines how simple autoregressive stochastic processes behave with the Dickey-Fuller test.

Random Walks and the Dickey-Fuller Test - Part I

This post explores how to use the Dickey–Fuller test to check the random‑walk hypothesis for time series using a pure NumPy implementation, and using Monte Carlo simulations to compute critical‑value tables.

The reward for long-term resilience in simple trading strategies - Part II

In this follow-up, I analyze 10 years of data on a select group of stocks to show that while higher take-profit and stop-loss thresholds boost win ratios and Sharpe ratios, longer holding times can lower annualized returns.

The reward for long-term resilience in simple trading strategies - Part I

In this article, I explore how adopting longer-term, resilient trading strategies with higher take-profit and stop-loss thresholds can deliver more consistent, risk-adjusted performance.

Culture talk: What I learned from building a distributed database that never took off

Recently, I delivered a culture talk on Scalien, my old database startup that never took off. I discussed the business, product and some technical challenges and lessons learned from developing ScalienDB, a Paxos-based distributed NoSQL database.

Modern Portfolio Theory III: The Efficient Frontier in log volatility—return space

In the previous two articles, we explored the coverage of random portfolios in log volatility—return space, both with and without a risk-free asset. We now take the next step, and calculate the Efficient Frontier and Capital Market Line of Markowitz’s theory.

The MMT Perspective on Crypto

From an MMT (chartalist) perspective, cryptocurrencies lack sovereign backing and fail to establish the enforced demand necessary to function as true currency. Because they rely solely on speculative sentiment rather than legal mandates (like taxation), their values are unsustainable in the long run and risk ultimately collapsing to zero.

I ❤️ triathlons

In 2008, I completed my first half-Ironman — then, later that same year, I took on the full Ironman distance at the traditional ExtremeMan in Hungary, finishing in 13 hours and 38 minutes. By 2013, I had knocked my time down to 11 hours and 36 minutes. Since then, I’ve racked up a total of 56 triathlon finishes. 2024 was one of the best years so far, with a record of 10 triathlon races.

Modern Portfolio Theory II: Random portfolio coverage in log volatility—return space with a risk free asset

In a previous article I simulated random portfolios using Monte Carlo methods for the 2023 daily closing prices of the 100 stocks constituting the Nasdaq-100. Here I add the risk-free asset to the portfolio and examine how it affects the coverage in log volatility—return space.

Individual Career Plan

This post provides a practical Individual Career Plan template you can use to guide self-assessment, prioritize your professional development, and set meaningful goals that align with your vision for the future. By outlining clear objectives and action steps, you create a framework for continuous improvement and more informed career decisions. I use this same template for the data organization I…

Why I read history books

Hungary’s rushed entry into World War II and its botched attempt to break away from it show how stale leadership trapped in its own fantasy bubble can steer a nation toward disaster. By “political backtesting” these moments — comparing their underlying factors to the present — today’s citizens can weigh future outcomes, draw practical lessons, we can make more informed decisions about where and…

Paper: The Unreasonable Effectiveness of Monte Carlo Simulations in A/B Testing

I run Monte Carlo simulations of content production over random Watts-Strogatz graphs to show various effects relevant to modeling and understanding Randomized Controlled Trials on social networks: the network effect, spillover effect, experiment dampening effect, intrinsic dampening effect, clustering effect, degree distribution effect and the experiment size effect. I will also define some…

Modern Portfolio Theory I: Random portfolio coverage in log volatility—return space

I examine the coverage of random portfolios in log volatility—return space using Monte Carlo methods with different randomization techniques for the 2023 daily closing prices of the 100 stocks constituting the Nasdaq-100.

The Unreasonable Effectiveness of Monte Carlo Simulations in A/B Testing

The article illustrates how Monte Carlo simulations serve as a powerful method for exploring statistical concepts in A/B testing, enhancing understanding, improving experimental design and analysis.

A simple telnet based Taboo game in async Python

I built a simple Python-based Taboo game server using asyncio to provide a customizable multiplayer experience via Telnet.

AI Strategy in 2024 for the Rest of Us

My review of the AI landscape in late 2024, and what the road ahead looks like for those of us not building foundational models.

Techtalk: Why are A/B tests the gold standard of causal inference?

Recently, I delivered a techtalk on A/B testing to an audience of non-technical Product Managers and experienced Data Scientists.

200 articles

A review and introspect on the second 100 articles written on Bytepawn.

ChatGPT's critique of OpenAI CEO Sam Altman's vision of the AI future

A few days ago OpenAI CEO Sam Altman published an article titled The Intelligence Age. I used OpenAI's new o1-mini model to critique Sam Altman's writing of its own future.

How I manage my 1v1s

I detail my structured approach to managing one-on-one meetings within a 40-person data team, emphasizing people management principles like radical transparency, tailored meeting cadences, and strategies to navigate common managerial challenges to foster a supportive and productive work environment.

Breaking Bell's Inequality with Monte Carlo Simulations in Python

The article explains the Bell inequality using Monte Carlo simulations in Python, and shows how non-local action-at-a-distance can be used to break it with entangled qubits.

Quantum Entanglement, Locality, Determinism

This blog post explores foundational quantum mechanics concepts such as superposition, entanglement, and the challenges posed by locality and determinism, while highlighting the historical efforts of Einstein and Bohm to reconcile these phenomena with hidden variable theories.

Why I don't live in Hungary

In February 2016, I made a life-changing decision to leave Hungary and seek opportunities abroad, starting in London and later moving to Dubai. This essay explores the multitude of reasons behind my choice and why I have no immediate plans to return to Hungary.

How to solve it

I discuss Polya's How to Solve it approach to mathematical problem solving and the 2010 paper Teaching general problem-solving skills is not a substitute for teaching math .