Better HN
topnewbestaskshowjobs
Log inSign up

coder543

6,677 karma · joined Jul 18, 2012 (14y ago) · 1,965 submissions

My email is at gmail using my username.

Backend-focused full-stack engineer with 8+ years of experience, mostly focused on Go, Rust, and TypeScript, but open to other options.

Resume: https://drive.google.com/file/d/1VNC272B3n7ZEfppMHkm2wGgaINwYl4Av/view

Submissions

comment 1y ago · link · parent

The "admired and desired" chart has nothing to do with actual use.

According to this chart[0] higher on the same survey report, JavaScript is the #1 most used, and Python is #3.

But, I don't see this as a contest... being "the most popular" programming language doesn't automatically make it the best choice for a given task.

[0]: https://survey.stackoverflow.co/2024/technology#most-popular...

comment 1y ago · link · parent

Cursor’s composer agent is so slick. I tried Zed out for a few minutes this evening, and in addition to what you said, I was surprised that there wasn’t an option to bring my own tab completion server.

Zed felt very nice, definitely reminded me of the good old days of Sublime. With literally the two features mentioned above, I think I would switch… but it’s easy to say until it happens for sure.

comment 1y ago · link · parent

> I wired one up

“One”? Wired up how? There is a huge difference between the best and worst. They aren’t fungible. Which one? How long ago? Did it even support FIM (fill in middle), or was it blindly guessing from the left side? Did the plugin even gather appropriate context from related files, or was it only looking at the current file?

If you try Copilot or Cursor today, you can experience what “the best” looks like, which gives you a benchmark to measure smaller, dumber models and plugins against. No, Copilot and Cursor are not available for emacs, as far as I know… but if you want to understand if a technology is useful, you don’t start with the worst version and judge from that. (Not saying emacs itself is the worst… just that without more context, my assumption is that whatever plugin you probably encountered was probably using a bottom tier model, and I doubt the plugin itself was helping that model do its best.)

There are some local code completion models that I think are perfectly fine, but I don’t know where you will draw the line on how good is good enough. If you can prove to yourself that the best models are good enough, then you can try out different local models and see if one of those works for you.

comment 1y ago · link · parent

Your memory appears to be incorrect.

SSE was first built into a web browser back in 2006. By 2011, it was supported in all major browsers except IE. SSE is really just an enhanced, more efficient version of long polling, which I believe was possible much earlier.

Websocket support was added by all major browsers (including IE) between 2010 and 2012.

gRPC wasn't open source until 2015.

comment 1y ago · link · parent

> Running a prompt against every single cell of a 10k row document was never gonna happen with a large model

That isn’t the main point of FLAME, as I understood it. The main point was to help you when you’re editing a particular cell. codex-davinci was used for real time Copilot tab completions for a long time, I believe, and editing within a single formula in a spreadsheet is far less demanding than editing code in a large document.

After I posted my original comment, I realized I should have pointed out that I’m fairly sure we have 8B models that handily outperform codex-davinci these days… further driving home how irrelevant the claim of “>100B” was here (not talking about the paper). Plus, an off the shelf model like Qwen2.5-0.5B (a 494M model) could probably be fine tuned to compete with (or dominate) FLAME if you had access to the FLAME training data — there is probably no need to train a model from scratch, and a 0.5B model can easily run on any computer that can run the current version of Excel.

You may disagree, but my point was that claiming a 60M model outperforms a 100B model just means something entirely different today. Putting that in the original comment higher in the thread creates confusion, not clarity, since the models in question are very bad compared to what exists now. No one had clarified that the paper was over a year old until I commented… and FLAME was being tested against models that seemed to be over a year old even when the paper was published. I don’t understand why the researchers were testing against such old models even back then.

comment 1y ago · link · parent

That paper is from over a year ago, and it compared against codex-davinci... which was basically GPT-3, from what I understand. Saying >100B makes it sound a lot more impressive than it is in today's context... 100B models today are a lot more capable. The researchers also compared against a couple of other ancient(/irrelevant today), small models that don't give me much insight.

FLAME seems like a fun little model, and 60M is truly tiny compared to other LLMs, but I have no idea how good it is in today's context, and it doesn't seem like they ever released it.

comment 1y ago · link · parent

Someone mentioned generating millions of (very short) stories with an LLM a few weeks ago: https://news.ycombinator.com/item?id=42577644

They linked to an interactive explorer that nicely shows the diversity of the dataset, and the HF repo links to the GitHub repo that has the code that generated the stories: https://github.com/lennart-finke/simple_stories_generate

