HNHacker News
TopNewBestAskShowJobs

aidanf

554 karma · joined December 4, 2007

https://www.aidanf.net
submissionscomments
aidanf··on What is a Vector Database? (2021)
An embedding is a collection of learned vectors.

Each vector is an array of n floats that represent a location of a thing in an n-dimensional space. The idea of learning an embedding is that you have some learning process that will put items that are similar into similar parts of that vector space.

The vectors don’t necessarily need to represent words and the model that produces them doesn’t necessarily to be a language model.

For example, embeddings are widely used to generate recommendations. Say you have a dataset of users clicking on products on a website. You could assume that products that get clicked in the same session are probably similar and use that dataset to learn an embedding for products. This would give you vector representing each product. When you want to generate recommendations for a product, you take the vector for that product and then search through the set of all product vectors to find those that are closest to it in the vector space.

aidanf··on Pgvector: Open-source vector similarity search for Postgres
I’ve worked on e-commerce recs. Typically you would represent each product with a vector. Then finding similar products becomes a nearest-neighbour search over these vectors. Depending on your use-case it’s feasible now to do this search in the db using pgvector, or using something like solr/elastic which both support vector search in recent releases. You could also use something like faiss or one of the many nearest-neighbour libraries or dedicated vector search engines. (Since you are working with Elixir, you might find ExFaiss interesting [1][2][3]).

But I would say that for recommendations, searching the vectors is the easy part. The main work in getting good recommendations is generating a good set of product vectors in the first place. The quality of the recommendations is directly related how you generate the vectors. You could use one of the many open-source language models to generate vectors, but typically that approach isn’t very good for product recommendations. It will just give you items that are textually similar, and this usually doesn’t give good product recommendations.

To get good product recommendations you’d probably want to build a custom embedding that captures some notion of product similarity during training using some signals you get from user behaviour. E.g. things like products clicked in the same session, or added to cart at the same time, gives a signal on product similarity that you can use to train a product embedding for recommendations.

This is a bit more involved, but the main work is in generating the training data. Once you have that you can use open source tools such as fasttext [4] to learn the embedding and output the product vectors. (Or if you want to void training your own embedding, I’d guess that there are services that will take your interaction data and generate product vectors from them, but I’m not familiar with any).

[1] https://github.com/elixir-nx/ex_faiss

[2] https://dockyard.com/blog/2023/01/04/search-and-clustering-w...

[3] https://dockyard.com/blog/2023/01/11/semantic-search-with-ph...

[4] https://fasttext.cc/docs/en/unsupervised-tutorial.html

aidanf··on London and Switzerland seeking to dodge G7 global minimum tax
> This is about countries, like Ireland or Netherlands, with 0% corporate tax rates.

Ireland's corporate tax rate is 12.5%. It is one of the lowest in Europe but certainly not 0%.

aidanf··on [dead]
Why is this a Show HN? It's a blog post/article.

See the Show HN rules here: https://news.ycombinator.com/showhn.html

"Show HN is for something you've made that other people can play with. HN users can try it out, give you feedback, and ask questions in the thread.

On topic: things people can run on their computers or hold in their hands. For hardware, you can post a video or detailed article. For books, a sample chapter is ok.

Off topic: blog posts, sign-up pages, newsletters, lists, and other reading material. Those can't be tried out, so can't be Show HNs. Make a regular submission instead. "

aidanf··on Signs that a startup is focused on stuff that doesn’t matter
Add to that the fact that the meeting breaks up everyones day, making it more difficult for attendees to have long uninterrupted periods of deep, concentrated work.
aidanf··on Tesla crash after flying 82 feet in the air shows importance of a crumple zone
The Tesla Model S scored 82% for adult protection and 77% for child protection in the Euroncap crash tests: http://www.euroncap.com/en/results/tesla/model-s/7897

That's quite a bit below best in class: http://www.euroncap.com/en/ratings-rewards/best-in-class-car...

If you have the money for a Tesla you then you would be crazy not to put your kids in a Volvo (if safety is your priority).

aidanf··on 20 lines of code that beat A/B testing (2012)
Here are 2 good articles that follow up on the arguments presented by VWO in that article.

From the first link below: "They do make a compelling case that A/B testing is superior to one particular not very good bandit algorithm, because that particular algorithm does not take into account statistical significance.

However, there are bandit algorithms that account for statistical significance."

* https://www.chrisstucchio.com/blog/2012/bandit_algorithms_vs...

