frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Getting AI to write good SQL

https://cloud.google.com/blog/products/databases/techniques-for-improving-text-to-sql
252•richards•8h ago•122 comments

Wow@Home – Network of Amateur Radio Telescopes

https://phl.upr.edu/wow/outreach
56•visviva•3h ago•1 comments

Show HN: Fahmatrix – A Lightweight, Pandas-Like DataFrame Library for Java

https://github.com/moustafa-nasr/fahmatrix
11•mousomashakel•1h ago•2 comments

XTool – Cross-platform Xcode replacement

https://github.com/xtool-org/xtool
50•TheWiggles•3h ago•15 comments

A Linux kernel developer plays with Home Assistant: general impressions

https://lwn.net/SubscriberLink/1017720/7155ecb9602e9ef2/
29•pabs3•2h ago•3 comments

Thoughts on thinking

https://dcurt.is/thinking
365•bradgessler•10h ago•238 comments

Show HN: KVSplit – Run 2-3x longer contexts on Apple Silicon

https://github.com/dipampaul17/KVSplit
223•dipampaul17•9h ago•34 comments

A Research Preview of Codex

https://openai.com/index/introducing-codex/
402•meetpateltech•14h ago•323 comments

Show HN: Merliot – plugging physical devices into LLMs

https://github.com/merliot/hub
29•sfeldma•4h ago•6 comments

Rustls Server-Side Performance

https://www.memorysafety.org/blog/rustls-server-perf/
79•jaas•3d ago•11 comments

MIT asks arXiv to withdraw preprint of paper on AI and scientific discovery

https://economics.mit.edu/news/assuring-accurate-research-record
276•carabiner•14h ago•147 comments

How can traditional British TV survive the US streaming giants

https://www.bbc.co.uk/news/articles/cx2enydkew3o
8•asplake•3d ago•5 comments

ClojureScript 1.12.42

https://clojurescript.org/news/2025-05-16-release
119•Borkdude•9h ago•20 comments

I'm Peter Roberts, immigration attorney, who does work for YC and startups. AMA

198•proberts•14h ago•362 comments

MCP: An in-depth introduction

https://www.speakeasy.com/mcp/mcp-tutorial
44•ritzaco•3d ago•15 comments

Show HN: Visual flow-based programming for Erlang, inspired by Node-RED

https://github.com/gorenje/erlang-red
210•Towaway69•14h ago•91 comments

Coding agent in 94 lines of Ruby

https://radanskoric.com/articles/coding-agent-in-ruby
77•radanskoric•2d ago•24 comments

X X^t can be faster

https://arxiv.org/abs/2505.09814
170•robinhouston•13h ago•51 comments

New high-quality hash measures 71GB/s on M4

https://github.com/Nicoshev/rapidhash
22•nicoshev11•2d ago•4 comments

WebGL Gray-Scott Explorer (2012)

http://www.mrob.com/pub/comp/xmorphia/ogl/index.html
18•joebig•4h ago•2 comments

The Joys of Discovering the Roman Underground

https://www.smithsonianmag.com/travel/the-joys-of-discovering-the-roman-underground-from-the-colosseum-to-whats-beneath-the-trevi-foundation-180986626/
6•ulrischa•1d ago•0 comments

Will AI systems perform poorly due to AI-generated material in training data?

https://cacm.acm.org/news/the-collapse-of-gpt/
77•pseudolus•6h ago•80 comments

The first year of free-threaded Python

https://labs.quansight.org/blog/free-threaded-one-year-recap
256•rbanffy•20h ago•253 comments

They Were Identical 'Twinnies' Who Charmed Orwell, Camus and More

https://www.nytimes.com/2025/05/04/books/review/the-dazzling-paget-sisters-ariane-bankes.html
22•lermontov•6h ago•5 comments

Behind Silicon Valley and the GOP’s campaign to ban state AI laws

https://www.bloodinthemachine.com/p/de-democratizing-ai
39•spenvo•2h ago•11 comments

Java at 30: Interview with James Gosling

https://thenewstack.io/java-at-30-the-genius-behind-the-code-that-changed-tech/
176•chhum•16h ago•260 comments

Show HN: Solidis – Tiny TS Redis client, no deps, for serverless

https://github.com/vcms-io/solidis
43•jayl-e-e•8h ago•4 comments

The Magic Hours: The Films and Hidden Life of Terrence Malick

https://www.lrb.co.uk/the-paper/v47/n09/david-thomson/cool-tricking
56•mitchbob•11h ago•31 comments

Foundry (YC F24) Is Hiring – Founding Engineer (ML × SWE)

