惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

量子位
罗磊的独立博客
博客园_首页
T
The Exploit Database - CXSecurity.com
博客园 - 聂微东
雷峰网
雷峰网
V
V2EX
博客园 - 司徒正美
J
Java Code Geeks
Hugging Face - Blog
Hugging Face - Blog
H
Heimdal Security Blog
Apple Machine Learning Research
Apple Machine Learning Research
Last Week in AI
Last Week in AI
K
Kaspersky official blog
爱范儿
爱范儿
T
Threatpost
博客园 - Franky
T
Tailwind CSS Blog
N
News and Events Feed by Topic
P
Privacy & Cybersecurity Law Blog
W
WeLiveSecurity
Google Online Security Blog
Google Online Security Blog
Know Your Adversary
Know Your Adversary
小众软件
小众软件
NISL@THU
NISL@THU
博客园 - 【当耐特】
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
IT之家
IT之家
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
Threat Research - Cisco Blogs
Security Latest
Security Latest
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
D
Darknet – Hacking Tools, Hacker News & Cyber Security
P
Palo Alto Networks Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
V
Vulnerabilities – Threatpost
N
News | PayPal Newsroom
C
Cyber Attacks, Cyber Crime and Cyber Security
AI
AI
P
Privacy International News Feed
V
Visual Studio Blog
S
Secure Thoughts
Schneier on Security
Schneier on Security
阮一峰的网络日志
阮一峰的网络日志
S
SegmentFault 最新的问题
人人都是产品经理
人人都是产品经理
博客园 - 叶小钗
C
Cybersecurity and Infrastructure Security Agency CISA
The Cloudflare Blog
Spread Privacy
Spread Privacy

Hacker News

