frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Samsung will delete your health data if you don't let them use it to train AI

https://neow.in/cWsyMTV3
103•bundie•1h ago•25 comments

Telegram's t.me domain has been suspended

https://www.whois.com/whois/t.me
120•Tiberium•1h ago•65 comments

Apple's new SpeechAnalyzer API, benchmarked against Whisper and its predecessor

https://get-inscribe.com/blog/apple-speech-api-benchmark.html
352•get-inscribe•5h ago•159 comments

Building and Shipping Mac and iOS Apps Without Ever Opening Xcode

https://scottwillsey.com/building-and-shipping-mac-and-ios-apps-without-ever-opening-xcode/
140•speckx•3h ago•69 comments

The real prices of frontier models. Tokens * Price, right?

https://playcode.io/blog/real-price-of-frontier-models
104•ianberdin•3h ago•49 comments

Climate.gov was destroyed. Open data saved it

https://werd.io/climate-gov-was-destroyed-open-data-saved-it/
240•benwerd•1h ago•104 comments

SalesPatriot (YC W25) Is Hiring Full Stack Engineers (SF)

https://jobs.ashbyhq.com/SalesPatriot/df223727-5781-433e-bc75-2aa5bf8dc8d7
1•maciejSz•39m ago

Linux on the Sega 32X. Who needs hardware synchronization primitives anyway?

https://cakehonolulu.github.io/linux-on-32x/
59•cakehonolulu•3h ago•10 comments

Show HN: YouTube Guitar Tab Parser

https://github.com/marcelpanse/youtube-guitar-tab-parser
23•neogenix•1h ago•14 comments

The art and engineering of Sega CD Silpheed

https://fabiensanglard.net/silpheed/index.html
180•ibobev•6h ago•34 comments

Show HN: I implemented a neural network in SQL

https://github.com/xqlsystems/xarray-sql/blob/claude/xarray-sql-mnist-demo/benchmarks/nn.py
28•alxmrs•1h ago•5 comments

Thunderbird Desktop settings research: what we learned from your feedback

https://blog.thunderbird.net/2026/07/desktopsettings/
41•ano-ther•3h ago•34 comments

TFTP Honey Pot Results

https://bruceediger.com/posts/tftp-honeypot-results/
31•speckx•2h ago•10 comments

Ancient Roman Board Game

https://ludus-coriovalli.web.app/
61•nobody9999•4d ago•26 comments

Linux 0.11 rewritten in idiomatic Rust, boots in QEMU

https://github.com/Poseidon-fan/linux-0.11-rs
8•arto•1h ago•0 comments

The Origins of Heikki's Garden of Flowers

https://garden-of-flowers.heikkilotvonen.com/?essay
15•panic•2d ago•2 comments

A voxel Tokyo in real Japan time – ride the Yamanote line and study Japanese

https://jivx.com/densha
312•momentmaker•10h ago•58 comments

The 4-Bitter Lesson: Balancing Stability and Performance in NVFP4 RL

https://humansand.ai/blog/nvfp4-rl
7•Areibman•2d ago•0 comments

Show HN: Nobie – an Excel-compatible runtime for agents and humans

https://nobie.com
42•matthewgapp•3h ago•19 comments

LAPD lets contract with surveillance giant Flock expire

https://techcrunch.com/2026/07/13/lapd-lets-contract-with-surveillance-giant-flock-expire-citing-...
392•forks•6h ago•300 comments

Show HN: BillAI Bass, an AI-Powered Big Mouth Billy Bass Using Strands Agents

https://github.com/morganwilliscloud/billai-bass
35•mtw14•3h ago•15 comments

Logseq 2.0 Beta (DB version) is here

https://github.com/logseq/logseq/releases
83•karencarits•3h ago•54 comments

Show HN: DOM-docx – HTML to native, editable Word docs (MIT)

https://github.com/floodtide/dom-docx
126•fishbone•9h ago•30 comments

Show HN: Jacquard, a programming language for AI-written, human-reviewed code

https://github.com/jbwinters/jacquard-lang
8•jbwinters•5h ago•2 comments

Benchmarking 15 "E-Waste" GPUs with Modern Workloads

https://esologic.com/benchmarking-tesla-gpus/
86•eso_logic•7h ago•41 comments