* https://www.chrisstucchio.com/blog/2015/dont_use_bandits.htm...

aidanf··on Learn Enough Git to Be Dangerous
Yes, a lot of sales platforms now handle EU VAT. I've used Gumroad, Sendowl and Leanpub and they all handle the EU VAT problem. In each case the author sets a price. They then detect if the customer is in an EU country and apply the VAT rate for that country, adding it on to the customers total. So the author gets the same amount for each sale, but the customers pay different amounts depending on which country they are in.
aidanf··on Learn Enough Git to Be Dangerous
In theory, if you are selling to customers in the EU you are supposed to collect VAT from your EU customers and make the appropriate VAT return to the VATMOSS authorities. Or else stop selling to EU customers.

In practice, if you're based outside of the EU then you can probably just ignore these regulations (many smaller US sellers seem to be taking this approach). It's hard to imagine the EU tax authorities chasing you down.

aidanf··on Learn Enough Git to Be Dangerous
I used softcover for writing http://books.aidanf.net/learn-swift

The software is awesome for the purposes of writing the book. The reason I didn't go with softcover as a selling platform is that the new EU VAT rules came in and as a result I had to use someone that supported those new VAT collection rules.

So I ended up using softcover to generate the ebooks and html, but using gumroad (and leanpub) to sell them. So it's totally feasible to use softcover for writing your book but self-host the resulting html and keep control of your sales data etc.

aidanf··on Cursive, an IDE for Clojure and ClojureScript, has reached 1.0
Nice work! I'm a long-time emacs user who thought that emacs was the best way to write clojure code. I was really happy with emacs as a clojure dev environment but after trying cursive recently it's now my preferred environment for writing clojure.
aidanf··on Deep neural network written from scratch in Julia
From the README, under the performance section:

> This package is not written for speed. It is meant to serve as a working example of an artificial neural network. As such, there is no GPU acceleration. Training using only the CPU can take days or even weeks. The training time can be shortened by reducing the number of updates, but this could lead to poorer performance on the test data. Consider using an exising machine learning package when searching for a deployable solution.

It seems the main aim of this software is educational, not production use.

aidanf··on Uber announces suspension of UberPOP in France
This is nonsense. Taxi services are regulated for good reason. Many cities and countries have well-regulated transparent taxi industries.

Uber often seems to seek to bypass that regulation because, eh, disruption. I would expect any city to do something when faced with a private corporation attempting to flout their laws for profit. Doing so is in no way correlated with any measure of how corrupt that city is.

aidanf··on PredictionIO – an open-source ML stack built on Spark, HBase, and Spray
There are quite a few machine learning API services. Here are a few:

* BigML https://bigml.com/

* Dato https://dato.com/

* Amazon Machine Learning http://aws.amazon.com/machine-learning/

* Google Prediction API https://cloud.google.com/prediction/docs

* Azure Machine Learning http://azure.microsoft.com/en-us/services/machine-learning/

Whether or not any of them are better than the others - it depends on what you're trying to do. Different services have different strengths and capabilities, so whether or not any of them are suitable depends on the task you're working on.

aidanf··on Show HN: Learn Swift
Thanks for that - I'll fix the errors you've listed. I know how to use its and it's, and I've proof-read the book several times, but there's still a good bit of stuff like this that I've missed.

It turns out that it's really difficult to proof-read large blocks of text that you've written yourself :/ When your brain sees something it recognises it tends to speed up and skip over bits, seeing what it wants to see, thus missing stuff like this.

aidanf··on Show HN: Learn Swift
Thanks. The code is 1.2, but the Xcode references are out of date. I'll update soon, I'm also going to update the whole thing to Swift 2 when it's released.
aidanf··on Show HN: Learn Swift
Was it the share buttons? I tested these on iphone and they dropped to the bottom of the page. But it looks like they only do this for phones below a certain resolution. So I've removed them.
aidanf··on Show HN: Learn Swift
Thanks, fixed.
aidanf··on Show HN: Learn Swift
Thanks for the suggestion. I think I'll add another chapter at the end that walks through a longer example start-to-finish.
aidanf··on Show HN: Learn Swift
Thanks, I'll try that. Although I'm reluctant to clear the cache until it goes off the HN front page :)
aidanf··on Show HN: Learn Swift
Thanks :) The REPL example with the error has a deliberate typo (int instead of Int) to show how multi-line editing works in the REPL - is that the part you're asking about?
aidanf··on Show HN: Learn Swift
Thanks, fixed.
aidanf··on Show HN: Learn Swift
Thanks for letting me know, I hadn't noticed that.
aidanf··on Show HN: Learn Swift
You're right - it's not as comprehensive as the official documentation, nor is it meant to be. It's a quick tour of the main language features, with a particular emphasis on the parts that I (as a ruby, python, clojure dev) found interesting.

