今日已更新 144 条资讯 | 累计 37695 条内容
关于我们

标签:#an

找到 2775 篇相关文章

开发者

Running Android VMs on ARM: Rebuilding the Minisforum MS-R1 Kernel for Cuttlefish

Part 1 of 2. This part covers getting a kernel that can actually host virtual machines. Why bother I wanted a box that could run a dozen Android instances at once — real ones, not emulated-on-x86 ones — to benchmark peer-to-peer sync behaviour at scale. Native arm64 Android on native arm64 silicon, no translation layer, enough cores and RAM to make the peer count interesting. The Minisforum MS-R1 looked ideal. It's built on the CIX P1 ("Sky1"), a 12-core ARMv9 SoC, and it's one of the first genuinely affordable ARM desktops with server-class amounts of memory. Google's Cuttlefish — AOSP's official virtual device — runs arm64 Android guests on arm64 hosts with KVM acceleration, with a --num_instances=N flag that does exactly what I wanted. Everything lined up. Then I hit this: $ sudo modprobe vhost_vsock modprobe: FATAL: Module vhost_vsock not found in directory /lib/modules/6.6.10-cix-build-generic This post is what it took to fix that. If you have this hardware and want to run VMs on it, you'll hit the same wall, and there are four separate traps between you and the other side. I hit all of them so you don't have to. Rough time: an afternoon. Most of it is a compile you can walk away from. The problem: no vhost, no Cuttlefish Cuttlefish uses vsock — a virtual socket transport — for all communication between the host and its guest VMs. ADB, logs, control messages, everything. Without /dev/vhost-vsock , Cuttlefish doesn't start. It's not a soft dependency. The kernel Minisforum ships is 6.6.10-cix-build-generic . Check what it thinks about virtualization: grep -E 'VHOST' /boot/config- $( uname -r ) On mine, the output was more interesting for what was missing than what was there: # CONFIG_VHOST_NET is not set CONFIG_VHOST_VSOCK doesn't appear at all — not even as "is not set". That happens when the parent CONFIG_VHOST symbol is disabled, so Kconfig never emits the dependent symbols. The vendor didn't disable vsock specifically; they disabled the entire vhost subsyste

2026-08-17 原文 →
AI 资讯

Nintendo Hotline – What can Product Managers learn?

