Skip to content

Archive / page 42

All articles

Every practical article from the Nalar archive, newest first.

Artificial Intelligence 12 Sep 2026 9 min read

Extend RoPE Context Windows with Position Interpolation

Extend RoPE Context Windows with Position Interpolation A RoPE-based language model trained on sequences up to a fixed length can behave poorly when inference suddenly asks it to process much larger position indices. The tokens are valid, but the positional pattern can move far outside the range used during training. Position interpolation changes that geometry. Instead of sending larger position indices directly into rotary position embeddings, it compresses a longer sequence into the positional range the model already uses. With suitable adaptation, this can extend the usable context window without changing the transformer architecture.

Software Engineering 12 Sep 2026 7 min read

Expand and Contract at Database Schema Boundaries

A database column can be structurally valid and still be incompatible with the application processes using it. Renaming customer_name to display_name, for example, is trivial as a data-definition operation on many databases. The harder boundary appears when one application process still issues queries against the old name while another process already expects the new one. That overlap is common whenever application replacement is not atomic. Rolling deployments, multiple service instances, delayed workers, and independent consumers can leave more than one application version active at the same time. A schema migration then has two audiences: the database engine and every executable version that can reach the database during the transition.

Artificial Intelligence 12 Sep 2026 6 min read

Exit Transformer Classifiers Early with Entropy Thresholds

A transformer classifier normally sends every input through every layer, even when an intermediate representation already supports a concentrated class prediction. Entropy-based early exit changes that fixed-depth behavior. Prediction heads attached to intermediate layers estimate class distributions, and inference can stop once a distribution passes a configured entropy threshold. The mechanism makes model depth input-dependent. Some inputs may leave after relatively few layers, while uncertain inputs continue through more of the network. That flexibility also introduces a new source of error: an intermediate head can be confident and still be wrong.

Cybersecurity 12 Sep 2026 7 min read

Enforce HTTPS with HSTS

TLS protects an HTTP connection after the browser starts HTTPS. A plain HTTP request sent before a redirect is different: it has no TLS protection, so a network attacker can alter the response and prevent the redirect from reaching the browser. HTTP Strict Transport Security (HSTS) gives a site a browser-enforced transport rule. After receiving a valid HSTS policy over HTTPS, a supporting browser remembers that the host must use HTTPS for a defined period. Future HTTP navigation attempts are upgraded locally before an insecure request is sent.

Artificial Intelligence 12 Sep 2026 7 min read

Embedding Anisotropy Can Compress Cosine Score Separation

Two embedding vectors can have a high cosine similarity even when the items they represent are not close in the task-specific sense a retrieval system needs. One source of this mismatch is embedding anisotropy: vectors are distributed unevenly across representation space, often with substantial mass concentrated around shared directions. Cosine similarity removes vector magnitude from the comparison, but it does not remove a common directional component. If many vectors point partly in the same direction, unrelated pairs can start from an elevated cosine baseline. The useful distinction between relevant and irrelevant items then has to appear within a narrower score range.

Cybersecurity 12 Sep 2026 8 min read

DNS Rebinding Turns Name Validation Into Stale Evidence

A service receives a URL, resolves its hostname, confirms that the returned address is public, and approves the request. Moments later, the HTTP client resolves the same hostname again. This time the answer points at a loopback address, a private network, or another destination the service was supposed to keep out of reach. Both pieces of code can appear correct in isolation. The validator rejected forbidden addresses. The client connected to the hostname it was given. The failure sits between them: the security decision was made about one DNS result, while the network operation used another.

Cybersecurity 12 Sep 2026 6 min read

DNS Rebinding Turns Name Resolution Into a Browser Pivot

DNS Rebinding Turns Name Resolution Into a Browser Pivot A browser tab does not need direct knowledge of a private network to become a useful bridge into it. If an attacker controls a hostname and its DNS answers, the same hostname can first resolve to an attacker-controlled public server and later resolve to an address reachable only from the browser’s network. The page keeps using a familiar origin label while the destination behind that label changes.

Tech 12 Sep 2026 6 min read

DNS Cache and Stale Addresses

A website can move to a new server while one device still tries the old address. Another device on the same network may connect normally. That mismatch can come from DNS caching: a resolver has kept an earlier answer and is still allowed to reuse it. DNS caching is not a single cache in one fixed place. Browsers, operating systems, local network software, and recursive DNS resolvers can all retain DNS information. The result is fewer repeated lookups, but it also means a changed record does not necessarily appear everywhere at the same instant.