Show HN: Sigwire – a live TUI switchboard for every signal on your Linux box

https://github.com/yeet-src/sigwire
7•zasc•1h ago•2 comments

Show HN: OpenClawMachines – Extending OpenClaw to the Enterprise

https://github.com/mathaix/OpenClawMachines
16•mathaix•3h ago•19 comments

Show HN: PlanWright – A control plane for AI coding agents

https://planwright.tools
7•dudemanAtl•1h ago•5 comments

Tune Code Before Your Garbage Collector

http://blog.vanillajava.blog/2026/06/why-you-should-tun-code-before-your.html
31•peter_lawrey•5d ago•22 comments

How sea stars build materials that can see

https://www.engineering.upenn.edu/stories/how-sea-stars-build-materials-that-can-see/
21•hhs•1d ago•3 comments
Open in hackernews

Tune Code Before Your Garbage Collector

http://blog.vanillajava.blog/2026/06/why-you-should-tun-code-before-your.html
30•peter_lawrey•5d ago

Comments

peter_lawrey•5d ago
In this post I look at a simple event to response latency benchmark, MarketDataSnapshot to NewOrderSingle at 50K/s for 30 minutes using JLBH to test Chronicle-FIX. The goal is to compare a system which is doing redundant work (in this case logging each message using SLF4J), compared with not logging (Chronicle-FIX records every message internally using Chronicle Queue) and how this changes the choice of Garbage Collector
hinkley•4h ago
It's like caching, in kind but not in type. Once you add it, people will stop trying to be parsimonious with resources and just reach for the cache every time. They'll just lean into it. In a hot minute you will discover you can't turn it off because people have lost their brains and the data flow of the app is through the cache and not through the call tree.

If you tune for allocation patterns that are in the code, then you are cementing those as continuing in perpetuity. Better to cut the fat first, so that you can tune for the necessary complexity instead of the accidental. That will be self-correcting because any new misuses will be taxed with higher performance regressions.

senderista•3h ago
I worked on Java code at AWS for a few years and nobody tried to optimize allocations. Then I changed jobs and started working on a Java MPP database and my first code review was brutal. You were expected to avoid allocations as much as possible (mostly by using the SoA pattern everywhere). At that scale no GC could save you from excessive allocations.
motoboi•2h ago
I believe the whole string vs stringbuffer that later was made redundant by compiler contributed to that vision.

People started dismissing allocation discipline as a thing from the past because "that thing was solved a lot ago and the compiler now is smart enough".

Well, for string, yes, but not for arbitrary objects.

cogman10•2h ago
The most surprising allocation pressure I constantly run into is primitive boxing.

The JVM does heroics to try and avoid it as much as possible, but when you end up with some primitive boxing in a hotspot the amount of GC pressure that creates can be unreal.

drob518•1h ago
Yep, and sometimes just a small code change can flip on boxing.
cogman10•1h ago
One of my least proud (most proud?) hacks when working with very large data sets is something like this

    Map<Integer, Integer> intCache = new HashMap<>();
    
    while (loading) {
      Integer feild1 = intCache.computeIfAbsent(getField1(), (i)->i);
    }
This is a terrible thing that shouldn't be as useful as it is to us... but it is really useful. We have a bunch of objects that can optionally have Integer values (hence a null is valid) but those int values are frequently the same.

This saves a bunch of memory and ultimately GC pressure as a result.

Valhalla can't come soon enough for us.

drob518•1h ago
I do something similar for Java Time local dates. Financial data in particular has lots of redundant date info and benefits from being memoized. Converting to epoch millis also works.
einpoklum•3h ago
Garbage collector?

To quote Bjarne Stroustrup:

> I don't like garbage. I don't like littering. My ideal is to eliminate the need for a garbage collector by not producing any garbage. That is now possible.

peterabbitcook•2h ago
Reading this gives me considerable pause - I can’t think of many classes within the codebase I work on that don’t have @Slf4j at the top…

Since there wasn’t a link to the source code in that post, can you help me understand this - for the SLF4J baseline is your logger impl a console appender, a file appender, or a network service like an OTel collector? Does any of that matter for GC context?

