News for hackers. Stuff that matters.

estreeper

It wouldn’t be HN if your joke wasn’t met with pedantry, so I’ll mention the heat and pressure at the surface means the atmosphere is a supercritical fluid of 96.5% carbon dioxide and 3.5% nitrogen.

Buyers should have all the facts

Re:Llama.vim – Local LLM-assisted text completion on Friday January 24, 2025 @12:56AM (#42810842)
Very exciting - I'm a long-time vim user but most of my coworkers use VSCode, and I've been wanting to try out in-editor completion tools like this.

After using it for a couple hours (on Elixir code) with Qwen2.5-Coder-3B and no attempts to customize it, this checks a lot of boxes for me:

  - I pretty much want fancy autocomplete: filling in obvious things and saving my fingers the work, and these suggestions are pretty good
  - the default keybindings work for me, I like that I can keep current line or multi-line suggestions
  - no concerns around sending code off to a third-party
  - works offline when I'm traveling
  - it's fast!
So I don't need to remember how to run the server, I'll probably set up a script to check if it's running and if not start it up in the background and run vim, and alias vim to use that. I looked in the help documents but didn't see a way to disable the "stats" text after the suggestions, though I'm not sure it will bother me that much.
Re:Llama.vim – Local LLM-assisted text completion on Friday January 24, 2025 @12:27AM (#42810753)
This is a tough question to answer, because it depends a lot on what you want to do! One way to approach it may be to look at what models you want to run and check the amount of VRAM they need. A back-of-the-napkin method taken from here[0] is:

    VRAM (GB) = 1.2 * number of parameters (in billions) * bits per parameter / 8
The 1.2 is just an estimation factor to account for the VRAM needed for things that aren't model parameters.

Because quantization is often nearly free in terms of output quality, you should usually look for quantized versions. For example, Llama 3.2 uses 16-bit parameters but has a 4-bit quantized version, and looking at the formula above you can see that will allow you to run a 4x larger model.

Having enough VRAM will allow you to run a model, but performance is dependent on a lot of other factors. For a much deeper dive into how all of this works along with price/dollar recommendations (though from last year!), Tim Dettmers wrote this excellent article: https://timdettmers.com/2023/01/30/which-gpu-for-deep-learni...

Worth mentioning for the benefit of those who don't want to buy a GPU: there are also models which have been converted to run on CPU.

[0] https://blog.runpod.io/understanding-vram-and-how-much-your-...

Re:Interview with Jeff Atwood, Co-Founder of Stack Overflow on Wednesday January 22, 2025 @09:11PM (#42799868)
Total healthcare spending per capita includes insurance premiums too though, which is $8,951 for single coverage and $25,572 for family coverage[0], and needs to be added to that ~$1,400 to get the total cost. Some amount of this may be paid by employers, but is still theoretically money that could go to you otherwise.

[0] https://www.kff.org/report-section/ehbs-2024-section-1-cost-...

Re:PostgreSQL Anonymizer on Friday January 17, 2025 @08:06PM (#42744848)
A nice tradeoff in many cases is to have a separate schema rather than a separate database, which allows preserving referential integrity and using the database’s RBAC to restrict access to the schemas. This also means things like cascading deletes can still work.
Re: on Friday January 03, 2025 @08:10PM (#42591286)
> it’s been a net negative for taxpayers

This analysis[1] from the Cato Institute found the opposite: “immigrants pay more in taxes than they consume in benefits”.

[1] https://www.cato.org/blog/fiscal-impact-immigration-united-s...

Re:Phoenix LiveView 1.0.0 is here on Tuesday December 03, 2024 @06:44PM (#42312982)
We've built many production apps using LiveView. It has some limitations inherent to its design, namely the need to have a semi-reliable WebSocket connection to be able to effectively use the app, but with this tradeoff come a number of advantages:

  - code generation makes for an extremely productive experience that makes standing up an actually-useful application very fast
  - Elixir is a great language, especially for the web, and using it to render the frontend feels like having the full power of the language plus the simplicity of HTML (with little/no writing JavaScript)
  - it's extremely efficient since only tiny changes are sent over the WebSocket when data is updated on the server
  - you're already using WebSockets, so adding any kind of real-time functionality is very easy (chat, notifications, game state)
Because of the separation of concerns by convention (i.e. keeping business logic in Contexts), it's also a very viable pathway to build a webapp using LiveView first, and serve an API once you need other types of clients (native apps, API consumers) with minimal changes. Ecto is also great to use for validations, and having that available for "frontend" code is a pleasure. It's also great to be able to have backend and frontend tests in Elixir.

We've hit some bugs and gotchas over the years leading up to this 1.0 release, but it has long felt like a stable, well-built library that keeps our codebases simple and maintainable, which lets you move fast.

Congratulations to Chris, Jose, and all the other wonderful contributors!

Re:The average age of U.S. homebuyers jumps to 56 on Tuesday November 05, 2024 @02:31AM (#42049397)
In the United States, federal tax applies when the estate is valued over $13.6M for 2024[1], though as you mention spousal transfers and other methods can be used for tax avoidance as well.

1. https://www.irs.gov/businesses/small-businesses-self-employe...

Not to mention various other wars and random fires, such as the Ōnin War 応仁の乱 in the 1400s, a civil war between many feudal lords, which destroyed much of Kyoto among other areas.

The world's oldest extant wooden structure is the Kondō (main hall) of the temple Hōryū-ji 法隆寺 in Ikaruga, in the Nara Prefecture of Japan. It was initially built in 607 but completely burned down due to lightning. It was rebuilt in 670, but again nearly burned down by accident in 1949 [1].

It's interesting to contemplate how across these timescales war, disasters, and accidents make it so difficult for structures to survive.

[1] https://en.wikipedia.org/wiki/H%C5%8Dry%C5%AB-ji

Here’s a short video of this armor in action: https://youtu.be/rm2ZR25xU8M?si=6HdtRO8cFxB5HO8l
I'm curious how people are handling multi-lingual embeddings.

I've found LASER[1] which originally had the idea to embed all languages in the same vector space, though it's a bit harder to use than models available through SentenceTransformers. LASER2 stuck with this approach, but LASER3 switched to language-specific models. However, I haven't found benchmarks for these models, and they were released about 2 years ago.

Another alternative would be to translate everything before embedding, which would introduce some amount of error, though maybe it wouldn't be significant.

1. https://github.com/facebookresearch/LASER

Just to add to this, a great resource is the Massive Text Embedding Benchmark (MTEB) leaderboard which you can use to find good models to evaluate, and there are many open models that outperform i.e. OpenAI's text-embedding-ada-002, currently ranked #46 for retrieval, which you can use with SentenceTransformers.

https://huggingface.co/spaces/mteb/leaderboard

Re:The Obscene Energy Demands of A.I on Saturday March 09, 2024 @11:03AM (#39652527)
Energy use should be a concern, but it’s important to understand the magnitude of the problems and not simply conflate crypto and AI. To compare the technologies against each other:

Bitcoin: 145B = 145,000M kWh/year

ChatGPT: 0.5M * 365 = 182M kWh/year

Based on the numbers from the article, ChatGPT is using 3 orders of magnitude less electricity for something that provides high utility for vastly more people.

There are of course many other uses of AI aside from ChatGPT and more cryptocurrencies aside from BTC, but these are very different power consumptions.

Re:Introducing GPTs on Monday November 06, 2023 @05:37PM (#38170120)
For embeddings specifically, there are multiple open source models that outperform OpenAI’s best model (text-embedding-ada-002) that you can see on the MTEB Leaderboard [1]

> embedding-based approach will be cheaper and faster, but worse result than full text

I’m not sure results would be worse, I think it depends on the extent to which the models are able to ignore irrelevant context, which is a problem [2]. Using retrieval can come closer to providing only relevant context.

1. https://huggingface.co/spaces/mteb/leaderboard

2. https://arxiv.org/abs/2302.00093

Re:Comparison of vector databases on Monday July 31, 2023 @11:58AM (#36944602)
I recently wrote a tutorial on making a vector driven semantic search app using all open source tools (pgvector, Instructor, and Flask) that might be helpful: https://revelry.co/insights/open-source-semantic-vector-sear...
Re:Meta to release open-source commercial AI model on Friday July 14, 2023 @01:23PM (#36727024)
If you're just looking to play with something locally for the first time, this is the simplest project I've found and has a simple web UI: https://github.com/cocktailpeanut/dalai

It works for 7B/13B/30B/65B LLaMA and Alpaca (fine-tuned LLaMA which definitely works better). The smaller models at least should run on pretty much any computer.

Great work and great concept - I found the copy to be clear and communicated the value proposition effectively, and I would certainly consider using this when selling my house since I could potentially get 10s of thousands of dollars more. I will also check back to see if there are different listings here than on Zillow, but will probably forget if you don’t send me a reminder.

One small UX bug: on mobile the hamburger menu obscures the Sign Up form, and I missed that I needed to click the X - closing the menu when I click an item would solve this. Other than that, it was pretty easy to use!

The idea of being able to get information directly from the person living in the house is appealing to me.

I understand the up front fee to sell, but wish I could de-risk by being able to get it refunded if I don’t sell.

Very interesting, I hope to keep an eye on your company!

Re:Mark Zuckerberg on Messenger (2013) on Sunday May 22, 2022 @02:31AM (#31465450)
In addition to the agreed price of $16B, Facebook added $3.6B to retain employees. WhatsApp had 55 employees at the time [0]. Near the end of the referenced article is an interesting comparison of different prices/employee for other acquisitions.

32 of the employees were engineers [1].

[0] https://theconversation.com/whatsapp-bought-for-19-billion-w...

[1] https://india.sequoiacap.com/article/four-numbers-that-expla...

Re:Vim prank: alias vim='vim -y' on Friday January 07, 2022 @03:21PM (#29844235)
You can always spot the ones who have tried it! A satisfying and poetic way to retire a system.
Re:Intuit to Acquire Mailchimp for $12B on Monday September 13, 2021 @06:32PM (#28517782)
I hate to recommend what is just another service provider, but there are many cloud hosting providers that offer email sending (i.e. AWS, GCP, etc.) and dedicated email companies (Sendgrid, Mailgun, etc.). The cost to send email via any of these services is a tiny fraction of the amount you would pay to Mailchimp.

The value in what Mailchimp does is not so much just sending email, but in all the things around it, like managing subscribers, tracking opens, easily creating nice-looking emails that look good in a variety of mail clients, etc.

Contrary to some of the replies you've received here, it definitely is possible to run your own mail server with good deliverability, and we routinely did this for companies, even fairly small ones, physically on-prem and in datacenters, and cloud. It is not trivial, but far from impossible, and will likely involve communicating with a human when getting a static IP to find a good one. With that being said, I do not recommend you run your own mail server starting out, that is probably not the problem you are trying to solve.

Re:Email Authenticity 101: DKIM, Dmarc, and SPF on Monday August 16, 2021 @03:56AM (#28195904)
To add to this, also remember to do this for anything else you might use to send email: servers/cloud services providers you use for transactional emails, any provider you might use for marketing emails, etc.
Re:How to Learn Stuff Quickly on Tuesday July 20, 2021 @12:09AM (#27889971)
> The road to "tutorial hell" is paved with blogposts and missing fundamentals

Even worse is that blog posts can have incorrect, bad, or even dangerous information. If you've just found it in a search, you have no idea of the skill level of the author.

I recently came across a post about a JavaScript WYSIWYG editor which stated that you didn't need to worry about sanitizing the HTML output from it because it took care of that for you. An attacker could of course send malicious data straight to the server or manipulate the client code however they want, so without also sanitizing on the server (also a hard problem), this opens a huge security hole. Ten years ago I probably would have naively followed this and thought everything was okay.

Tutorials are often useful, but they also cannot be trusted, especially without other resources. I feel I've learned the most from reading in-depth sources like official docs, specs, RFCs, or the source code of high-quality, well-maintained libraries. It can be harder at first, but I learn things I wouldn't have thought to look for, and there is something of a consistency in presentation (at least by comparison) that makes each additional one easier to go through.

Older »