Tech 12 Sep 2026 6 min read

Display Scaling and Screen Resolution

A laptop can have a very high-resolution panel and still show fewer application windows than an older, lower-resolution monitor. The panel has not lost pixels. The operating system is using more physical pixels to draw each logical unit of the interface. That behavior is display scaling. It separates the pixel grid built into a screen from the coordinate system used to size text, controls, windows, and other interface elements. Treating resolution and scaling as the same setting makes several familiar effects harder to interpret, including large text on a sharp screen, blurry legacy applications, and different workspace sizes on monitors with similar pixel counts.

Tech 12 Sep 2026 6 min read

Display Refresh Rate and Frame Delivery

A 120 Hz screen can refresh twice as often as a 60 Hz screen, but that number does not mean every application produces 120 new frames each second. The display and the graphics system have separate jobs: one presents images at a refresh cadence, while the other prepares frames for presentation. That distinction explains several familiar effects. A high-refresh screen can make pointer movement and scrolling appear more continuous, yet a game rendering slowly can still look uneven. It also explains how variable refresh operation can reduce visible timing conflicts between frame production and display updates.

Go 12 Sep 2026 4 min read

Detach Go Context Cancellation with context.WithoutCancel

A Go context usually ties a unit of work to the lifetime of its parent. Cancel an HTTP request context, and derived contexts observe that cancellation. This propagation is the normal contract, but some follow-up operations need a different lifetime while still carrying request-scoped values. Go 1.21 added context.WithoutCancel for that boundary. It returns a context that can resolve values through its parent but does not inherit the parent’s cancellation state or deadline.

Software Engineering 12 Sep 2026 7 min read

Deadline Propagation as a Request Boundary

Deadline Propagation as a Request Boundary A service can return after its caller has stopped waiting. The computation may still consume a connection, hold a concurrency slot, execute a database query, or start another remote call. A local timeout limits how long one caller waits; it does not, by itself, bound the lifetime of work already sent deeper into the system. An end-to-end deadline changes that boundary. Instead of giving each operation an independent duration, the request carries a point in time after which its result is no longer useful to the initiating operation. Each component can derive its remaining budget from that same boundary.

Cybersecurity 12 Sep 2026 8 min read

CORS Is a Browser Read Boundary, Not an API Firewall

CORS Is a Browser Read Boundary, Not an API Firewall An API can reject every cross-origin browser response and still receive the underlying requests. That distinction is easy to lose when Cross-Origin Resource Sharing is described as an access-control feature without naming the actor it constrains: browser script. CORS extends the browser’s same-origin model by letting a server state which origins may access selected responses. It does not turn the server into a network firewall, authenticate a caller, or guarantee that a request never reaches application code. A command-line client, backend service, malware process, or custom HTTP stack does not have to enforce browser CORS rules at all.

Cybersecurity 12 Sep 2026 7 min read

Control Referrer Data with Referrer-Policy

A browser can attach source-page information to an outbound request through the HTTP Referer header. That context can help with analytics, navigation flows, and abuse detection, but it can also expose more URL data than a destination needs. An explicit Referrer-Policy gives a site control over this boundary. The main security objective is simple: send the minimum source context needed for legitimate behavior, especially when a request crosses to another origin.

Artificial Intelligence 12 Sep 2026 9 min read

Control LLM Behavior with Activation Steering

Control LLM Behavior with Activation Steering Prompting controls a language model through its input tokens. Fine-tuning changes model parameters. Activation steering offers a third option: change selected internal activations while the model runs, without rewriting its weights. That makes activation steering useful for experiments where you want to test whether an internal direction is connected to a behavior, or apply a lightweight behavior shift during generation. It also creates new engineering questions. A steering vector can help at one layer and damage output at another. A strength that works on short prompts can become excessive on different inputs. A behavioral shift can also come with losses in fluency or task accuracy.

Artificial Intelligence 12 Sep 2026 7 min read

Control Expert Routing in Mixture-of-Experts Models

A mixture-of-experts layer can contain far more parameters than it evaluates for each token. A router scores a set of experts, selects a small subset, and sends each token only to those selected computation paths. The parameter count can grow without making every token execute every expert. That sparse structure creates a separate systems problem: the router decides where computation lands. Two models with the same experts and the same nominal top-k routing can have very different behavior if one spreads tokens across experts and the other concentrates them on a few paths.