Introducing Claude Opus 4.7 Qwen Studio The Future of Everything is Lies, I Guess: Where Do We Go From Here? GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis Bonsai 1-bit WebGPU - a Hugging Face Space by webml-community Moving a large-scale metrics pipeline from StatsD to OpenTelemetry / Prometheus GitHub - Nightmare-Eclipse/RedSun: The Red Sun vulnerability repository GitHub - SethPyle376/hiraeth: Local AWS emulator focused on fast integration testing, with SQS support, SQLite-backed state, and a debug-friendly web UI. GitHub - macOS26/Agent: Any AI, replaces Claude Code, Cursor, OpenClaw. Over 18 LLM providers (Claude, OpenAI, Gemini, Ollama, Zai, HF, Qwen) wired into a native Mac app that writes code, builds Xcode projects, bumps versions, manages git, automates Safari, use AppleScript, JS or Accessibility, extend Agent! w/ MCP Servers, run tasks from your iPhone via Messages. YouTube now lets you turn off Shorts I Made a Terminal Pager Burgers | マクドナルド公式 Commands — HackerNews CLI documentation ChatGPT for Excel PiCore - Raspberry Pi Port of Tiny Core Linux Live Nation illegally monopolized ticketing market, jury finds Google Broke Its Promise to Me. Now ICE Has My Data. Founding Engineer at Adaptional | Y Combinator CRISPR takes important step toward silencing Down syndrome’s extra chromosome GitHub - saffron-health/libretto: The AI toolkit for building reliable browser automations US v. Heppner (S.D.N.Y. 2026) no attorney-client privilege for AI chats [pdf] Retrofitting JIT Compilers into C Interpreters IPv6 – Google The Accursèd Alphabetical Clock Cybersecurity Looks Like Proof of Work Now Fragments: April 14 Cal.com Goes Closed Source: Why AI Security Is Forcing Our Decision | Cal.com - Scheduling Software for Online Bookings Laravel raised money and now injects ads directly into your agent When moving fast, talking is the first thing to break Too much Discussion of the XOR swap trick – Heather Cafe Introduction to Spherical Harmonics for Graphics Programmers The Grand Line Building a Z-Machine in the worst possible language High-Level Rust: Getting 80% of the Benefits with 20% of the Pain GitHub - duguyue100/midnight-captain: Inspired by Midnight Commander, tailored to my taste. How to build a `git diff` driver · Jamie Tanna | Software Engineer Center for Responsible, Decentralized Intelligence at Berkeley The Local Universe’s Expansion Rate Is Clearer Than Ever, but Still Doesn’t Add Up - A new synthesis of astronomical measurements confirms a persistent mismatch that could point to physics beyond current models The air throughout our homes is infused with microplastics. But there are things you can do to breathe less of them The disturbing white paper Red Hat is trying to erase from the internet – OSnews The Future of Everything is Lies, I Guess: Annoyances ‘Abhorrent’: the inside story of the Polymarket gamblers betting millions on war Productive procrastination — Max van IJsselmuiden maps, territory and LMs 447 Terabytes per Square Centimetre at Zero Retention Energy: Non-Volatile Memory at the Atomic Scale on Fluorographane Show HN: Pardonned.com – A searchable database of US Pardons 20 Years on AWS and Never Not My Job The Seasons are Wrong Artemis II crew splashes down near San Diego after historic moon mission We gave an AI a 3 year retail lease in SF and asked it to make a profit | Andon Labs How a dancer with ALS used brainwaves to perform live On filing the corners off my MacBooks Installing every* Firefox extension OpenClaw’s memory is unreliable, and you don’t know when it will break Steve Blank Nowhere Is Safe Chimpanzees in Uganda locked in vicious 'civil war', say researchers watgo - a WebAssembly Toolkit for Go linux/Documentation/process/coding-assistants.rst at master · torvalds/linux GitHub - callumlocke/json-formatter: Makes JSON easy to read. Founding Product Engineer at Bild AI | Y Combinator A compelling title that is cryptic enough to get you to take action on it GitHub - Keychron/Keychron-Keyboards-Hardware-Design: Industrial design files for Keychron keyboards and mice. 100+ models with CAD assets in STEP, DXF, DWG, and PDF. Source-available, with commercial use allowed for original compatible accessories within the license terms. [ANNOUNCE] WireGuardNT v0.11 and WireGuard for Windows v0.6 Released 1D-Chess Helium Is Hard to Replace Cooperative Vectors Introduction | Evolve Keeping a Postgres queue healthy — PlanetScale Our response to the Axios developer tool compromise Do Americans read print books, e-books or audiobooks more? The Zettelkasten Method in Obsidian: A Practical Setup Guide Artemis II Is Competency Porn and We Are Starving For It WeakC4 Flight Viz — Cockpit View A Mexican surveillance giant you’ve never heard of is now watching the U.S. border Surelock: Deadlock-Free Mutexes for Rust RISC-V 101 – what is it and what does it mean for Canonical? | Ubuntu The Problem That Built an Industry How Much Linear Memory Access Is Enough? | Solidean Investigating Split Locks on x86-64 Simplest hash functions Sybilproof reputation mechanisms (2005) [pdf] What is a property? How Complex is my Code? Static code analysis in Kotlin — tools overview Toffoli gates are all you need PGLite evangelism dcmake: a new CMake debugger UI Clojure on Fennel part one: Persistent Data Structures Fragments: April 2 Python Release Python install manager 26.1 The Life and Death of the Book Review - Liberties Introducing Database Traffic Control — PlanetScale Bitcoin miners are losing $19,000 on every BTC produced as difficulty drops 7.8% God sleeps in the minerals Building slogbox Apple Silicon and Virtual Machines: Beating the 2 VM Limit Who was “Not Even Wrong” first? Pokemon Evolution Vs Darwinian Evolution The APL Programming Language Source Code
Single file Gleam BEAM programs with escript | Gleam programming language
02 June, 2026 by Louis Pilfold · 2026-06-03 · via Hacker News

Gleam is a type safe and scalable language for the Erlang virtual machine and JavaScript runtimes. Today Gleam v1.17.0 has been published.

Gleam Gathering

But first: the first videos from the first ever all-Gleam conference have been released! You can view them on the Gleam Gathering YouTube account. The event was a roaring success and loads of fun. Stay tuned for news of the next one in 2027!