https://www.ycombinator.com/companies/foundry/jobs/uwi8b6I-founding-engineer-ml-x-swe
1•lakabimanil•12h ago

A Linux kernel developer plays with Home Assistant: case studies

https://lwn.net/SubscriberLink/1017945/93d12d28178b372e/
23•pabs3•4h ago•14 comments
Open in hackernews

Coding agent in 94 lines of Ruby

https://radanskoric.com/articles/coding-agent-in-ruby
77•radanskoric•2d ago

Comments

rbitar•6h ago
RubyLLM has been a joy to work with so nice to see it’s being used here. This project is also great and will make it easier to build an agent that can fetch data outside of the codebase for context and/or experiment with different system prompts. I’ve been a personal fan of claude code but this will be fun to work with
RangerScience•6h ago
This is very cool, somewhat inspiring, and (personally) very informative: I didn't actually know what "agentic" AI use was, but this did an excellent job (incidentally!) explaining it.

Might poke around...

What makes something a good potential tool, if the shell command can (technically) can do anything - like running tests?

(or it is just the things requiring user permission vs not?)

tough•5h ago
> What makes something a good potential tool, if the shell command can (technically) can do anything - like running tests?

Think of it as -semantic- wrappers so the LLM can -decide- what action to take at any given moment given its context, the user prompt, and available tools names and descriptions.

creating wrappers for the most used basic tools even if they all pipe to terminal unix commands can be useful.

also giving it speicif knowledge base it can consult on demand like a wiki of its own stack etc

notpushkin•4h ago
Also it’s safer than just giving unrestricted shell access to an LLM.
fullstackwife•4h ago
This reminds me about PHP hello world programs which would take a string from GET, use it as a path, read a file from this path, and return the content in the response. You could make a website while not using any knowledge about websites.

Agents are the new PHP scripts!

behnamoh•4h ago
> it's only 400 lines of Ruby

also the article:

> it uses RubyLLM

(which itself is a lot more code added to 400 lines claimed by the author).

> Ruby leads to programmer happiness...

Am I the only one who finds Ruby code cryptic and less clear than JS, Python, and Rust?

As a person who's dabbled a bit in Rust and Ruby, I'm surprised people find Ruby intuitive and simple. For example:

> def execute(path:)

why the "incomplete" colon?

> module Tools

> class ListFiles < RubyLLM::Tool

what's with the "<"?

> param :command, desc: "The command to execute"

again, the colons are confusing...

tptacek•4h ago
You could chuck RubyLLM and still golf it down pretty far. Nothing RubyLLM is doing is magic. Read the linked article that inspired it (which is in Go); there's even less magic there.

Some of the complaints here are just about Ruby syntax, which: shrug.

nomilk•4h ago
> def execute(path:)

> why the "incomplete" colon?

Just ruby's syntax to denote 'keyword arguments', i.e. when calling this method, you must explicitly use the parameter name, like so: execute(path: "/some/path")

> class ListFiles < RubyLLM::Tool

> what's with the "<"?

Just ruby's way of denoting inheritance i.e. class A < B means class A inherits from B

> param :command, desc: "The command to execute"

> again, the colons are confusing...

The colons can be confusing, but you get used to them. The first one in :command is denoting a symbol. You could think of it as just a string. Any method that expects a symbol could be rewritten to uses a string instead, but symbols are a tad more elegant (one less keypress). The second one, desc:, is a keyword argument being passed to the param method. You could rewrite it as param(:command, desc: "The command to execute")

