Hacker News with Generative AI: Code Generation

The intent paradox of AI generated code (bearblog.dev)
I think a lot about how machines can instruct themselves to do something. Now we call it with fancy names such as AI code generation or coding agent, sometimes we give it a name like Devin or similar (nothing against it honestly). In hindsight it's just a calculator "thinking" what it should calculate based off of something you said out loud and it starts to do the magic, funny right?
Hallucinations in code are the least dangerous form of LLM mistakes (simonwillison.net)
A surprisingly common complaint I see from developers who have tried using LLMs for code is that they encountered a hallucination—usually the LLM inventing a method or even a full software library that doesn’t exist—and it crashed their confidence in LLMs as a tool for writing code. How could anyone productively use these things if they invent methods that don’t exist?
Open-source alternative to v0, Lovable, bolt (cerebrium.ai)
Experience real-time code generation with AI-powered assistance. Write, preview, and deploy code instantly through natural language.
Did Semgrep Just Get a Lot More Interesting? (fly.io)
What interests me is this: it seems obvious that we’re going to do more and more “closed-loop” LLM agent code generation stuff.
Show HN: Transform your codebase into a single Markdown doc for feeding into AI (tesserato.web.app)
Continuing to open-source internal tools, I'm releasing CodeWeaver, a CLI to generate a single markdown file from a directory of source files. The idea is to facilitate sharing and feeding the codebase information to AI tools.
Copilot stops working on code that contains hardcoded banned words from GitHub (2023) (github.com/orgs)
Copilot purposely stops working on code that contains hardcoded banned words from Github, such as gender or sex.
I Use Cline for AI Engineering (addyo.substack.com)
The AI coding assistant landscape is saturated with tools that promise to revolutionize development workflows. As an engineer who has worked with complex systems for decades, I approach such claims with healthy skepticism. After extensively testing the major players (Cursor, WindSurf, GitHub Copilot, and others), I've found Cline - a free VSCode plugin - to be uniquely valuable for serious engineering work. Here's why, along with important caveats and trade-offs to consider.
What we learned copying all the best code assistants (val.town)
Since the beginning of Val Town, our users have been clamouring for the state-of-the-art LLM code generation experience.
Can LLMs write better code if you keep asking them to “write better code”? (minimaxir.com)
In November 2023, after OpenAI added the ability for ChatGPT to generate images from DALL-E 3 within the ChatGPT web interface, there was a short-lived meme where users gave the LLM a base image and kept asking the model to “make it more X”, where X can be anything.
We fine-tuned Llama and got 4.2x Sonnet 3.5 accuracy for code generation (finecodex.com)
Solving Advent of Code at compile time with Rust macros (bearblog.dev)
Producing good software is difficult. Writing tests, reasoning about unintended effects, tedious considerations about time vs memory trade-offs. The perfect program is one that never runs at all. No trade-offs, no bugs, no worries. But what if we go further, what if we could get our answer before the program even finishes compiling?
Vector math library codegen in Debug (aras-p.info)
This will be about how when in your C++ code you have a “vector math library”, and how the choices of code style in there affect non-optimized build performance.
A Comprehensive Analysis of Package Hallucinations by Code Generating LLMs (arxiv.org)
The reliance of popular programming languages such as Python and JavaScript on centralized package repositories and open-source software, combined with the emergence of code-generating Large Language Models (LLMs), has created a new type of threat to the software supply chain: package hallucinations.
Show HN: qrframe – generate beautiful qr codes with javascript code (github.com/zhengkyl)
code-based qr code generator
Show HN: Repogather – copy relevant files to clipboard for LLM coding workflows (github.com/gr-b)
repogather is a command-line tool that copies all relevant files (with their relative paths) in a repository to the clipboard. It is intended to be used in LLM code understanding or code generation workflows.
Sqlc: Compile SQL to type-safe code (sqlc.dev)
sqlc generates fully type-safe idiomatic code from SQL.
Achieving high Python performance with code generation (2022) (medium.com)
Vizdom: Diagrams as Code (vizdom.dev)
Amazon CEO: AI Code Transformation Saved Us 4,500 Years of Developer Work (slashdot.org)
Grok 2.0 mini beta is pretty decent at generating code better than Gemini (twitter.com)
Kiota: OpenAPI-based HTTP client code generator (github.com/microsoft)
Where Are Large Language Models for Code Generation on GitHub? (arxiv.org)
Prelude – a tiny CLI tool building context prompts from your code (github.com/aerugo)
Igneous Linearizer: semi-structured source code (domain-j.com)
LLM Prompts for Code Generation, Data Wrangling and More (github.com/abilzerian)
GPT-4o hit 54% accuracy on CodeContests with AlphaCodium, up from 48% for GPT-4T (github.com/Codium-ai)
Efficiently synthesizing lowest cost rewrite rules for instruction selection (arxiv.org)
NetBSD bans use of Copilot-generated code (osnews.com)
Show HN: We built the only AI-powered production-ready code generator (amplication.com)
I'm puzzled how anyone trusts ChatGPT for code (ycombinator.com)