Right, back to the release coverage.

BEAM escripts

When running on the Erlang virtual machine Gleam code is compiled to a series of .beam files, each of which contains the bytecode for a single Gleam module. This works fine for programs distributed or installed using package managers, containers, or other such systems, but having many files to share is a little inconvenient for sharing small command-line programs.

In the JavaScript world this problem is solved using a "bundler", a program that takes many JavaScript modules and combines them into a single file. This single file can be copied to and run on any computer that has a JavaScript runtime installed (such as NodeJS, Deno, or Bun). Erlang has a similar solution: escripts. Much like a JavaScript bundle, an escript is a single file that contains all the modules of a program in the form of pre-compiled bytecode, and it can be run on any computer that has Erlang installed.

The Erlang build tool has a convenient command for creating an escript, but for Gleam programmers the escript creation process has not been as straightforward. This release brings the gleam export escript command, which will compile the project, verify it has a valid main function, and build the escript file from the compiled bytecode.

louis ~/src/my_project $ gleam export escript
  Compiling gleam_stdlib
  Compiling my_project
   Compiled in 0.48s

Your escript has been generated to /home/louis/src/my_project/my_project.

louis ~/src/my_project $ ./my_project
Hello from my_project!

Highlight references

Gleam's language server provides IDE functionality for all editors that implement the language server protocol. This release adds support for the textDocument/documentHighlight feature, highlighting all references to a selected variable.

For example, in this code triggering it with the cursor over any instance of vec will result in these highlights:

fn to_cartesian(vec) {
//              ^^^
  let x = vec.rho * cos(vec.theta)
  //      ^^^           ^^^
  let y = vec.rho * sin(vec.theta)
  //      ^^^           ^^^
  #(x, y)
}

Thank you Gavin Morrow for this addition!

Constant todo expressions

Gleam's todo keyword is a placeholder expression that programmers can use when they have not-yet-finished code they wish to type-check or run. At compile time it outputs a warning to say that the code is incomplete, and if the code path with the todo expression is run then it will panic, exiting the program.

todo can now also be used in constant expressions. Since constant expressions are evaluated at compile time, when todo is used in a constant the program can no longer be run, but it can still be type checked and analysed.

This has also enabled us to upgrade the "Fill labels" code action so that it works with constants too. When run it fills in the missing labelled arguments from a record constructor. For example:

pub type Pokemon {
  Pokemon(number: Int, name: String, hp: Int)
}

pub const cleffa = Pokemon(number: 173)

In this code snippet we haven't specified the name and hp fields, that's an error! Triggering the "Fill labels" code action will result in the following:

pub const cleffa = Pokemon(number: 173, name: todo, hp: todo)

Thank you Giacomo Cavalieri!

Record update hovering

Hovering in your editor is a great way to gleam more information, with the language server showing the types, documentation, and other details of whatever is being hovered over.

Gleam's record update syntax is used to create a new record from an existing one, but with some fields updated with new values. When hovering over one of these the language server will now also show the remaining fields that have not been given new values, saving you from navigating to the definition to see what others you could set new values for.

pub type Person {
  Person(name: String, age: Int)
}

pub fn happy_birthday_mom() {
  let mom = Person(name: "Antonella", age: 60)
  Person(..mom, age: 61)
  //     ^^^^^ Hovering this will show:
  //           Unchanged fields:
  //           - name
}

Thank you Giacomo Cavalieri!

Unknown value import suggestions

In Gleam functions from other modules are almost always used in a qualified fashion, written as dict.fold rather than just fold. This is done so it is clearer to the reader where the function is defined and what it does, and to prevent redundant suffixes being added to function names to indicate what type they work with.

Sometimes the programmer may forget to write the module qualifier, resulting in a compile error due to there being no value with that name in scope. When this happens the compiler will now search in the imported modules for an appropriate value with that name, and suggest it as a position correction.

For example, for this invalid program:

import gleam/io