Nintendo had a hotline where gamers could, at the time, call and speak with 'Game Counsellors' who provided them with tips and walkthroughs. It operated for quite sometime before Nintendo sunset it. There are a few (Product) lessons from this that I am sure will be of value to Product Leaders. 1- Necessity (Invention's mother) : The necessity of a situation usually births the creation of something that stands out from the rest. While Nintendo was not the first to use a phone as a 'business' function, it proved it can be used in the context of a video gaming community. That was their ‘necessity’. "We need a way to accomplish ‘xyz’ " usually turns to creating something specific to that situation. The ‘xyz’ in Nintendo’s case was supporting gamers instantly. It could also be something to support a Product or make it easier for the customer. It could be a feature or it could even be the Product itself. All we need to do is pay attention to our necessities, needs and allow it to guide us. Most people are not paying attention to their needs that’s why innovation and improvements appear difficult. Others know what their necessities are but prioritise wrongly – well that’s story for another day. The point here is simply to build for a necessary problem that exists and not out of assumptions. 2- Know what is available immediately : If necessity is calling, we cannot keep it waiting. We need to look around to know what’s available immediately. In most cases we do not need to go far for solution, we just need to pick what is close by then structure it to align with current needs. Sometimes the necessity demands using/importing an idea from some other place into your own specific area. In retrospect, Nintendo had other options it could have considered at that era in time. During that period, it was common to use print media to relate with the computer (and also gaming) community. There was also postal mail, bulleting boards. I do not know for sure but I am guessing the team at

2026-08-17 原文 →
AI 资讯

Graph Engineering Explained: The Missing Fifth Layer of AI Agent Architecture

Every "my agent isn't working" postmortem starts the same way: someone rewrites the prompt. Adds a constraint. Adds an example. Ships it again. Three iterations later the agent still can't hold up in production, and the team is quietly out of ideas — because the prompt was never the layer that broke. There are five control layers standing between a raw model call and a system you can actually trust with a business outcome: prompt, context, harness, loop, and graph. Most teams staff and instrument only the first one or two. The failures that show up in production — wrong tool called, same mistake retried forever, output routed to the wrong reviewer — live almost entirely in the layers nobody named. Graph engineering is the newest and least understood of the five: it's the layer that decides which component runs next, when agents work in parallel versus in sequence, and where a human has to sign off before anything expensive or irreversible happens. This piece breaks down all five layers, works through a single production failure end to end, and shows where evals fit as the measurement system running through every one of them. The mental model: five rings around the model MODEL CALL = prompt + context AGENT = model call + harness + loop SYSTEM = agents + deterministic steps + humans, connected by a graph EVALS = evidence that every layer actually works Prompt and context sit closest to the model. Harness and loop turn a model call into something that can act and recover. Graph turns a collection of agents, functions, and human checkpoints into a coordinated system. None of these layers replace each other — they're concentric controls, not pipeline stages, and a production agent uses all five simultaneously. The weakest layer sets the ceiling on how reliable the whole thing is, no matter how good the other four are. Layer Controls Fails as Prompt Role, goal, constraints, output contract Ambiguous instructions Context What reaches the window: docs, history, tool results

2026-08-17 原文 →
AI 资讯

A Beginner's Guide to Performance Testing with Apache JMeter

Performance testing is essential for ensuring your applications can handle expected user loads without bottlenecks or failures. Apache JMeter remains one of the most popular open-source tools for load, stress, and performance testing. Here is a quick guide to getting your JMeter environment set up and executing your first load test. 1. Prerequisites JMeter requires Java to execute. Ensure you have JDK 11 or higher installed on your system. Verify your Java installation: java -version 2. Download and Installation Download the latest binary zip/tgz file from the Official Apache JMeter Site. Extract the archive into your preferred local directory. Launch JMeter from the bin directory: Windows: Double-click jmeter.bat macOS/Linux: Open terminal and run ./jmeter.sh 3. Install the Plugins Manager The Plugins Manager simplifies adding listeners, graph generators, and custom samplers. Download jmeter-plugins-manager.jar from JMeter Plugins. Move the file into your JMeter lib/ext directory. Restart JMeter. Access the Plugins Manager under Options > Plugins Manager. 4. Building Your First Test Plan Set up a basic HTTP test using the GUI interface: Thread Group: Right-click Test Plan > Add > Threads (Users) > Thread Group. Configure your target virtual users, ramp-up time, and loop count. HTTP Request Defaults: Right-click Thread Group > Add > Config Element > HTTP Request Defaults. Set your target server domain/IP and port. HTTP Sampler: Right-click Thread Group > Add > Sampler > HTTP Request. Define the API path and request method. Listeners: Right-click Thread Group > Add > Listener > View Results Tree or Summary Report (use these GUI listeners primarily for test script validation). 5. Running Tests in Non-GUI Mode Never run actual heavy load tests through the JMeter GUI as it consumes significant local system resources. Use CLI mode for accuracy: jmeter -n -t /path/to/testplan.jmx -l /path/to/results.jtl -e -o /path/to/html-report-folder -n: Non-GUI execution -t: Path to y

2026-08-17 原文 →
AI 资讯

Android’s Walled Garden: Google’s Developer Verification Lockdown That Changes Everything

1. What Is Android Developer Verification and Why Google Introduced It In August 2025, Google quietly announced a major policy change called Android Developer Verification . Starting September 2026 (first in select countries like Brazil, Indonesia, Singapore, and Thailand, then rolling out globally), every developer whose app is installed on certified Android devices must register with Google. This is not limited to apps distributed through the Google Play Store. It applies to all apps — including those sideloaded from websites, shared via APK files, distributed through F-Droid, or even internal company tools and hobby projects. Google’s official reason is “improved security and accountability” — to stop repeat malware developers. However, the implementation goes far beyond that. It creates a central registry controlled entirely by Google, where every person or organization building Android software must identify themselves. 2. How the Verification Process Actually Works (Step-by-Step Details) To get their apps installable on most Android phones, developers must complete the following: Create or use a Google Play Console developer account. Pay a registration fee (standard accounts are around $25, with possible additional costs). Agree to Google’s lengthy Terms and Conditions without negotiation. Submit government-issued identification (passport, driver’s license, or national ID). Provide proof of ownership of their app’s signing key (the private key used to sign APKs). List all current and all future application package names (com.example.myapp) they plan to use. Once registered and verified, apps from that developer can install normally. If a developer does not register or fails verification, their apps will be silently blocked by Google Play Protect on certified devices worldwide. This process turns what was once a simple “build and share APK” workflow into a permission-based system where Google acts as the gatekeeper for the entire Android ecosystem. 3. The “Adva

2026-08-16 原文 →
AI 资讯

What the browser can actually tell you about your hardware (and what it can't)

I spent a while building browser-based hardware diagnostics and came away with a much clearer sense of where the web platform is genuinely capable and where it quietly lies to you. Notes below, with live demos for each API so you can poke at them yourself. Refresh rate: requestAnimationFrame is the only signal you get There's no screen.refreshRate . The only approach is timing requestAnimationFrame callbacks and inferring the rate from the median frame delta: const deltas = []; let last = performance . now (); function tick ( now ) { deltas . push ( now - last ); last = now ; if ( deltas . length < 180 ) requestAnimationFrame ( tick ); else { const sorted = deltas . slice (). sort (( a , b ) => a - b ); console . log ( Math . round ( 1000 / sorted [ sorted . length >> 1 ])); } } requestAnimationFrame ( tick ); Two gotchas that cost me time. Use the median , not the mean — a single dropped frame wrecks an average. And browsers throttle rAF in background tabs, so the measurement is meaningless unless the tab is visible; gate it on document.visibilityState . ( live version ) Screen dimensions: four different answers, all "correct" screen.width , window.innerWidth , window.devicePixelRatio and screen.availWidth measure genuinely different things, and the one people usually want — actual native panel resolution — is screen.width * devicePixelRatio . Except that's still CSS-pixel derived, so on a scaled display it can disagree with what the panel physically is. The browser simply does not expose true hardware resolution. ( demo ) Keyboard: event.code vs event.key , and the keys you never receive event.key is layout-dependent, event.code is physical position — for a hardware tester you want code . The real limitation is that some keys never reach JS at all: PrintScreen often doesn't fire keydown , Meta combinations get swallowed by the OS, and Fn isn't a browser-visible key on most laptops. N-key rollover testing works surprisingly well though, since you just track the siz

2026-08-16 原文 →
AI 资讯

A Context Object Should Carry Its Receipt

A stored fact can be wrong in a quiet way. The answer still reads clean. A preference from an old exchange gets reused, the message goes out with confidence, and later nobody can tell why that detail was allowed back into the result. That is the failure I built around. When a system returns remembered material, the caller needs the text plus the reason it passed the reuse check. A log line found after the action is weak evidence. The object that leaves the memory service has to carry the admission record with it. 1. Keep the outside surface small This is the pattern I used in Holographic, Law-Bound Memory (HLM), a stand-alone memory brain outside application code. The README describes public Application Programming Interface (API) routes under /api/brain/* , with internal /api/v1/* services behind that layer. The outside shape is intentionally thin: register an agent, write a fact, build a capsule. The Python Software Development Kit (SDK) in sdks/python/hlm_sdk/client.py shows the boundary without exposing table names or policy code: import httpx class HLMClient : def __init__ ( self , base_url : str , token : str | None = None ): self . base_url = base_url . rstrip ( " / " ) self . _client = httpx . AsyncClient ( headers = { " Authorization " : f " Bearer { token } " } if token else None ) async def register_agent ( self , name : str ): r = await self . _client . post ( f " { self . base_url } /api/brain/agents/register " , json = { " name " : name }) r . raise_for_status return r . json async def write_fact ( self , text : str , tags : list [ str ] | None = None , selectors : list [ str ] | None = None ): r = await self . _client . post ( f " { self . base_url } /api/brain/memory/facts " , json = { " text " : text , " tags " : tags or [], " selectors " : selectors or []}) r . raise_for_status return r . json async def build_capsule ( self , query : str , budget_tokens : int = 2048 ): r = await self . _client . post ( f " { self . base_url } /api/brain/context/cap

2026-08-16 原文 →
AI 资讯

Architecting a Low-Power Geofencing Engine for Android Background Services

Opening hook It happened during a quiet Friday Jumu'ah prayer. The imam had just reached the most solemn part of the khutbah when a high-pitched, insistent ringtone echoed through the entire hall. Heads turned, whispers started, and the person responsible scrambled to silence their device, only to fumble and drop it in their haste. I sat there, mortified for them, knowing exactly how that sinking feeling felt. It is the universal experience of the modern digital age: the gap between our intentions to be polite and our actual ability to manage our phone's state in public spaces. The problem We live in a world of constant notification, yet we lack a standard way to govern our devices based on our physical context. Android provides AudioManager and NotificationManager , but these are reactive tools that require manual input. I tried using standard alarm-based triggers, but they lacked the spatial awareness I needed. If I am at the office, I want my phone on vibrate. If I am at home, I want it back to normal. If I am at a medical clinic, I need it on silent. Most existing solutions rely on heavy GPS polling, which drains the battery within hours. They treat location services as a raw stream of coordinate data rather than a state-based trigger. I wanted something that functioned entirely in the background, survived system reboots, and operated without a constant drain on the user's battery life. The friction wasn't just about silence; it was about the cognitive load of having to remember to switch profiles. I wanted my phone to handle the context switching for me, autonomously and reliably, without becoming a battery-draining nightmare. The technical decision / implementation To solve this, I moved away from manual polling and adopted the GeofencingClient within the Google Play Services location APIs. The decision to use this over raw LocationManager updates was rooted in battery efficiency. The GeofencingClient pushes the heavy lifting to the OS level. It uses a combina

2026-08-16 原文 →
AI 资讯

Clean Code Like a Jedi: The One Principle That Changed My Code Forever

The Quest Begins (The "Why") I still remember the first time I opened a pull request that looked like a novel written by someone who’d had too much coffee. The file was 800 lines long, a single function tried to validate input, fetch data from three different APIs, transform the result, update the UI, and log everything to a console that no one ever looked at. I spent three hours stepping through it with a debugger, only to realize the bug was a typo in a variable name buried three levels deep in a nested if‑statement. When I finally fixed it, I felt like I’d just defeated a dragon… only to discover the dragon had a dozen smaller dragons hiding in its caves. That experience left me wondering: Why does code feel so hard to read, even when it works? The answer wasn’t a fancy framework or a new language feature—it was a simple habit I’d overlooked: making every function do one thing, and do it well . Once I started treating that rule like a sacred oath, the dragons started to shrink, and my code began to feel like a clean, well‑lit hallway instead of a dark, tangled forest. The Revelation (The Insight) The principle is straightforward, yet its impact is massive: each function should have a single responsibility . If you can describe what a function does with a single verb phrase— validateUserInput , fetchUserProfile , renderDashboard —you’re on the right track. If you need an “and” or a “but” in that description, you’ve probably got more than one job packed in. Why does this matter? Readability : A reader can grasp the intent in seconds, not minutes. Testability : Small, focused functions are trivial to unit test. You can mock dependencies and assert outcomes without setting up a whole saga. Debugging : When something goes wrong, the stack trace points you directly to the guilty function, not to a 20‑line monolith where you have to hunt for the offending line. Reusability : A function that does one thing well can be dropped into other parts of the codebase (or even oth

2026-08-16 原文 →
AI 资讯

One-Shot UI Side Effects in BlocSignal: Snackbars, Dialogs, and Navigation Without State Pollution

Every Flutter developer has run into the Sticky State Dilemma . You build a login screen. When authentication fails, your state container emits an error. You catch it in your UI and show a SnackBar . Everything works—until the user rotates their phone, pulls down the notification shade, or types on the virtual keyboard. Suddenly, the widget tree rebuilds. The state container is still holding AuthErrorState("Invalid password") . The UI listener fires again. And a duplicate snackbar appears out of nowhere. In this article, we’ll explore why domain state machines struggle with transient UI events, how the classic BLoC community worked around this with package:bloc_presentation , and how BlocSignal lets you handle one-shot side effects cleanly with zero additional package dependencies . 1. The Root Problem: Persistent State vs. Ephemeral Actions State management in Flutter is designed to model persistent truth over time: Is the user logged in? AuthState.authenticated(user) Is data loading? TodoState.loading What is the cart total? $49.99 Persistent state answers: "What is the system's current condition?" In contrast, UI presentation actions are ephemeral pulses : Show a brief SnackBar toast. Pop up an alert confirmation dialog. Push a new route on the Navigator stack. Vibrate the haptic motor. These actions answer: "What just happened that requires a one-time reaction?" ┌────────────────────────────────────────────────────────┐ │ State vs. Effects │ ├────────────────────────────┬───────────────────────────┤ │ Persistent State │ Ephemeral Side-Effect │ ├────────────────────────────┼───────────────────────────┤ │ • Survived by UI rebuilds │ • Consumed once & gone │ │ • Represented in signals │ • Triggered by an event │ │ • Backed by equality diffs │ • Zero domain state footprint │ └────────────────────────────┴───────────────────────────┘ 2. The Legacy Workarounds (And Their Hidden Costs) Historically in package:bloc and package:flutter_bloc , developers used one of three

2026-08-16 原文 →
AI 资讯

Don’t overlook Elektron’s budget electronic music instruments

When I'm asked what to buy if you want to get into making electronic music, I often recommend Elektron's budget-minded Model:Samples and Model:Cycles grooveboxes. They don't grab headlines the way Teenage Engineering's gear or the Telepathic Instruments Orchid do, and even compared to the company's higher-end and more niche musical offerings like the Digitakt, Octatrack, […]

2026-08-16 原文 →