For comparison, the Apple book "The Swift Programming Language" comes in at 334 pages. "Learn Swift" comes in at 128 pages.

aidanf··on Show HN: Learn Swift
I used Softcover (https://www.softcover.io/) to generate the ebooks.
aidanf··on Show HN: Learn Swift
I've been learning Swift in recent months, and as part of that process I wrote a short book about the language.

It's aimed at developers (like me) who can already program in a language like Ruby or Python and are looking for a quick tour of Swift.

It's available to read for free online at http://books.aidanf.net/learn-swift

I'll be adding stuff about yesterdays announcements in the next couple of weeks.

aidanf··on Ask HN: Freelancer? Seeking freelancer? (June 2015)
SEEKING WORK - Remote.

Location: Ireland.

Experienced Rails developer (9 years). I’ve worked with several large rails codebases and high-traffic rails sites.

A few things I can do:

* Help scale your rails app, find bottlenecks, improve performance.

* Maintain or update an existing app. I’m comfortable diving into large codebases and other peoples code.

* Build your MVP. You’ll get a working, reliable, well-tested first version of your app.

Other non-rails stuff:

* Clojure. This is my current “fun” language and I’d love to work on a project that lets me use it full-time.

* Machine Learning (python and/or clojure). I have a background in machine learning and I’ve worked on a few projects that have a ML component.

Here are some testimonials from past clients:

http://www.windmill.ie/roadmapping-session/

Some other links:

Blog: http://www.aidanf.net

Github: http://github.com/aidanf

Twitter: http://twitter.com/@aidanf

Drop me an email at aidan at aidanf dot net.

aidanf··on Ask HN: How to measure and improve sleep quality?
I used to struggle to sleep but eventually after experimenting a lot I got into a routine of consistent sleep. Here's a few things that I think helped me:

* Try to exercise every day. The days now when I struggle to get to sleep are days when I've skipped exercise. Also exercise early in the day. Exercise in the evening keeps me awake.

* Try to keep a routine of going to bed every day at roughly the same time and getting up at the same time every morning.

* Take magnesium (~750g) just before I go to bed.

* Avoid caffeine after 2pm. Coffee in the afternoon affects my sleep quality. T

aidanf··on Ask HN: What newsletters do you read every day or week?
Since Google Reader shut down, I've basically switched my behaviour to subscribing to sites via email and especially looking out for good curated weekly emails.

Here are my favourites at the moment:

iOS Dev Weekly : https://iosdevweekly.com/

Data Science Weekly : http://www.datascienceweekly.org/

Clojure Gazette : http://www.clojuregazette.com/

Ruby Weekly : http://rubyweekly.com/

Green Ruby : http://greenruby.org/

Founders Cabin : http://founderscabin.io/

SaaS Weekly : http://hiten.com/issues/

Also, shameless plug, I just started a weekly newsletter about Machine Learning, Data Science, Data Engineering:

http://datacoder.aidanf.net/

aidanf··on Ask HN: Freelancer? Seeking freelancer? (May 2015)
SEEKING WORK - Remote. Location: Ireland.

Experienced Rails developer (9 years).

I’ve worked with several large rails codebases and high-traffic rails sites.

A few things I can do:

* Help scale your rails app, find bottlenecks, improve performance.

* Maintain or update an existing app. I’m comfortable diving into large codebases and other peoples code.

* Build your MVP. You’ll get a working, reliable, well-tested first version of your app.

Other non-rails stuff:

* Clojure. This is my current “fun” language and I’d love to work on a project that lets me use it full-time.

* Machine Learning (python and/or clojure). I have a background in machine learning and I’ve worked on a few projects that have a ML component.

Here are some testimonials from past clients:

http://www.windmill.ie/roadmapping-session/

Some other links:

Blog: http://www.aidanf.net

Github: http://github.com/aidanf

Twitter: http://twitter.com/@aidanf

Drop me an email at aidan at aidanf dot net.

Page 1 of 4Next →