pub fn main() -> Nil {
  println("Hello, World!")
}

The compiler will display this error message:

error: Unknown variable
  ┌─ /path/to/project/src/project.gleam:4:3

4 │   println("Hello, World!")
   ^^^^^^^

The name `println` is not in scope here.
Did you mean one of these:

    - io.println

Thank you raphrous!

Context aware type printing in warnings

Up until now when the name of a type is displayed in a warning it has been displayed using its canonical name, but this may not be how the programmer has referred to the type in the code. A type could be referred to in a qualified way such as accounting.Invoice, or the programmer could have aliased the type to a new name to make it easier to understand in the context of that code.

Types in warnings are now correctly qualified or aliased when displayed in warnings. For example, this code:

import user as visitor

pub fn main() {
  user.to_string(todo)
  |> io.println
}

Will produce the following warning:

warning: Todo found
  ┌─ /src/warning/wrn.gleam:4:19

4 │     user.to_string(todo)
                    ^^^^ This code is incomplete

This code will crash if it is run. Be sure to finish it before
running your program.

Hint: I think its type is `visitor.User`.

Notice how the type hint is correctly qualified for the module the warning is raised in.

Thank you Giacomo Cavalieri!

JavaScript pattern matching optimisations

Gleam's case expression pattern matching may look like a linear search from the first to the last clause, but it compiles to an efficient decision tree that takes a "divide and conquer" approach to finding the matching clause.

Daniele Scaratti and Gavin Morrow have worked on further optimising the code generated for pattern matching when compiling to JavaScript, detecting and removing some redundant checks when working with the length of bit arrays, and making the code for assignments more compact. Thank you both!

Quiet development

When running the Gleam build tool it will print messages that show what it is doing.

louis ~/src/my_project $ gleam dev
  Compiling gleam_stdlib
  Compiling my_project
   Compiled in 0.48s
    Running my_project_dev.main
Hello, from my_project_dev!

The --no-print-progress flag can be used to disable this information, and with the release it is now accepted by the gleam dev command, which runs code in development mode.

louis ~/src/my_project $ gleam dev --no-print-progress
Hello, from my_project_dev!

Thank you Giacomo Cavalieri!

Outdated dependencies count

The gleam deps outdated command is used to see which dependencies of a package have newer versions that could be adopted. With this release it now includes a summary showing how many packages have newer versions available. For example:

louis ~/src/my_project $ gleam deps outdated
1 of 12 packages have newer versions available.

Package       Current  Latest
-------       -------  ------
gleam_stdlib  0.70.0   0.71.0

It is also helpful when no packages are outdated, as before some people were confused by the lack of anything being printed and were unsure if they had any outdated dependencies or not.

louis ~/src/my_project $ gleam deps outdated
0 of 12 packages have newer versions available.

Thank you Daniele Scaratti!

Better git repository detection

The gleam publish command now has better Git repository detection in monorepos, correctly identifying if the package is in a git repository even if the Gleam package being published is not located at the root of the repository.

Thank you Andrey Kozhev!

Further fault tolerance

Gleam's compiler implements fault tolerant compilation, enabling it to analyse and infer information about code even when it is in an invalid state. This is useful as it means the language server is always able to provide useful help to the programmer.

Giacomo Cavalieri has improved the fault tolerance for errors in the list-prepend syntax and the record update syntax. Thank you!

Remove redundant record update code action

The language server now has a code action to remove a redundant record update. For example:

pub type User {
  User(name: String, likes: List(String))
}

pub fn main() {
  let lucy = User(name: "Lucy", likes: ["Gleam", "Ice Cream"])
  let jak = User(..lucy, name: "Jak", likes: ["Gleam", "Dogs"])
  //             ^^^^^^ This record update is not needed!
}

This record update is not actually needed and will raise a warning; all fields are already specified. Triggering the code action anywhere on the expression will remove the unnecessary update:

pub type User {
  User(name: String, likes: List(String))
}

