Project ideas from Hacker News discussions.

Gleam doesn't compile to Erlang source anymore

📝 Discussion Summary (Click to expand)

1. Enthusiasm for Gleam and its community
Many commenters celebrated the language itself and the people behind it.
- “Congratulations to the team! I love Gleam and am genuinely having fun every time I write Gleam code.” – vortegne
- “Shout out to Giacomo's twitch streams… He takes time away from his focus to answer questions politely and without judgement.” – zachrip
- “Gleam is such a beautiful language. I wish I had the opportunity to use it more.” – MichaelNolan

2. The comma‑usage debate
A sizable sub‑thread focused on whether commas before conjunctions are required, with native and non‑native speakers weighing in.
- “The misuse of commas is distracting; at least it’s better than reading ai blogs.” – phcreery
- “Before the 'and', 'but', 'so', 'while', … English is following a somewhat reversed convention.” – Joker_vD
- “As a non-native English speaker I'm always so self conscious when using commas, it feels like I'm always using either too many or too few.” – pipe01
- “You're doing fine. English grammar pedants speak infrequently. Mostly due to the disinterest of the listener.” – steele

3. Technical discussion of Gleam’s compilation target
Several users delved into the details of Gleam emitting Erlang source, the Erlang Abstract Form, and transpilation considerations.
- “Erlang abstract form… is the AST representation used by the erlang compiler… it's really comfy when you need it!” – 0x69420
- “my opinion of gleam was already pretty low, but i did not expect to see post-1.0 compiler emitting text erlang source.” – nwalkr
- “Gleam is not ostensibly intended for building user interfaces.” – lpil (in response to a question about string interpolation)
- “We did not (and still don't) have an internal Erlang AST representation in the compiler. Previously we did have a Gleam AST -> printing algebra -> Erlang source pipeline…” – lpil

These three themes—community praise, grammar commentary, and low‑level compilation details—dominated the conversation.


🚀 Project Ideas

Generating project ideas…

Gleam String Interpolation Preprocessor (GSIP)

Summary

  • Adds lightweight string interpolation ${expr} to Gleam string literals, eliminating manual concatenation for UI‑heavy code.
  • Transforms interpolation at build time into efficient string.concat/string.build calls, preserving Gleam’s zero‑runtime‑cost philosophy.

Details

Key Value
Target Audience Gleam developers building web frontends, CLI tools, or any string‑intensive applications.
Core Feature Preprocessor that parses Gleam source, replaces ${expr} with appropriate Gleam concatenation, and outputs valid Gleam code.
Tech Stack Written in Gleam (or Rust) using the official Gleam parser; integrates via gleam build plugin or VS Code task.
Difficulty Medium
Monetization Hobby

Notes

  • HN commenters explicitly asked for string interpolation (“still no string interpolation in a language ostensibly intended for building user interfaces?”).
  • Provides a zero‑config, opt‑in solution that could inspire official language evolution discussions.

Gleam‑to‑Rust Transpiler (GleamRS)

Summary

  • Transpiles Gleam source to idiomatic Rust code, enabling native binaries, WASM, or embedded targets without BEAM overhead.
  • Maps Gleam’s standard library to Rust std/crates, preserving type safety and pattern‑matching ergonomics.

Details

Key Value
Target Audience Gleam developers needing high‑performance native executables, WASM modules, or low‑level system code.
Core Feature Transpilation pass that emits Rust files from Gleam AST, with optional --target wasm32-unknown-unknown.
Tech Stack Rust implementation using the gleam crate for parsing, syn/quote for Rust code generation.
Difficulty High
Monetization Hobby

Notes

  • User MichaelNolan remarked: “If it could compile (transpile) to a native target like rust or go, it would be truly perfect.”
  • Offers a concrete path to that desire, likely sparking enthusiastic debate about Gleam’s ecosystem expansion.

Gleam Source‑Level Debugger Integration (GleamDBG)

Summary

  • VS Code extension that launches the Erlang debugger (including WhatsApp’s variant) and maps breakpoints/watchpoints from Gleam source to the generated Erlang Abstract Form.
  • Enables stepping through Gleam code while viewing original source, with variable values translated back to Gleam types.

Details

Key Value
Target Audience Gleam developers who rely on Erlang/OTP tooling for debugging and profiling.
Core Feature Source‑level breakpoints, stack inspection, and variable rendering that reflect Gleam semantics.
Tech Stack TypeScript VS Code extension; calls Erlang’s debugger module via a small Erlang shim; uses Gleam compiler’s -S output for source maps.
Difficulty Medium
Monetization Hobby

Notes

  • __jonas wondered about integrating with the Whatsapp Erlang debugger; lpil noted it would be “very trivial.”
  • Directly addresses the debugging friction highlighted in the thread, promising smoother development cycles and fruitful tooling discussion.

Read Later