AnthropicPopular

Claude Sonnet 4.5

The best balance of intelligence and speed in the Claude family, and a favourite for code.

  • Coding
  • Research summaries
  • Writing

Made with Claude Sonnet 4.5

Real output from our prompts, unedited.

What changed in solid-state battery production for electric cars in the last twelve months? Give five key developments, each with a source link.

Based on recent search results, here are five key developments in solid-state battery production for electric vehicles over the last twelve months:

1. Mercedes-Benz First Road-Ready Solid-State EV (February 2025)

Mercedes-Benz became the first automaker to put a solid-state battery on the road, integrating a lithium-metal solid-state battery from Factorial Energy into a production EQS platform. The prototype achieved 620 miles of range—25% longer than the standard EQS [14].

Source: CarBuzz - Solid-State Battery Breakthroughs

2. Nissan's Yokohama Pilot Line Operational (January 2025)

Nissan activated its pilot production line for all-solid-state batteries at its Yokohama plant, manufacturing prototype cells targeting double the energy density of current lithium-ion batteries. The company is on track for commercial production in fiscal year 2028 [1].

Source: Electrive - Nissan Solid-State Battery

3. ProLogium Opens First Giga-Scale Manufacturing Facility (January 2024)

ProLogium established the world's first gigawatt-scale solid-state battery manufacturing facility in Taoyuan, Taiwan, marking a crucial step toward mass production capability and addressing scalability challenges [17].

Source: Research Nester - Solid State Battery Market Report

4. Toyota Partners with Sumitomo for Mass Production (October 2025)

Toyota and Sumitomo Metal Mining struck a joint development agreement to mass-produce cathode materials for solid-state batteries, with Sumitomo planning to begin scale production in fiscal year 2028 to support Toyota's 2027-2028 commercialization timeline [5].

Source: InsideEVs - Toyota Solid-State Deal

5. GAC Completes First All-Solid-State Production Line (November 2024)

GAC Group finished its first all-solid-state battery production line with over 60 Ah capacity through its Greater Bay Technology subsidiary, which aims for GWh-level mass production and in-vehicle deployment by 2026 [15].

Source: Electrek - Solid-State Batteries Coming Sooner

  1. [1] Solid-state battery: Nissan aims for double range with new cells - electrive.com
  2. [5] Toyota Just Struck A Key Deal To Make Solid-State Batteries
  3. [14] Solid-State Battery Breakthroughs: From Lab to Road-Ready
  4. [15] Solid-state EV batteries are coming sooner than expected
  5. [17] Solid State Battery Market Size & Share | Growth Trends 2035

Write a TypeScript function `debounceAsync` that debounces an async function, cancels stale calls with AbortController and always resolves the latest call. Include a short usage example.

Debounced Async Function with Abort Controller

Here's a TypeScript implementation that debounces async functions and properly cancels stale calls:

typescript
type AsyncFunction<T extends any[], R> = (...args: T) => Promise<R>;

function debounceAsync<T extends any[], R>(
  fn: AsyncFunction<T, R>,
  delayMs: number
): AsyncFunction<T, R> {
  let timeoutId: NodeJS.Timeout | null = null;
  let currentController: AbortController | null = null;

  return async (...args: T): Promise<R> => {
    // Cancel previous timeout
    if (timeoutId) {
      clearTimeout(timeoutId);
    }

    // Abort previous pending call
    if (currentController) {
      currentController.abort();
    }

    // Create new abort controller for this call
    currentController = new AbortController();
    const thisController = currentController;

    return new Promise<R>((resolve, reject) => {
      timeoutId = setTimeout(async () => {
        try {
          // Check if this call was aborted before execution
          if (thisController.signal.aborted) {
            reject(new Error('Aborted'));
            return;
          }

          const result = await fn(...args);
          
          // Only resolve if not aborted during execution
          if (!thisController.signal.aborted) {
            resolve(result);
          }
        } catch (error) {
          if (!thisController.signal.aborted) {
            reject(error);
          }
        }
      }, delayMs);
    });
  };
}

Usage Example

typescript
// Simulated API call
async function searchUsers(query: string): Promise<string[]> {
  await new Promise(resolve => setTimeout(resolve, 500));
  return [`User matching "${query}"`];
}

// Create debounced version
const debouncedSearch = debounceAsync(searchUsers, 300);

// Usage in practice
async function handleSearchInput(query: string) {
  try {
    // Only the last call within 300ms window will complete
    const results = await debouncedSearch(query);
    console.log('Results:', results);
  } catch (error) {
    // Stale calls will be rejected with 'Aborted' error
    console.log('Search cancelled');
  }
}

// Rapid calls - only last one resolves
handleSearchInput('j');     // Cancelled
handleSearchInput('jo');    // Cancelled
handleSearchInput('john');  // Executes after 300ms

Key Features

  • Debouncing: Delays execution until calls stop for delayMs
  • Abort Control: Cancels stale promises using AbortController
  • Type Safety: Full TypeScript generics support
  • Latest Win: Only the most recent call within the window completes

This is ideal for search inputs, autocomplete, or any scenario where you want to wait for user input to stabilize before making expensive async operations.

Three friends split a $96 bill. Ana paid $40, Ben $36 and Cy $20. Who owes whom, with the fewest transfers?

Splitting the Bill Fairly

The Situation

Total bill: $96
Fair share per person: $96 ÷ 3 = $32 each

Who Paid What

  • Ana: paid $40 → overpaid by $8
  • Ben: paid $36 → overpaid by $4
  • Cy: paid $20 → underpaid by $12

Solution: Fewest Transfers

To minimize transfers, we match who owes money with who's owed:

Cy owes $12 total (the only person who underpaid)

One transfer:

  • Cy pays Ana $8
  • Cy pays Ben $4

This settles everything with just 2 transfers.

Verification

After transfers:

  • Ana: $40 - $32 + $8 = $8 net → $0 ✓
  • Ben: $36 - $32 + $4 = $4 net → $0 ✓
  • Cy: $20 - $32 + $12 = $0 net → $0 ✓

Everyone ends up having paid exactly $32.

Specs

Best balance of intelligence and speed, excellent at code.

Context window
200K tokens
Longest reply
16K tokens
Thinks before answering
No
Understands images
Yes
Reads PDFs
Yes
Web search and tools
Yes

Compare with