Where are you using WebAssembly?
Wasm promises to let developers build once and run anywhere. Are you using it yet?
At work, for production apps
At work, but not for production apps
I don’t use WebAssembly but expect to when the technology matures
I have no plans to use WebAssembly
No plans and I get mad whenever I see the buzzword
Frontend Development / JavaScript / Python / Software Development

Dev News: Python AI Tool, a Copilot Alternative, and RSC News

This week, we look at a new tool to optimize Python code, an open source alternative to Copilot, the latest Web3 developer report, and more.
Jan 20th, 2024 5:00am by
Featued image for: Dev News: Python AI Tool, a Copilot Alternative, and RSC News

A new open source tool created at the University of Massachusetts Amherst uses AI to help make Python code more efficient. Scalene is like a debugger for performance issues and makes suggestions to programmers about how to improve Python code, reported IT Brew on Wednesday.

The tool was the creation of UMass Professor Emery Berger and Ph.D. students Sam Stern and Juan Altmayer Pizzorno. They must be doing something right; Scalene has been downloaded from GitHub more than 900,000 times.

“Profilers allow coders to understand their work’s performance problems, and which parts of the code take the longest time to execute,” reported IT Brew. “Scalene measures how much time and memory is spent on each line of code — both on average and at peak.”

Scalene also determines how much time is spent in efficient libraries and how much is spent in Python. The tool monitors memory usage and execution time for each line and turns the code into a prompt that starts recommended revisions.

Scalene is the first profiler to incorporate AI, Berger told IT Brew.

Mentat Offers Open Source Alternative to GitHub Copilot

Developers looking for an open source alternative to Copilot might want to explore Mentat, an AI tool and code assistant that works from the command line.

Mentat, named after the Mentats of Dune, is under the Apache-2.0 license. The developers distinguish it from Copilot, noting that it can coordinate edits across multiple locations and files, and already has the context of a project without cutting and pasting. It can help developers understand a new codebase, add new features or even refactor existing code, the GitHub repository noted.

The roadmap includes plans to add an improved user interface, VSCode and other editor integrations, the ability to use LLMs other than GPT-4, work with codebases larger than the LLM context limits without requiring developers to filter files manually, and improved edit quality.

Storybook 8 Adds React Server Component Support

Storybook’s next major release, Storybook 8, introduces React Server Component (RSC) compatibility to the UI creation platform. This means developers will be able to build and test full Next.js applications in isolation, according to Storybook Product Lead Michael Shilman.

To do so, Storybook leverages Mock Service Worker, an API mocking library that allows developers to write client-agnostic mocks and reuse them across any framework or tool.

Storybook is a popular tool that allows frontend developers to build, test and document UI components in a sandbox. Shilman includes instructions on how to mock up a Hacker News story using these new features and includes a link to this demo page.

React Framework Waku Adds createPages Function

The minimalist React framework Waku, which The New Stack recently profiled, released version .19 on Tuesday. This release marks the shift from being “helpful as a reference implementation for library authors curious about React server components” to being a production-ready React framework, wrote Sophia Andren, co-founder and technical director of Candycode.

As part of that announcement, Waku now offers a createPages function, a low-level routing API that allows Waku developers to create layouts and pages programmatically, Andren stated.

“Both static prerendering (SSG) and server-side rendering (SSR) options are available and are selected at the layout and page level,” she added. “For example, you can statically prerender a global header and footer in the root layout at build time, but dynamically render the rest of a home page at request time for personalized user experiences.”

She also noted that Waku is designed for startups and agencies seeking a lightweight alternative for small to medium-sized React projects.

Vector Database Pinecone Goes Serverless

Pinecone is now offering Pinecone Serverless, a vector database that uses serverless architecture to allow developers to add more data to their GenAI applications. That, in turn, can reduce “unhelpful” answers from GPT-4 by 50%, according to the research by the company.

The database eliminates the need for developers to provision or manage infrastructure, allowing them to build GenAI applications more easily, the company stated in a release.

Developers can learn more in this technical post, but Pinecone stated that the benefits of its serverless offering include:

  • Separation of reads, writes, and storage, which reduces costs for all types and sizes of workloads.
  • An architecture with vector clustering on top of blob storage to provide low-latency, fresh vector search over large data sizes at a low cost.
  • Indexing and retrieval algorithms to enable fast and memory-efficient vector search from blob storage without sacrificing retrieval quality.
  • Multitenant compute layer, which supports retrieval for thousands of users on demand. This enables a serverless experience in which developers don’t need to provision or manage infrastructure, as well as usage-based billing that lets organizations only pay for what they use.

Pinecone Serverless is launching with integrations to other solutions in the GenAI technology stack, including Anthropic, Anyscale, Cohere, Confluent, LangChain, Pulumi, and Vercel, with others to be announced soon. Notion, CS Disco and Gong are among the companies already using Pinecone Serverless.

Pinecone Serverless is available in public preview in AWS cloud regions, and will be available thereafter on Azure and GCP. The company is offering developers $100 in free usage credits.

Fewer Newcomers Joining Ranks of Crypto Developers

The recently released Crypto Developer Report confirms that the number of active crypto (a.k.a. Web3) developers continues to fall, but the majority of the decline is because much fewer newcomers (often 1-time or temporary contributors) have joined since the latest crypto bubble burst.

Despite the hype about multichain and cross-chain, the percentage of crypto devs working on more than one chain has stayed steady at about 30% for the last 3 years.

Among the medium-sized ecosystems, Moonbeam (cross-chain), Starknet and zkSync (zero-knowledge proofs), Internet Computer, are some of the only ones with noteworthy growth.

Ecosystems with big YoY declines in number of active developers include Ethereum (-33%), BNB (Binance’s coin) (-40%), Polygon (-42%), Solana (-48%) and The Graph (-66%). (Brief by Lawrence Hecht)

Apple App Store to Let Devs Link to Own Websites for Purchases

Mobile app developers on iOS will be able to direct customers to non-App store purchasing options after an update to Apple’s U.S. iOS App Store policies, MacRumors reports. Under the new rules, apps can include a single link to a developer website, which can offer an in-app purchase alternative such as subscriptions or other digital content.

Apple will still collect a 12-27% commission on content bought there, however.

To take advantage of this option, developers must apply for a StoreKit External Purchase Link Entitlement. Apple outlined the change in its ‌App Store‌ review guidelines and a statement of compliance submitted to the Northern California U.S. District Court, MacRumors reported.

Apps that use misleading marketing practices, scams, or fraud in relation to the entitlement will be removed from the App Store. The developer could also be kicked out of the Apple Developer Program.

Free Workshop on React Server Components

Cloudflare is offering a free half-day workshop on understanding React Server Components (RSCs). It will focus on explaining how RSCs work behind the scenes, but also on how developers can use RCS. Attendees will build an app using RSCs and Cloudflare’s new beta Smart Placement technology and deploy it onto the developer platform along with a serverless SQL database.

Correction: Sophia Andren’s last name was misspelled due to a typo and is now correct.

Group Created with Sketch.
THE NEW STACK UPDATE A newsletter digest of the week’s most important stories & analyses.