Artificial Intelligence 12 Sep 2026 6 min read

Control Diffusion Conditioning with Classifier-Free Guidance

A conditional diffusion model can follow its conditioning signal more strongly at sampling time without a separate classifier. Classifier-free guidance does this by evaluating a model in conditional and unconditional modes, then amplifying the difference between those predictions. That difference is the central mechanism. The guidance scale does not simply make a prompt louder in an abstract sense. It changes the denoising prediction along a direction defined by what the conditioning input contributes relative to an unconditional prediction at the same noisy state.

Artificial Intelligence 12 Sep 2026 6 min read

Contrast Language Model Logits with Expert-Amateur Decoding

A language model can assign high probability to tokens that are fluent but generic. Contrastive decoding changes token selection by comparing a stronger expert model with a weaker amateur model at the same generation position. A token becomes attractive when the expert favors it more strongly than the amateur does. The comparison is not an unrestricted subtraction across the vocabulary. The original method also keeps candidate tokens inside a plausibility set defined by the expert. That constraint matters because a large expert-amateur score gap can otherwise promote a token that both models consider implausible.

Cybersecurity 12 Sep 2026 8 min read

Constrain Server-Side URL Fetches

Applications often fetch remote resources on behalf of users. Image importers, webhook testers, document converters, link preview services, feed readers, and URL-based upload features all need outbound network access. That capability becomes a security boundary as soon as an untrusted party can influence the destination. A server can usually reach systems that an internet client cannot. It may have access to loopback services, private subnets, cloud metadata endpoints, internal administration panels, service discovery systems, or trusted network peers. A server-side request forgery flaw, commonly called SSRF, turns the application’s network position into an attack primitive.

Software Engineering 12 Sep 2026 9 min read

Consistent Hashing: Limit Key Movement as Nodes Change

Distributed systems often need a deterministic answer to a simple question: given a key, which node should own it? A cache cluster may route each object key to one server. A storage service may assign each partition to a shard. A worker pool may send all events for the same account to the same processor. The routing rule must be stable enough that clients agree, yet flexible enough to handle nodes joining and leaving.

Software Engineering 12 Sep 2026 8 min read

Conditional HTTP Writes with Entity Tags

Conditional HTTP Writes with Entity Tags A client reads a resource, edits its local copy, and sends a replacement several seconds later. During that interval another client may have committed a different replacement. A plain PUT has no statement about the representation on which the edit was based, so the server can accept a request whose starting state is already obsolete. HTTP conditional requests can carry that missing premise. A response entity tag identifies a selected representation, and If-Match makes a later request conditional on a current representation matching one of the supplied tags. For state-changing methods, that turns representation identity into an explicit concurrency boundary.

Artificial Intelligence 12 Sep 2026 10 min read

Compress Neural Networks with Knowledge Distillation

Compress Neural Networks with Knowledge Distillation A model can meet your quality target in a notebook and still be too expensive to serve. A large network may consume too much memory, add unacceptable latency, or make high request volume costly. Knowledge distillation addresses this problem by using a stronger model, called the teacher, to guide the training of a smaller student model. The key idea is richer than copying the teacher’s final answer. The teacher produces a distribution across possible outputs, and that distribution can reveal useful relationships between alternatives. A student can train against those soft targets while also using the original labels.

Software Engineering 12 Sep 2026 7 min read

Compensation Is Not Rollback Across Service Boundaries

Compensation Is Not Rollback Across Service Boundaries A local database rollback can erase uncommitted writes before other transactions are allowed to depend on them. A compensating operation has a different shape. It runs after an earlier operation has committed, often after that result has become visible to other components. That distinction changes the consistency model. Compensation does not restore a distributed system to a state in which the original action never occurred. It adds another state transition whose domain meaning offsets some consequence of the first one.

Go 12 Sep 2026 5 min read

Compare Map Values with maps.EqualFunc in Go

Two Go maps can represent the same logical data even when their value types differ or their values need domain-specific comparison. maps.EqualFunc handles that case by matching keys normally while delegating value comparison to a caller-supplied function. That split matters. The comparator controls value equivalence only. It cannot redefine key identity, compensate for a missing key, or make maps with different entry counts equal. Key membership is checked before value equivalence The function accepts two maps with the same key type but potentially different value types: