M
MercyNews
Home
Back
Перенос 100 000 строк кода с TypeScript на Rust с помощью ИИ
Технологии

Перенос 100 000 строк кода с TypeScript на Rust с помощью ИИ

Hacker News4h ago
3 мин чтения
📋

Ключевые факты

  • Разработчик успешно перенёс 100 000 строк кода с TypeScript на Rust за один месяц.
  • Миграция была выполнена с помощью ИИ-ассистента для программирования Claude Code.
  • Этот проект демонстрирует потенциал ИИ для ускорения крупномасштабных преобразований кодовой базы.
  • Достижение подчёркивает значительный прирост эффективности по сравнению с традиционными методами ручной миграции.
  • Процесс включал перевод сложного приложения из одной языковой парадигмы в другую.
  • Этот кейс-стади служит практическим примером растущей роли ИИ в разработке программного обеспечения.

Краткое резюме

Разработчик успешно завершил крупномасштабную миграцию кодовой базы, перенеся 100 000 строк кода с TypeScript на Rust всего за один месяц. Такая быстрая трансформация стала возможной благодаря стратегическому использованию Claude Code, передового ИИ-ассистента, разработанного для задач программирования.

Этот проект подчёркивает значительный сдвиг в подходе к крупномасштабному рефакторингу программного обеспечения. Используя ИИ, разработчик смог справиться со сложностями перевода языков со скоростью, которая была бы практически невозможна при ручном выполнении, что ознаменовало новый этап в ИИ-поддерживаемой разработке программного обеспечения.

Задача миграции

Задача конвертации 100-тысячной кодовой базы с одного языка программирования на другой традиционно является монументальным предприятием. TypeScript и Rust, хотя и являются мощными языками, имеют различные парадигмы и системы типов, что делает ручной перевод утомительным и подверженным ошибкам процессом. Этот конкретный проект включал существующее приложение значительного размера, построенное на TypeScript.

Перенос такого объёма кода требует не только глубокого понимания обоих языков, но и тщательного внимания к деталям для сохранения функциональности. Масштаб проекта обычно потребовал бы команды разработчиков, работающих в течение многих месяцев, если не лет, для завершения перехода вручную.

  • Ручная конвертация 100 000 строк кода чрезвычайно трудоёмка.
  • TypeScript и Rust имеют различные системы типов и модели памяти.
  • Обеспечение функционального паритета после миграции является критической задачей.
  • Традиционные методы часто приводят к задержкам проекта и увеличению затрат.

ИИ как катализатор

Разработчик обратился к Claude Code для ускорения процесса миграции. Этот инструмент ИИ использовался для интерпретации существующего кода на TypeScript и генерации соответствующего кода на Rust, обрабатывая основную часть работы по переводу. Способность ИИ понимать контекст и применять логику программирования позволяла ему эффективно обрабатывать тысячи строк кода.

Используя ИИ-ассистента, разработчик мог сосредоточиться на архитектуре высокого уровня и критическом обзоре, не увязая в синтаксисе и шаблонном коде ручного перевода. Этот совместный подход между человеческим контролем и выполнением ИИ оказался чрезвычайно эффективным, завершив весь перенос за удивительно короткий срок — один месяц.

Использование инструментов ИИ, таких как Claude Code, представляет собой сдвиг парадигмы в том, как разработчики подходят к крупномасштабным миграциям и задачам рефакторинга кода.

Ключевые технические выводы

Успешная миграция подчёркивает растущую сложность ИИ в разработке программного обеспечения. Инструменты, такие как Claude Code, — это не просто автодополнения; они способны понимать целые кодовые базы, распознавать шаблоны и переводить логику между различными языками программирования. Эта способность особенно ценна для проектов, связанных с унаследованным кодом или модернизацией языков.

Хотя ИИ занимался переводом, роль разработчика оставалась критически важной для валидации и обеспечения того, что сгенерированный код на Rust был идиоматичным и производительным. Гибридная модель сочетает скорость автоматизации с критическим мышлением опытного инженера, что приводит к высококачественному результату, удовлетворяющему как функциональным, так и производительным требованиям.

  • ИИ может анализировать и переводить сложные структуры кода.
  • Человеческий контроль обеспечивает качество и корректность кода.
  • Процесс демонстрирует эффективность в современных рабочих процессах разработки.
  • Такие инструменты могут снизить барьер для внедрения новых языков программирования.

Последствия для разработки

Это достижение имеет более широкие последствия для индустрии программного обеспечения. Оно предполагает, что крупномасштабные миграции кодовой базы могут стать более выполнимыми и менее пугающими, побуждая компании модернизировать свои технологические стеки. Возможность быстрого переноса кода между языками может помочь командам внедрять такие языки, как Rust, с его преимуществами в области безопасности памяти и производительности, без запретительных затрат на полную переписку вручную.