So, it seems there are ways to get varied stories.

comment 1y ago · link · parent

Maybe function calling using JSON blobs isn't even the optimal approach... I saw some stuff recently about having LLMs write Python code to execute what they want, and LLMs tend to be a lot better at Python without any additional function-calling training. Some of the functions exposed to the LLM can be calls into your own logic.

Some relevant links:

This shows how python-calling performance is supposedly better for a range of existing models than JSON-calling performance: https://huggingface.co/blog/andthattoo/dpab-a#initial-result...

A little post about the concept: https://huggingface.co/blog/andthattoo/dria-agent-a

Huggingface has their own "smolagents" library that includes "CodeAgent", which operates by the same principle of generating and executing Python code for the purposes of function calling: https://huggingface.co/docs/smolagents/en/guided_tour

smolagents can either use a local LLM or a remote LLM, and it can either run the code locally, or run the code on a remote code execution environment, so it seems fairly flexible.

comment 1y ago · link · parent

It agrees with what I was seeing, but it doesn’t really seem to explain much. I still don’t know if it is Codeberg-specific or Forgejo-specific, or why either of them would be slow for this task when Gitea local to me can go much faster (even accounting for ping latency).

comment 1y ago · link · parent

I noticed some surprising load times on Codeberg’s Forgejo instance. For example:

- The first page of releases (out of only 63 releases total) takes 3–5.5 seconds to load: https://codeberg.org/forgejo/forgejo/releases

- The issues page is faster at ~1.5 seconds, but still a bit slow: https://codeberg.org/forgejo/forgejo/issues

- The commits page for the main branch (22k commits) is much slower, taking over 11 seconds: https://codeberg.org/forgejo/forgejo/commits/branch/forgejo

These load times were surprising to me given the relatively small amount of data being loaded (just the first page of results)... It feels like there could be an inefficient query at play here? The HTML responses aren’t huge (~400kB), and my ping to Codeberg (~125ms, US<-->Berlin?) shouldn’t be a major factor when just loading a single HTML document without factoring in other resources. I also have gigabit internet, and while there could be bottlenecks between here and Europe, they surely wouldn’t be responsible for slowing things down to this degree.

For comparison, I’ve run Gitea on a local server, and it’s been lightning fast, even with larger datasets. For example, on a test with the Linux kernel repo (1.3M commits), Gitea rendered the first page of commits in under 500ms. That’s a stark contrast to the 11 seconds it took on Codeberg’s Forgejo instance for just 22k commits.

I wonder if this slowness is more of a Codeberg hosting issue or something inherent to Forgejo, but I haven't tried Forgejo locally.

comment 1y ago · link · parent

I thought it was an interesting post, so I tried to add Railway's blog to my RSS reader... but it didn't work. I tried searching the page source for RSS and also found nothing. Eventually, I noticed the RSS icon in the top right, but it's some kind of special button that I can't right click and copy the link from, and Safari prevents me from knowing what the URL is... so I had to open that from Firefox to find it.

Could be worth adding a <meta> tag to the <head> so that RSS readers can autodiscover the feed. A random link I found on Google: https://www.petefreitag.com/blog/rss-autodiscovery/

comment 1y ago · link · parent

> My conversation quickly began to approach the context window for the LLM and some RAG engineering is very necessary to keep the LLM informed about the key parts of your history

Assuming we're talking about GPT-4o, that 128k context window theoretically corresponds to somewhere around 73,000 words. People talk at around 100 words per minute in conversation, so that would be about 730 minutes of context, or about 12 hours. The Gemini models can do up to 2 million tokens of context... which we could extrapolate to 11,400 minutes of context (190 hours), which might be enough?

I would say GPT-4o was only good up to about 64k tokens the last time I really tested large context stuff, so let's call that 6 hours of context. In my experience, Gemini's massive context windows are actually able to retain a lot of information... it's not like there's only 64k usable or something. Google has some kind of secret sauce there.

One could imagine architecting the app to use Gemini's Context Caching[0] to keep response times low, since it wouldn't need to re-process the entire session for every response. The application would just spin up a new context cache in the background every 10 minutes or so and delete the old one, reducing the amount of recent conversation that would have to be re-processed each time to generate a response.

I've just never seen RAG work particularly well... and fitting everything into the context is very nice by comparison.