I sometimes wonder what ruby would be like without symbols, and part of me thinks the tradeoff would be worth it (less elegant, since there'd be "strings" everywhere instead of :symbols, but it would be a bit easer to learn/read.

d4mi3n•1h ago
Another couple important aspects of symbols:

1. They refer to the same object in memory, so multiple usages of a symbol by the same name (e.g. `:param`) not not add additional memory overhead.

2. Symbols are also immutable in that they cannot be mutated in any way once they are referenced/created.

These properties can be useful in some contexts, but in practice they're effectively used as immutable constant values.

BugsJustFindMe•3h ago
> As a person who's dabbled a bit in Rust and Ruby, I'm surprised people find Ruby intuitive and simple

IMO it's because they mostly just don't think about the chaos they're doing. You encounter a function call that ends in a hash. Does the function being called use that as a hash or does it explode the hash to populate some extra trailing parameters? You have no way to know without going and looking. To me that's super dumb. To them it's just another day in unexpected behavior land.

jeffrwells•3h ago
Why the us vs them mentality? How is that productive? Did people who love Ruby do something to you?

Pretty hard to grow and learn new concepts if you immediately label anything you don’t understand yet as “super dumb”

BugsJustFindMe•3h ago
This isn't any new concept to learn. There are real consequences to the other people who need to read and improve the code later to not being able to form rapid linear intuition about the meaning of values being passed around programs without looking somewhere else. It's like reading a garden path sentence where the understanding of the beginning can only exist after working backwards from the end. And there's definitely a distinct dichotomy between developers who detect the discommoding and developers who don't.
jaredsohn•2h ago
re: function that ends in a hash

I assume this is referring to passing hashes in as parameters to methods. Ruby 3 made this more explicit; you must use ** to convert a hash into positional arguments and you must use {} around your key/values if the first argument is a hash.

BugsJustFindMe•2h ago
I'm glad the light was eventually seen after 25 years, but that's a significantly breaking change which means the update often doesn't happen. A lot of Ruby 2 codebases still exist with people still doing Ruby 2 bad behaviors.
jeffrwells•3h ago
As someone who writes a lot of Ruby and has for a long time, I have never thought the metric Ruby optimizes for is “intuitive” (I think it is, but been doing it too long / too close to it so it’s intuitive to me)

The stated optimization from Matz (who created Ruby) is “developer happiness”

The important optimization for me is “fidelity to business logic”, eg less cruft and ruby syntactic sugar means you could sit at your computer and read your business rules (in code) out loud in real time and be understood by a non-dev

Mystery-Machine•3h ago
> As a person who's dabbled a bit in Rust and Ruby

You say you "dabbled" a bit in Ruby and then proceed to demonstrate your lack of understading of basic Ruby syntax.

behnamoh•2h ago
hence the word "dabbled".
kemotep•1h ago
In Dwarf Fortress, the lowest possible skill rank other than no skill is dabbling. What does dabbling mean to you?
miki123211•18m ago
Those colons are symbols, and (as a non-rubyist), yes, I think they were a bad idea.

Ruby symbols (and atoms in Lisp / Erlang / Elixir) are a performance hack, they are basically "interned" strings. They're immutable and are mostly used for commonly-repeated values, e.g. names of keyword arguments, enum values etc. Unlike strings, they're supposed to be treated as a single, opaque value, with no other properties beyond the name they represent. Most languages don't give you APIs to uppercase or slice symbols, though you can usually convert to strings and back if you really need to.

The performance advantage of symbols/atoms is that they're represented as pointers or offsets into a global pool, which contains their names. This means repeated instances of the same symbol take up much less memory than they would as ordinary strings, as each instance is just a single pointer, and the actual name it represents is only stored once, in the global pool. Comparing symbols is also much faster than strings, as two symbols representing the same name will always have the same offset, turning an O(n) character-by-character comparison into a simple O(1) comparison of pointers.

It's really strange to me that so many high-level languages, which prize themselves on "developer happiness" and "mental compression" force you to think about strings in this way, out of all things.

I think there's something to be said for having a single character that can be used to represent identifiers as strings. Giving your internal string type an interned representation (with automatic interning of literals and a method to intern arbitrary strings) is also an interesting idea, though I know far too little about interpreter design to have an opinion on how much performance difference it would make. Conflating those two ideas together just seems like a really bad deal to me.

paulddraper•3h ago
94 lines if you import thousands of lines and connect to remote services.

Useless metric.

dismalaf•3h ago
Unless you're writing a kernel from scratch, you're calling lots of code someone else wrote once upon a time...
jeffrwells•3h ago
LOC or code golf is indeed not a metric to optimize to 0, but hating on importing libraries is a bad take.

As CTO at Redo do you demand everything written in assembly? Does your entire company’s code run in one file or do you use abstraction to simplify?

I’m not quite clear on how expressing a really complex and paradigm shifting approach of agents in a more concise way is a bad thing

Mystery-Machine•3h ago
Just out of curiosity, I never understood why people do `ENV.fetch("ANTHROPIC_API_KEY", nil)` which is the equivalent of `ENV["ANTHROPIC_API_KEY"]`. I thought the whole point of calling `.fetch` was to "fail fast". Instead of assigning `nil` as default and having `NoMethodError: undefined method 'xxx' for nil` somewhere random down the line, you could fail on the actual line where a required (not optional) ENV var wasn't found. Can someone please explain?
jaredsohn•2h ago
There might be code later that says that if the anthropic api key is not set, then turn off the LLM feature. Wouldn't make sense for this LLM-related code but the concept makes sense for using various APIs from dev.