По мере развития ИИ-ассистентов для программирования их роль в жизненном цикле разработки, вероятно, расширится. Они могут стать стандартными инструментами для задач, варьирующихся от генерации и отладки кода до документации и рефакторинга. Этот кейс-стади служит убедительным примером того, как ИИ может дополнять человеческие возможности, приводя к более быстрым инновациям и более устойчивым системам программного обеспечения.

Взгляд в будущее

Успешный перенос 100 000 строк с TypeScript на Rust за месяц с помощью Claude Code является свидетельством потенциала ИИ в современной разработке программного обеспечения. Он демонстрирует, что при наличии правильных инструментов даже самые амбициозные проекты по миграции кода могут быть выполнены с замечательной эффективностью.

В будущем интеграция ИИ-ассистентов в рабочие процессы разработки, скорее всего, станет ещё более бесшовной. Этот случай не только демонстрирует техническую победу, но и указывает на будущее, в котором разработчики и ИИ будут тесно сотрудничать для создания и поддержки сложных систем программного обеспечения, расширяя границы возможного в этой области.

Часто задаваемые вопросы

Каков был масштаб проекта по миграции кода?

Проект включал перенос 100 000 строк кода с TypeScript на Rust. Это представляет собой значительную кодовую базу, которая обычно потребовала бы существенных вложений времени и ресурсов для ручной миграции.

Как миграция была завершена так быстро?

Разработчик использовал ИИ-ассистента по имени Claude Code для выполнения основной части работы по переводу. Это позволило разработчику завершить всю миграцию всего за один месяц — срок, которого было бы сложно добиться одними лишь ручными усилиями.

Что это означает для будущего разработки программного обеспечения?

Это достижение предполагает, что инструменты ИИ становятся всё более способными справляться со сложными задачами программирования. Оно указывает на будущее, где ИИ сможет значительно помогать в рефакторинге, модернизации и миграции кода, делая такие проекты более доступными и эффективными.

Каковы преимущества миграции с TypeScript на Rust?

Хотя в источнике это не подробно описано, миграция на Rust часто преследует цель получить гарантии безопасности памяти, высокую производительность и способность предотвращать распространённые ошибки на этапе компиляции, что может быть критически важно для системных приложений.

Continue scrolling for more

ИИ преобразует математические исследования и доказательства
Technology

ИИ преобразует математические исследования и доказательства

Искусственный интеллект перешел из статуса непостоянного обещания в реальность, преобразуя математические исследования. Модели машинного обучения теперь генерируют оригинальные теоремы.

Just now
4 min
410
Read Article
Europe must stop ‘dreaming’ about defence without US, Rutte warns
World_news

Europe must stop ‘dreaming’ about defence without US, Rutte warns

Nato chief says continent cannot afford to replace American security umbrella

28m
3 min
0
Read Article
Real_estate

Zoom's 'hidden gem' investment in Anthropic could be worth $2 billion to $4 billion, analysts say

Anthropic revealed that Zoom Ventures had invested in the AI startup in May 2023.

30m
3 min
0
Read Article
Billie Eilish Concert Doc Release Pushed to May; James Cameron Says ‘We’re Dialing in Cool, New 3D Tech’
Technology

Billie Eilish Concert Doc Release Pushed to May; James Cameron Says ‘We’re Dialing in Cool, New 3D Tech’

James Cameron revealed on Monday that the release of the Billie Eilish 3D concert documentary “Billie Eilish: Hit Me Hard and Soft,” which he co-directed with Eilish, has been pushed two more months to May 8 via Paramount. “We’re refining the cut; dialing in cool, new 3D tech; adding some special behind-the-scenes we know you’ll […]

42m
3 min
0
Read Article
Jensen Huang says it's 'ridiculous' to say Nvidia's $2 billion investment in CoreWeave is another circular deal
Technology

Jensen Huang says it's 'ridiculous' to say Nvidia's $2 billion investment in CoreWeave is another circular deal

Nvidia CEO Jensen Huang Markus Schreiber/AP Nvidia CEO Jensen Huang pushed back on criticism of the chipmaker's investment structures. Huang said its latest investment in CoreWeave was not a circular deal. Chipmakers' investments in leading tech companies, which are also customers, have raised worries about an AI bubble. Nvidia CEO Jensen Huang is done with the questions about circular financing. Huang called it "ridiculous" to suggest that Nvidia's latest deal, a $2 billion investment in CoreWeave, is the latest circular deal between AI chipmakers and tech companies, a trend that has sparked some concern among some investors. "These are generational companies — the investments that we make is confidence in them," Huang told Bloomberg News. "But it's a small percentage of the amount of money that they ultimately have to go raise, and so the idea that it is circular is — it's ridiculous." As part of the arrangement, Nvidia is expanding its previous investment in the cloud company by buying $2 billion worth of its shares. According to a joint statement, the money will assist CoreWeave's "procurement of land, power, and shell to build AI factories." The future AI factories will then be powered by Nvidia's chips. Huang portrayed the latest deal and past arrangements with the likes of OpenAI, Anthropic, and Elon Musk's xAI as just a small portion of what the companies need to raise to finance their massive AI expansion plans. For example, OpenAI is committed to spending roughly $1.4 trillion over the next eight years, largely on data centers. "Whatever we decide to invest is a small percentage, very small percentage of the overall amount of infrastructure, capital they're going to have to raise," Huang told CNBC in a separate interview. This is far from the first time Nvidia has bristled at concerns about its deals. In November, the world's largest company by market cap sent a letter to Wall Street analysts in response to investor Michael Burry of "The Big Short" fame, who has questioned whether Nvidia was on solid financial footing. "Nvidia's underlying business is economically sound, our reporting is complete and transparent, and we care about our reputation for integrity," the memo said. Burry has said he stands behind his analysis of the company, comparing it to one of Silicon Valley's giants before the Dotcom crash. "I am not claiming Nvidia is Enron," he wrote on his Substack. "It is clearly Cisco." Read the original article on Business Insider

44m
3 min
0
Read Article
watchOS 26.2.1 now available for Apple Watch, here’s what’s new
Technology

watchOS 26.2.1 now available for Apple Watch, here’s what’s new

Apple has just released watchOS 26.2.1, a new software update for Apple Watch users. Here’s what the update includes. more…

45m
3 min
0
Read Article
World_news

Google Books has been effectively killed by the last algorithm update

Article URL: https://old.reddit.com/r/google/comments/1qn1hk1/google_has_seemingly_entirely_removed_search/ Comments URL: https://news.ycombinator.com/item?id=46769201 Points: 3 # Comments: 0

47m
3 min
0
Read Article
How to generate AI images using ChatGPT
Technology

How to generate AI images using ChatGPT