But, one alternative to RAG would be a form of context compression... you could give the LLM several tools/functions for managing the context. The LLM would be instructed to use these tools to record (and update) the names and information of different characters, places, and items that the players encounter, important events that have occurred during the game, as well as information about who the current players are and what items and abilities those players have, and then the LLM would be provided with this "memory" in the context in place of a complete conversational record. The LLM would then just receive (for example) the most recent 15 or 30 minutes of conversation, in addition to that memory.

> I found the LLM to be too pliable as a DM.

I haven't tried using an LLM as a DM, but in my experience, GPT-4o is happy to hold its ground on things. This isn't like the GPT-3.5 days where it was a total pushover for anything and everything. I believe the big Gemini models are also stronger than the old models used to be in this regard. Maybe you just need a stricter prompt for the LLM that tells it how to behave?

I also think the new trend of "reasoning" models could be very interesting for use cases like this. The model could try to (privately) develop a more cohesive picture of the situation before responding to new developments. You could already do this to some extent by making multiple calls to the LLM, one for the LLM to "think", and then another for the LLM to provide a response that would actually go to the players.

One could also imagine giving the LLM access to other functions that it could call, such as the ability to play music and sound effects from a pre-defined library of sounds, or to roll the dice using an external random number generator.

> 4. Most importantly, I found that I most enjoy the human connection that I get through DnD and an LLM with a voice doesn't really satisfy that.

Sure, maybe it's not something people actually want... who knows. But, I think it looks pretty fun.[1]

One of the harder things with this would be helping the LLM learn when to speak and when to just let the players talk amongst themselves. A simple solution could just be to have a button that the players can press when they want, which will then trigger the LLM to respond to what's been recently said, but it would be cool to just have a natural flow.

[0]: https://ai.google.dev/gemini-api/docs/caching

[1]: https://www.youtube.com/watch?v=9oBdLUEayGI

comment 1y ago · link · parent

The usual bottleneck for self-hosted LLMs is memory bandwidth. It doesn't really matter if there are integrated graphics or not... the models will run at the same (very slow) speed on CPU-only. Macs are only decent for LLMs because Apple has given Apple Silicon unusually high memory bandwidth, but they're still nowhere near as fast as a high-end GPU with extremely fast VRAM.

For extremely tiny models like you would use for tab completion, even an old AMD CPU is probably going to do okay.

comment 1y ago · link · parent

gpt-4o-mini might not be the best point of reference for what good LLMs can do with code: https://aider.chat/docs/leaderboards/#aider-polyglot-benchma...

A teeny tiny model such as a 1.5B model is really dumb, and not good at interactively generating code in a conversational way, but models in the 3B or less size can do a good job of suggesting tab completions.

There are larger "open" models (in the 32B - 70B range) that you can run locally that should be much, much better than gpt-4o-mini at just about everything, including writing code. For a few examples, llama3.3-70b-instruct and qwen2.5-coder-32b-instruct are pretty good. If you're really pressed for RAM, qwen2.5-coder-7b-instruct or codegemma-7b-it might be okay for some simple things.

> medium specced macbook pro

medium specced doesn't mean much. How much RAM do you have? Each "B" (billion) of parameters is going to require about 1GB of RAM, as a rule of thumb. (500MB for really heavily quantized models, 2GB for un-quantized models... but, 8-bit quants use 1GB, and that's usually fine.)

comment 1y ago · link · parent

Google's research blog does not seem to provide this, but many blogs include the Open Graph metadata[0] around when the article was published or modified:

    article:published_time - datetime - When the article was first published.
    article:modified_time - datetime - When the article was last changed.
For example, I pulled up a random article on another website, and found these <meta> tags in the <head>:

    <meta property="article:published_time" content="2025-01-11T13:00:00.000Z">
    <meta property="article:modified_time" content="2025-01-11T13:00:00.000Z">
For pages that contain this metadata, it would be a cheaper/faster implementation than using an LLM, but using an LLM as a fallback could easily provide you with the publication date of this Google article.

[0]: https://ogp.me/

comment 1y ago · link · parent

What does swarm actually do better for a single-node, single-instance deployment? (I have no experience with swarm, but on googling it, it looks like it is targeted at cluster deployments. Compose seems like the simpler choice here.)

comment 1y ago · link · parent

Your original solution of binding to 127.0.0.1 generally seems fine. Also, if you're spinning up a web app and its supporting services all in Docker, and you're really just running this on a single $3/mo instance... my unpopular opinion is that docker compose might actually be a fine choice here. Docker compose makes it easy for these services to talk to each other without exposing any of them to the outside network unless you intentionally set up a port binding for those services in the compose file.

