Readit News logoReadit News
psadri commented on Beagle, a source code management system that stores AST trees   github.com/gritzko/librdx... · Posted by u/strogonoff
ibejoeb · 5 days ago
> why does it make more sense to use asts here

For one, it eliminates a class of merge conflict that arises strictly from text formatting.

I always liked the idea of storing code in abstraction, especially editors supported edit-time formatting. I enjoy working on other people's code, but I don't think anybody likes the tedium of complying with style guides, especially ones that are enforced at the SCM level, which adds friction to creating even local, temporary revisions. This kind of thing would obviate that. That's why I also appreciate strict and deterministic systems like rustfmt. Unison goes a little further, which is neat but I think they're struggling getting adoption because of that, even though I'm pretty sure they've got some better tooling for working outside the whole ecosystem. These decoupled tools are probably a good way to go.

I was messing around with a file-less paradigm that would present a source tree in arbitrary ways, like just showing a individual functions, so you have the things you're working on co-located rather than switching between files. Kind of like the old VB IDE.

psadri · 5 days ago
Related, I’d love an editor that’d let me view/edit identifier names in snake_case and save them as camelCase on disk. If anyone knows of such a thing - please let me know!
psadri commented on LLM Structured Outputs Handbook   nanonets.com/cookbooks/st... · Posted by u/vitaelabitur
tlarkworthy · 2 months ago
I use regex to force an XML schema and then use a normal XML parser to decode.

XML is better for code, and for code parts in particular I enforce a cdata[[ part so there LLM is pretty free to do anything without escaping.

OpenAI API lets you do regex structured output and it's much better than JSON for code.

psadri · 2 months ago
Could you share some samples / pointers on how you do this?
psadri commented on ManusAI Joins Meta   manus.im/blog/manus-joins... · Posted by u/gniting
serf · 2 months ago
It was more of a timing thing, they offered 'deep research' like behaviors a long time before they were offered to standard customers of the primary ai providers.
psadri · 2 months ago
They launched March 2025. It’s great that’s considered a long time ago.
psadri commented on Prompt caching for cheaper LLM tokens   ngrok.com/blog/prompt-cac... · Posted by u/samwho
weird-eye-issue · 3 months ago
They absolutely are segregated

With OpenAI at least you can specify the cache key and they even have this in the docs:

Use the prompt_cache_key parameter consistently across requests that share common prefixes. Select a granularity that keeps each unique prefix-prompt_cache_key combination below 15 requests per minute to avoid cache overflow.

psadri · 3 months ago
Does anyone actually compute / use this key feature? Or do you rely on implicit caching? I wish HN had a comment with a poll feature.
psadri commented on How Google Maps allocates survival across London's restaurants   laurenleek.substack.com/p... · Posted by u/justincormack
psadri · 3 months ago
Google Maps or any other aggregator has an inherent interest in market participant diversity. A lot of suppliers would mean competition, which results in ad spend, which result in higher revenue for the aggregator. Same with Google Search.

It's an interesting equilibrium point. They want local businesses to suffer enough to pay up for ads. But also not too much that they die. A good local business that does not need to advertise because it is simply good is actually a burden to the aggregator even though it is exactly what the end users want to see.

In the past, when I was a in position to build a search engine, we took the trouble of always including organically ranked results that were genuinely good, regardless of whether we got paid or not. I felt it was a long term investment into creating real value for our end users and therefore our service.

psadri commented on Perl's decline was cultural   beatworm.co.uk/blog/compu... · Posted by u/todsacerdoti
psadri · 3 months ago
25 years ago Perl allowed you to express what was in your head 10x more concisely as in other mainstream language (which have since caught up with some of the features).

This was not the best when it came to others (or even yourself 6 months later) reading the code. But it was great for cranking stuff out that was simply too tedious in other languages.

psadri commented on Structured outputs on the Claude Developer Platform   claude.com/blog/structure... · Posted by u/adocomplete
causal · 4 months ago
I reaaaaally wish we could provide an EBNF grammar like llama.cpp. JSON Schema has much fewer use cases for me.
psadri · 4 months ago
What are some examples that you can’t express in json schema?
psadri commented on Can you save on LLM tokens using images instead of text?   pagewatch.ai/blog/post/ll... · Posted by u/lpellis
ashed96 · 4 months ago
In my experience, LLMs tend to take noticeably longer to process images than text.
psadri · 4 months ago
I wonder if these stay in the prefix cache?
psadri commented on Show HN: Why write code if the LLM can just do the thing? (web app experiment)   github.com/samrolken/noko... · Posted by u/samrolken
psadri · 4 months ago
Awesome experiment!!

I did a version of this where the AI writes tools on the fly but gets to reuse them on future calls, trying to address the cost / performance issues. Migrations are challenging because they require some notion of an atomic update across the db and the tools.

This is a nice model of organically building software on the fly and even letting end users customize it on the fly.

psadri commented on Do you know that there is an HTML tables API?   christianheilmann.com/202... · Posted by u/begoon
psadri · 4 months ago
The trouble is not populating it. The trouble is that tables, even though structured semantically, give you absolutely no functionality. There are no search, filter, sort, or selection features that you get.

u/psadri

KarmaCake day1247August 28, 2012
About
Creator of Y! Pipes and Polyvore.
View Original