Since March 2025, ChatGPT has been capable of generating images. Following a period where it briefly wasn't available to free users, you now don't even pay for one of OpenAI's subscriptions to use this feature. And while making images inside of ChatGPT is easy, there are some nuances worth explaining. For example, did you know you can ask ChatGPT to edit photos you've taken? It's more powerful than you might think. Here’s everything you need to know about generating AI images with ChatGPT. How to create images with ChatGPT using text prompts To begin making an image in ChatGPT, you can start by typing in the prompt bar. Igor Bonifacic for Engadget You can start generating images in ChatGPT simply by typing in the prompt bar what you want to see. There's no need to overthink things; as long as you have some version of "generate an image" followed by a description of your idea, ChatGPT will do the rest. Depending on the complexity of the prompt and whether you pay for ChatGPT, it may take a minute or two for the chatbot to complete your image request. Sometimes the process can take longer if OpenAI's servers are experiencing greater traffic than usual. At the end of last year, OpenAI updated the model powering image generation to make it faster, as well as better at rendering text and following instructions. At the same time, it added a dedicated "Images" section to ChatGPT's sidebar. Here you can see all the images you've made, alongside sample prompts and suggestions for styles to try out, making it a great place to start if you've never used an image generator before. How to create images with ChatGPT using existing photos You can also upload images to ChatGPT. Igor Bonifacic for Engadget In addition to generating images from text prompts, ChatGPT can modify existing photos or images you upload. This is my preferred way of making images with ChatGPT; I don't need to describe the composition, I can use an existing one to guide the chatbot. To use an existing image as a starting point for a new generation, follow these steps: Tap the "+" icon, located to the left of the prompt bar. Select Add photos & files. Select the image you want ChatGPT to edit. If uploading an image from your phone, you'll first need to grant ChatGPT access to your camera roll. Write a prompt describing the changes you want. If generating from the Images section, tap "Add photos" instead. Keep in mind any photos you upload to OpenAI's servers may be used by the company to train future models. You can opt out of allowing your data to be used for training by following these steps: Open the sidebar menu. On mobile, tap the two lines on the top left of the interface; on desktop, click instead on the OpenAI logo. Tap your name to access account settings. Tap Data controls. Toggle off Improve the model for everyone. How to edit the images ChatGPT generates ChatGPT gives you a few different ways to edit images. Igor Bonifacic for Engadget If you're unhappy with ChatGPT's output, you have two options. You can either prompt it to create an entirely new image, or edit parts of the picture it just generated. As always, the process for both involves simply typing what you want in the prompt bar. On mobile, OpenAI gives users a few different ways of accomplishing the same task. To generate an entirely new image: Tap the three dots icon below the image ChatGPT created. Select Retry. To edit part of an existing image generation: Tap the image ChatGPT created. Tap Select area. Use your finger to mask the section of the image you want ChatGPT to tweak. The slider on the left allows you to adjust the size of the masking brush. On desktop, masking is also available if you click on an image and then click on the paintbrush icon on the top right. Describe what you want ChatGPT to add, remove or replace through the prompt bar. ChatGPT can also blend one of your photos with an image it has generated. To do this: Tap an image ChatGPT created. Tap Blend in a photo. Upload the photo you wish Like all AI systems, ChatGPT is non-deterministic, meaning even if you prompt it in the same way multiple times, it won't generate the exact same response each time. Tips to create better images with ChatGPT The best advice I can offer is to be specific when prompting ChatGPT. The more detail you can provide when describing what you want from it, the better the results. And remember: ChatGPT can hallucinate — as you may have noticed from one of the example pictures I included above. In the image of the tortoiseshell cat, not only is the tortie not sitting on the window sill as instructed, it's sitting on a table that doesn't make much sense. So, most of all, be patient. Prompting an AI model is not exact science, and it can take a few tries before it creates the result you want. FAQs How do you access ChatGPT? ChatGPT is available on the web, desktop and mobile. To access it on your computer, open your preferred browser and navigate to chatgpt.com. OpenAI also offers dedicated Mac and Windows apps you can download from the company's website. On iOS and Android, you'll need to download the ChatGPT app from either the App Store or Google Play before you can start using the chatbot. Since ChatGPT runs on OpenAI's servers, as long as you can access the chatbot, you'll be able to use it to create images no matter the age of your phone or computer. Can ChatGPT generate images for free? Yes, ChatGPT can generate images for free, as long as you create an OpenAI account. However, there is a daily rate cap and GPT-5 will take longer to make a free image. Following March 27, 2025, OpenAI briefly limited free users to three image generations per day. The company has since relaxed that restriction, though it doesn't list a specific limit on its website. In my experience, you'll be able to generate about six to seven images every 24 hours. OpenAI offers three different subscription plans, each with their own set of image generation perks. ChatGPT Go, which costs $8 per month, offers "more image creation." ChatGPT Plus, which costs $20 per month, offers "expanded and faster image creation." ChatGPT Pro, which costs $200 per month, offers "unlimited and faster image creation." Note: ChatGPT Go will be included in OpenAI's forthcoming ads pilot, which will see the company display sponsored content alongside organic responses from ChatGPT. The company does not plan to display ads to Plus and Pro users. Can ChatGPT generate an existing photo? No. For copyright reasons, ChatGPT can't replicate photos or exact real world events. For example, when I asked it to recreate the photo of Zinedine Zidane's iconic 2006 World Cup headbutt, ChatGPT refused. "I can make an artistic reinterpretation inspired by the emotion or energy of that moment — for example, a stylized painting showing the tension and intensity of competition, without depicting real individuals," it told me. This article originally appeared on Engadget at https://www.engadget.com/ai/how-to-generate-ai-images-using-chatgpt-120000560.html?src=rss

48m
3 min
0
Read Article
World_news

House of Lords Votes to Ban UK Children from Using Internet VPNs

Article URL: https://www.ispreview.co.uk/index.php/2026/01/house-of-lords-votes-to-ban-uk-children-from-using-internet-vpns.html Comments URL: https://news.ycombinator.com/item?id=46769131 Points: 5 # Comments: 1

52m
3 min
0
Read Article
MCP unites Claude chat with apps like Slack, Figma, and Canva
Technology

MCP unites Claude chat with apps like Slack, Figma, and Canva

Anthropic's Claude got a bit livelier today thanks to a new extension to MCP, the open-source protocol that allows AI agents to easily access tools and data across the internet. Users will now be able to interact with apps directly inside the Claude chatbot, letting you draft and format Slack messages to colleagues and create presentations for clients in Canva without having to switch tabs. As of today, Anthropic said tools like Asana, Figma, Slack, and Canva will "open as interactive apps right inside of chat." While users could previously connect tools like Slack and Asana to the AI assistant, doing so meant getting text back. The company … Read the full story at The Verge.

53m
3 min
0
Read Article
🎉

You're all caught up!

Check back later for more stories

На главную