comment 1y ago · link · parent

There's a lot we don't know about Perplexity's costs, like the cost of supporting free users, the difference in usage between free and paying users, and whether these ads fully offset the cost of free users.

From what I've seen, it's typical for startups at this stage to be generating minimal revenue. Perplexity has raised close to $1 billion, so they likely aren't under pressure to be profitable just yet. Bringing in tens of millions in revenue annually would actually be quite a strong start.

It may sometimes seem like “no one pays for anything”, but clearly a lot of people are paying for Perplexity Pro. It’s their business, so they can run ads if they think that will help them grow, but it’s not because no one paid for the Pro tier.

comment 1y ago · link · parent

"Hundreds of thousands of people" are paying $20/mo for it, according to the CEO.[0] That seems like a very respectable place for such an early product to be.

It is extremely far from "no one".

[0]: https://www.youtube.com/watch?v=FWPmu_rKxJo&t=185s

comment 1y ago · link · parent

Does template_plural actually work well / offer any benefits?

comment 1y ago · link · parent

Yep, and that gotcha got me, as a perfectly non-silicon human. My bad everyone.

comment 1y ago · link · parent

One problem from the benchmark:

      "prompt_id": "river_crossing_easy",
      "category": "Logic Puzzle",
      "title": "Easy river crossing",
      "prompt": "A farmer is on one side of a river with a wolf, a goat, and a cabbage. When he is crossing the river in a boat, he can only take one item with him at a time. The wolf will eat the goat if left alone together, and the goat will eat the cabbage if left alone together. How can the farmer transport the goat across the river without it being eaten?",
      "expected_behavior": [
        "Answer concludes that they simply get in the boat and cross together in one trip"
      ],
EDIT: removing most of my commentary on this problem. As a human, I was tricked by the problem too. I would love to see how a random selection of humans would do on this one… but it just doesn’t feel like a great test to me.

comment 1y ago · link · parent

For compressing short (<100 bytes), repetitive strings, you could potentially train a zstd dictionary on your dataset, and then use that same dictionary for all rows. Of course, you’d want to disable several zstd defaults, like outputting the zstd header, since every single byte counts for short string compression.

comment 1y ago · link · parent

> Qwen team just dropped the Apache 2.0 licensed QvQ-72B-Preview

When they dropped it, the huggingface license metadata said it was under the Qwen license, but the actual LICENSE file was Apache 2.0. Now, they have "corrected" the mistake and put the Qwen LICENSE file in place.

I'm not a lawyer. If the huggingface metadata had also agreed it was Apache 2.0, then I would be pretty confident it was Apache 2.0 forever, whether Alibaba wanted that or not, but the ambiguity makes me less certain how things would shake out in a court of law.

325.

Indexing Code at Scale with Glean(engineering.fb.com ↗)

2 points · by coder543 · 1y ago · 1 comment

comment 1y ago · link · parent

That linked discussion doesn't say it is broken all the time (which your comment strongly implies to anyone who doesn't read the link)... and I had verified the parallax effect was working fine earlier today when I made my comment.

I hadn't rebooted my phone in quite awhile, so I'm not sure what the conditions are for that bug, but I think that discussion is wrong that rebooting is the only way to get it working again. I had surely accessed the App Library since the last reboot at some point, and yet parallax was working fine. But I can confirm that it does break (at least temporarily) after accessing the App Library.

comment 1y ago · link · parent

I didn’t say it was gone! Just that Apple added it years ago.

The website this post is about doesn’t implement the feature.

comment 1y ago · link · parent

Thinking about what feels different here, there are a couple of things that could be fun to implement:

- On iOS, opening and closing an app also scales and blurs/unblurs the wallpaper at the same time that it’s animating the app entering/exiting the foreground.

- Also, years ago, Apple added a very subtle 3D effect to the Home Screen. Essentially, when you’re looking at the Home Screen, as you tilt the phone, the icons and widgets move a few pixels in the direction of the tilt, which makes it feel like they’re popping out of the screen a little. To study the effect in detail, you can just look at the edge of an icon or the text below an icon and tilt the screen around and notice how it moves relative to the background image. It’s meant to be a very subtle effect, not some garishly dramatic effect.

comment 1y ago · link · parent

Some countries consider the 1st floor to be the ground floor, others consider the 1st floor to be the floor above the ground floor, which the formerly mentioned countries consider the 2nd floor… I think 0/1-based indexing is more subjective than simply being a “relic of C” or a “horrible kludge” :P
1
101112
66