News for hackers. Stuff that matters.

jamii

Re:AI in Linux on Wednesday July 29, 2026 @03:00PM (#49101571)
> The AI built-out is by far the fastest growing energy consumer in the world, and they’re being built with fossil fuels, or drawing green energy demand away from replacing the fossil fuels depended on by other industries.

This paragraph links to the IEA report which does indeed call datacenters the fastest growing energy consumer, but also says:

> Despite rapid growth, data centres remain a relatively small part of the overall power system, rising from about 1% of global electricity generation today to 3% in 2030, accounting for less than 1% of total global CO2 emissions.

For scale, beef production is about 9% of total greenhouse gas emission.

Re:Borrow-checking without type-checking on Thursday April 23, 2026 @12:21PM (#47877645)
> It seems like either one evaluates the contents of the `box`, and would only make a difference if you tried to use `x` afterwards?

More or less. x^ moves the whole box whereas x* copies the contents of the box.

> Awkwardly, it also hasn't been assigned so I'm not sure the box is accessible anymore?

Yes, if you move something and don't assign it then it gets dropped, same as rust.

Re:Borrow-checking without type-checking on Thursday April 23, 2026 @01:23AM (#47872498)
> The goal is that most of your code can have the assurances of static typing, but you can still opt in to dynamically-typed glue code to handle repls, live code reloading, runtime code generation, malleable software etc.
Re:Show HN: Tiny VM sandbox in C with apps in Rust, C and Zig on Saturday December 13, 2025 @04:14PM (#46258136)
[delayed]
Re:Is Zig's New Writer Unsafe? on Saturday September 20, 2025 @06:43PM (#45318264)
My bad :)
Re:Is Zig's New Writer Unsafe? on Saturday September 20, 2025 @05:01PM (#45317491)
EDIT I totally missed the context
Re:WASM 3.0 Completed on Wednesday September 17, 2025 @05:57PM (#45281864)
I've tried using binaryen, and I've also tried emitting raw wasm by hand, and the latter was far easier. It only took ~200 lines of wasm-specific code.
Re:SQL Needed Structure on Saturday September 06, 2025 @04:20AM (#45147545)
Yeah, json is annoying because of the limited types, but postgres arrays/rows are annoying because of the lack of sum/union types (if your UI has a heterogenous list of elements).

The OLAP world has much nicer type systems eg https://duckdb.org/docs/stable/sql/data_types/union.html.

Re:Evidence that AI is destroying jobs for young people on Thursday September 04, 2025 @12:34AM (#45123617)
One of the dynamics is that people get older so they move into different buckets.

We can make the model way simpler to make it clearer. Say in 2020 we hired 1000 20-24yo, 1000 25-29yo etc and then we didn't hire anyone since then. That was five years ago, so now we have 0 20-24yo, 1000 25-29yo, 1000 30-34yo etc and 1000 retirees who don't show up in the graph.

Each individual year we hired the exact same number of people in each age bracket, and yet we still end up with fewer young people total whenever hiring goes down, because all the people that got hired during the big hiring spike are now older.

Re:Evidence that AI is destroying jobs for young people on Wednesday September 03, 2025 @09:20PM (#45122357)
I made a stupid simple model where hiring in all age brackets rose slowly until 2021 and then fell slowly. That produces very similar looking graphs, because the many engineers that were hired at the peak move up the demographic curve over time. Normalizing the graph to 2022 levels, as the paper seems to do, hides the fact that the actual hiring ratios didn't change at all.

https://docs.google.com/spreadsheets/d/1z0l0rNebCTVWLk77_7HA...

Re:Go Allocation Probe on Tuesday July 22, 2025 @05:03PM (#44652972)
The ... is the useful part. We actually want that string, so we can't avoid allocating it.

But the &str at the end is an additional heap allocation and causes an additional pointer hop when using the string. The only reason the function returns a pointer to a string in the first place is so that the nil check at the beginning can return nil. The calling code always checks if the result is nil and then immediately dereferences the string pointer. A better interface would be to panic if the argument is nil, or if that's too scary then:

    func (thing *Thing) String() (string, bool) {
        if thing == nil {
            return "", false
        }
        str := ...
        return str, true
    }
Re:Store Tags After Payloads on Monday July 14, 2025 @02:28AM (#44557048)
I'm curious if any languages other than swift do this.
I don't think Austral uses second-class references. Even the page you linked says:

> But is it worth it? Again, the tradeoff is expressivity vs. simplicity... Austral’s linear types and borrowing is already so simple. Austral’s equivalent of a borrow checker is ~700 lines of OCaml. The only downside of Austral is right now you have to write the lifetimes of the references you pass to functions, but I will probably implement lifetime (region) elision.

Re:The program is the database is the interface on Saturday March 08, 2025 @03:42PM (#43303325)
> it solves the actual problem perfectly

The whole post was about how that doesn't solve the problem perfectly - there is no way to interactively edit the output.

> by embracing LISP principles directly

This could just as easily have been javascript+json or erlang+bert. There's no lisp magic. The core idea in the post was just finding a way for code to edit it's own constants so that I don't need a separate datastore.

Eventually I couldn't get this working the way I wanted with clojure and I had to write a simple language from scratch to embed provenance in values - https://news.ycombinator.com/item?id=43303314.

Re:The program is the database is the interface on Saturday March 08, 2025 @03:39PM (#43303314)
This is an old prototype. I ended up making a language for it from scratch so that I could attach provenance metadata to values, making them directly editable even when far removed from their original source.

https://www.scattered-thoughts.net/log/0027#preimp

https://x.com/sc13ts/status/1564759255198351360/video/1

I never wrote up most of that work. I still like the ideas though.

Also if I had ever finished editing this I wouldn't have buried the lede quite so much.

Re:HYTRADBOI 2025 post-mortem on Tuesday March 04, 2025 @04:16PM (#43259877)
Worth mentioning that all the talks are published at https://www.hytradboi.com/2025/#program.
Re:HYTRADBOI 2025 Conference Postmortem on Tuesday March 04, 2025 @01:43AM (#43251099)
Worth mentioning that all the talks are published at https://www.hytradboi.com/2025/#program.
Re:Show HN: Hytradboi DB/PL conference starts tomorrow on Thursday February 27, 2025 @03:47PM (#43198342)
Here's the program (https://www.hytradboi.com/2025/#program):

0900-1000: Compilers

  "Database query compilation: our journey" by Thomas Neumann & Viktor Leis

  "A YJIT interview" by Maxime Chevalier-Boisvert

  "A quick ramp-up on ramping up quickly" by Iain Ireland

  "Can we democratize JIT compilers?" by Haoran Xu

  "Safe and productive performance with user-schedulable languages" by Jonathan Ragan-Kelley
1000-1100: Understanding programs

  "How debuggers work" by Sy Brand

  "Debugging compiler-optimized code: how it works and doesn't" by Stephen Kell

  "Side-Eye: ask your programs anything" by Andrei Matei

  "Let's run a million benchmarks" by Yao Yue

  "Rocket science of simulation testing!" by Alex / matklad
1100-1200: Wild ideas

  "Back to modularity" by Daniel Jackson

  "DB usability: as if" by Jonathan Edwards

  "Twizzler and far out memory sharing: precise abstractions" by Daniel Bittman

  "Programming without pointers" by Andrew Kelley

  "Throwing it all away - how extreme rewriting changed the way I build databases" by Tyler Neely
1200-1230: Programmers are people

  "A case for feminism in programming language design" by Felienne Hermans

  "Malloy, mic drop, peace!" by Michael Toy
1230-1300: Lightning talk buffet

  "Learning about the odd bits of SQL by reading the PostgreSQL docs" by Chris Zetter

  "Hacking Observable notebooks from within" by Tom Larkworthy

  "Zero copy data structures" by Evan Chan

  "Reliable serverless needs distributed transactions" by Stu Hood

  "Pangeo is a database" by Alexander Merose

  "Rubbing a database on a language server" by Philip Zeyliger

  "Language agnostic simulation testing on a budget" by Stevan A

  "Shapeshifter: using LLMs inside a database for schema flexibility" by David Nachman

  "Why S3's conditional writes made people excited" by Miikka Koskinen

  "pghttp: backend-free, lowest latency web apps" by Damir Simunic
1300-1400: Query languages

  "Pipe syntax in SQL; it's time" by Jeff Shute

  "PRQL: a modern, pipelined SQL replacement" by Tobias Brandt

  "AquaLang - a streaming dataflow programming language" by Klas Segeljakt

  "A polymorphic data model for SQL using algebraic types" by Steve McCanne
1400-1430: Databases

  "Use of time in distributed databases - don't fall behind the times" by Murat Demirbas

  "Enough with all the Raft" by Alex Miller

  "Database ideas in Convex" by Thomas Ballinger

  "Serverless primitives for the shared log architecture" by Stephen Balogh

  "Good thing we're not writing a database" by Peter van Hardenberg
1430-1500: Wasm

  "Thinking in Wit" by Dan Gohman

  "Bringing the WebAssembly standard up to speed with SpecTec" by Dongjun Youn

Older »