layer8•2h ago
All common logging backends create a LogEvent or similar object for each logging call, and logging calls also typically construct new strings, which usually means a new StringBuilder object, its internal array (multiple ones if it grows), the final array it is copied to, and the String object that wraps that array.

These are typically short-lived objects and therefore cheap. Nevertheless, continually creating many such objects increases GC pressure, in particular if the logging happens in code that doesn't otherwise create many objects.

well_ackshually•2h ago
> All common logging backends create a LogEvent or similar object for each logging call, and logging calls also typically construct new strings, which usually means a new StringBuilder object, its internal array (multiple ones if it grows), the final array it is copied to, and the String object that wraps that array.

Which then gets discarded because that was a Log.verbose and your minimum log level in production is WARN.

Which is why many libraries have moved towards making your log message returned by a lambda. One constant lambda allocation (so, not a lot, an invokedynamic is absolutely fuck all.) that allows you to straight up skip allocating a full string that most likely is interpolating things and attempting to reach for context present on other threads is strictly better in 99.9% of the cases. The GC pressure is kept minimal and most importantly, constant.

layer8•
actionfromafar•51m ago
If I squint, is this a special kind of heap compression?
cogman10•31m ago
Not really heap compression or special, it's just reusing a reference to an object already allocated on the heap.

Right now, if I do this

    LocalDate a = LocalDate.of(2020, 1, 1);
    LocalDate b = LocalDate.of(2020, 1, 1);
A and B reference 2 different object allocations on the heap even though they are the same date. a != b.

In Java, that can be pretty expensive even for an object as light as a LocalDate. By running the cache and doing

    var cache = new HashMap<LocalDate, LocalDate>();
    LocalDate a = cache.computeIfAbsent(LocalDate.of(2020, 1, 1), (i)->i);
    LocalDate b = cache.computeIfAbsent(LocalDate.of(2020, 1, 1), (i)->i);
Now you have the situation where `a == b` and you immediately end up dropping the object allocation for b on the next GC.

The technique works best when you have a lot of repeated objects which are immutable. It is also only really needed because Valhalla isn't here. Once "value types" become a thing, then the representation for `LocalDate` inside the JVM can become just the fields and not a reference. The JVM is also free to do the sort of de-duplication optimization all on it's own for larger objects.

spullara•1h ago
can't wait for Project Valhalla, going into preview shortly
1h ago
> Which then gets discarded because that was a Log.verbose and your minimum log level in production is WARN.

This isn't true for the LogEvent or equivalent object, which only gets created after the log level is tested to be applicable by the logger implementation.

For call-site object allocation, you can wrap the logging call into an if statement that checks for the corresponding log level. The lambda allocation isn't constant if it captures anything from the surrounding scope, which will generally be the case for logging calls. (Unless by "constant" you mean that it's a single allocation per execution.)

cogman10•1h ago
Cheap, not free, and even pretty simple to accidentally fool the GC on the lifetime of these objects.

Consider, for example, if you have a log message like this

    logger.info("Hello {}", myOldObject);
if "myOldObject" is large enough or contains references to large things or has just been around for a while, it may be a part of OldGen at this point. And if that's the case, the LogEvent objects will end up automatically promoted to OldGen. Meaning the only time those can be be claimed is in an expensive major collection. The end result is that these things will ultimately fill up old gen and trigger more of the expensive old gen collections.

That's why it can be faster in some circumstances to write the more wordy

    if (logger.isInfoEnabled()) {
      logger.info("Hello {}", myOldObject.toString());
    }
Nothing saves you, however, if your string being logged is too long. It can be autopromoted to old gen if you are trying to log a 10mb string.
hyperpape•28m ago
> And if that's the case, the LogEvent objects will end up automatically promoted to OldGen.

Why do you think this would happen? There's no mechanism that makes young gen objects that reference old gen objects (or are referenced by old gen objects) get promoted faster. You have to survive a certain number of collections.

cogman10•5m ago
Ah shoot, you're right this wouldn't be what I'm thinking.

I was thinking of "GC Nepotism" [1]. That's the case where an object in old gen pointing to an object in new gen will automatically promote that new gen object into old gen. This can be particularly problematic with graph structures.

[1] https://psy-lob-saw.blogspot.com/2016/03/gc-nepotism-and-lin...