SShortSingh.
Back to feed

How HarmonyOS NEXT Ditches Android Roots With a Custom Compiler and Declarative UI

0
·3 views

Huawei's HarmonyOS NEXT, often called 'Pure HarmonyOS,' is a microkernel-based operating system that fully drops compatibility with the Android Open Source Project. Unlike Android's JVM-based runtime, it uses the ArkCompiler, an Ahead-of-Time compiler that converts ArkTS — a strict TypeScript subset — into native C++ at build time, eliminating runtime type inference and garbage collection overhead. The UI framework, ArkUI, uses a declarative model where the @State decorator is compiled into native getter/setter code that automatically flags components as 'dirty' when data changes, triggering targeted redraws without a full tree scan. Developers familiar with Android must adapt to new concepts: UIAbilities replace Activities, ArkUI replaces ViewGroups, and ArkTS replaces Java or Kotlin. The architecture is designed for high performance across distributed devices, representing a distinct third path in mobile OS design beyond Android and iOS.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Adjust animation speed via playback FPS, not by redrawing sprite sheets

Game developers often unnecessarily modify sprite sheets when animation speed feels off, but the fix usually lies in adjusting playback FPS rather than adding or changing frames. The same eight-frame sprite sheet can produce a one-second loop at 8 fps, a two-thirds-second loop at 12 fps, or a half-second loop at 16 fps — no pixel changes required. Developers should distinguish between source FPS, frame count, and playback FPS, as these are independent variables that together determine how an animation feels in-game. To avoid rounding drift when calculating frame timing, each boundary should be derived from its index rather than by repeatedly adding a fixed hold duration. Both Godot and Phaser offer engine-level controls for animation speed, and tools like the FrameSprite timing calculator can help export per-frame timing data for more precise adjustments.

0
ProgrammingDEV Community ·

Anthropic's Claude Agents Formally Prove Fermat's Last Theorem in 11 Days

Anthropic announced on September 4 that a team of Claude AI agents produced the first complete, computer-verified proof of Fermat's Last Theorem, a problem unsolved for over 350 years. The agents worked largely autonomously for 11 days, generating 13 million lines of Lean code and proving more than 29,500 theorems. Early attempts failed not due to model limitations but because agents lost track of the project's shared state and stopped coordinating effectively. The breakthrough came when a shared directed acyclic graph was introduced to serve as collective memory for the agent team. Mathematician Kevin Buzzard reviewed the proof, and a verification tool confirmed it matched the standard Lean statement of the theorem, using only three accepted axioms with no omitted steps.

0
ProgrammingDEV Community ·

Six Missing Features Forced a Self-Hosting Lexer to Grow from 129 to 355 Lines

A developer building 'lm', a small statically-typed low-level language with four compiler backends, attempted to port its JavaScript lexer into lm itself as a self-hosting milestone. The port revealed six core language gaps — including no pointer-to-local, no constants, no character literals, no string type, no labelled loop breaks, and no hex notation — that together caused the lm lexer to be nearly three times longer than its JavaScript equivalent. The absence of a centralised advance() function forced inline duplication across 14 call sites, which introduced a latent correctness bug in column counting that only goes undetected due to incidental newline resets. The developer intentionally chose the lexer as the first porting target because, at 129 lines, it was small enough to abandon if the language proved inadequate. The exercise served as a planned diagnostic, exposing fundamental expressiveness limits before the project scaled further.

0
ProgrammingDEV Community ·

Why Building a Hand-Gesture Music Instrument Is Harder Than It Looks

Developers building browser-based hand-gesture synthesizers face a core challenge: human hands produce continuous, trembling signals that discrete note-mapping logic struggles to handle cleanly. A simple position-to-note mapping causes rapid note flickering due to natural hand tremor, a problem that hysteresis — using different entry and exit thresholds per note — addresses better than smoothing filters. Adding smoothing filters can inadvertently double end-to-end latency, which musicians begin noticing at around 20 milliseconds, making frame rate and scheduling discipline more critical than model accuracy. Accurate performance recording also requires using the audio clock rather than the wall clock, since the two drift apart and produce misaligned MIDI exports. Experts recommend building and validating the audio engine via keyboard input first, then layering hand tracking on top, to isolate bugs and avoid demanding camera permissions before earning user trust.