pub fn main() {
  let lucy = User(name: "Lucy", likes: ["Gleam", "Ice Cream"])
  let jak = User(name: "Jak", likes: ["Gleam", "Dogs"])
}

Thank you Giacomo Cavalieri!

Correct operator in guard expression code action

Gleam doesn't have overloading for its operators, so each one works with a specific type. This is beneficial as it removes ambiguity and helps the compiler reliably infer the types of all the values in the program without requiring additional annotations. Other languages approach this problem using sub-typing, but Gleam doesn't have sub-typing, so it uses unambiguous syntax instead.

Sometimes programmers new to Gleam can mix up operators, such as trying to use + to concatenate strings instead of Gleam's <>. When this happens Gleam will suggest the correct operator to the programmer and provide a language server auto-fix action to correct it. This is now also supported for guard expressions, so it can be triggered on the erroneous + in this code:

pub fn categorise() {
  case pokemon {
    Pokemon(name:, ..) if name == "rai" + "chu" -> todo
    _ -> todo
  }
}

Thank you Giacomo Cavalieri!

Pattern match on discarded value code action

Gleam implements exhaustiveness checking, so if a program fails to cover all the possible edge cases with its flow control a helpful error will be raised during compilation, showing the programmer what is missing.

The information that the compiler collects from the code for this feature also enables it to provide some very convenient time-saving language server code actions, such as "add missing patterns" and "pattern match on value". The latest of these is an action to expand a discard pattern in a case expression, replacing it with clauses to match what it was discarding.

pub fn list_names(x: Result(List(String), Nil)) {
  case x {
    Error(Nil) -> io.println("no names")
    Ok(_) -> todo
    // ^ Triggering the code action here
  }
}

Here the _ discard pattern is being used to match on any list. Triggering the code action on that pattern expands that clause to the 2 clauses with the patterns most commonly used with lists.

pub fn list_names(x: Result(List(String), Nil)) {
  case x {
    Error(Nil) -> io.println("no names")
    Ok([]) -> todo
    Ok([first, ..rest]) -> todo
  }
}

Thank you Giacomo Cavalieri!

Create unknown module code action

There are two types of programmers in this world: top-down, and bottom-up. A top-down programmer starts with the biggest picture and breaks it down into progressively smaller pieces, recursively implementing them until the lowest level is reached. A bottom-up programmer starts by making the smallest building blocks and composing them until they have a full working system.

This release brings a new code action that may be especially appreciated by top-down programmers: create module. This action is available any time that a module that does not exist is imported, and when run will create the missing module in the programmer's package.

For example, if import wobble/woo is added to src/wiggle.gleam, then a code action to create src/wobble/woo.gleam will be presented when triggered over import wobble/woo.

Thank you Cory Forsstrom!

Security fixes

Security researchers Abdelrahman Ahmed Aboelkasem, Aly, and evipepota, found some configuration validation related vulnerabilities in the Gleam build tool. Thankfully they are not too scary, and they have now been fixed. For details see CVE-2026-43965, CVE-2026-32685, and CVE-2026-42795.

The Erlang Ecosystem Foundation security team has been invaluable for their work securing the whole Erlang ecosystem, especially now that AI-based vulnerability detection tools become more effective. If you or your company is able, please offer them your support.

Thank you to all the researchers and remediators!

And more!

And a huge thank you to the bug fixers and experience polishers:

Andrey Kozhev, apsoras, Charlie Tonneslan, daniellionel01, Eyup Can Akman, Gavin Morrow, Giacomo Cavalieri, John Downey, Logan Bresnahan, Sahil Upasane, and Surya Rose.

For full details of the many fixes and improvements they've implemented, see the changelog.

Support Gleam

Gleam is not from big-tech and has not taken any VC funding. We rely entirely on the community for our livelihoods.

We have made great progress towards our goal of being able to appropriately pay the core team members, but we still have further to go. Please consider supporting the project or core team members Giacomo Cavalieri and Surya Rose on GitHub Sponsors.

GitHub Sponsors

Thank you to all our sponsors and contributors! And special thanks to our top sponsor: