HN user

pykello

7,258 karma
Posts422
Comments24
View on HN
www.imo-official.org 8h ago

IMO 2026 Results

pykello
3pts0
www.imo2026.com 2d ago

International Math Olympiad 2026 Results

pykello
2pts0
www.quantamagazine.org 3d ago

Inside the Secret Math Society Known Simply as Nicolas Bourbaki

pykello
20pts7
www.quantamagazine.org 4d ago

The Secret Math Society Known Simply as Nicolas Bourbaki

pykello
2pts0
github.com 7d ago

Baml: The Programming Language for Agents

pykello
8pts5
terrytao.wordpress.com 29d ago

Advice on Gifted Education

pykello
3pts2
github.com 1mo ago

last30days-skill

pykello
2pts0
www.lesswrong.com 2mo ago

The Iliad Intensive Course Materials

pykello
1pts0
projects.ollybritton.com 2mo ago

MathScroll: Infinitely Scroll Mathematics

pykello
2pts0
github.com 5mo ago

Ubiblk: A vhost-user-blk backend for VMs

pykello
2pts0
en.wikipedia.org 6mo ago

2026 Internet Blackout in Iran

pykello
4pts1
lwn.net 6mo ago

Toward a policy for ML tools in kernel development

pykello
1pts0
www.quantamagazine.org 6mo ago

The Year in Computer Science

pykello
1pts0
www.quantamagazine.org 6mo ago

The Year in Computer Science

pykello
1pts0
lwn.net 6mo ago

Calibre adds AI "discussion" feature

pykello
27pts32
www.quantamagazine.org 7mo ago

The Year in Physics

pykello
2pts0
www.youtube.com 7mo ago

The Biggest Breakthroughs in Mathematics: 2025 [video]

pykello
2pts0
lwn.net 7mo ago

Eventual Rust in CPython

pykello
1pts0
www.thoughtworks.com 7mo ago

Technology Radar

pykello
1pts0
sekrit.de 7mo ago

A beginners' guide away from scanf()

pykello
2pts1
old.reddit.com 7mo ago

I wasted 6 months "building systems". I should've recorded myself do the work

pykello
2pts0
lwn.net 7mo ago

Pouring Packages with Homebrew

pykello
3pts0
github.com 7mo ago

PatchworkOS: An OS for x86_64, built from scratch in C and assembly

pykello
54pts3
betterexplained.com 7mo ago

An Interactive Guide to the Fourier Transform

pykello
252pts60
nima101.github.io 7mo ago

Building Ads Optimization

pykello
1pts3
mostafa.dev 8mo ago

Detection as Code

pykello
3pts0
www.hudsonrivertrading.com 8mo ago

Low Latency Optimization: Understanding Huge Pages (Part 1)

pykello
4pts0
github.com 8mo ago

Snake in Bpftrace

pykello
1pts0
lwn.net 8mo ago

Explicit Lazy Imports for Python

pykello
3pts0
lwn.net 8mo ago

Git considers SHA-256, Rust, LLMs, and more

pykello
3pts0

(I am not affiliated with Keebo, although I had a recruiting meeting with them earlier this year)

FWIW, Keebo (https://keebo.ai/) tries to solve this problem & reduce your Snowflake bill by using Data Learning techniques. It can be configured to return exact results or approximate results.

Ex-Citus here. The open sourced shard rebalancer blocks writes to the shard being moved. Online rebalancer (closed source) uses logical replication and doesn't block writes to shards being moved, except for a brief period. Everything is the same except how shard moves are implemented.

Citus Data | Software Engineer | Waterloo, ON, Canada / San Francisco, US / Amsterdam, Netherlands | Full-Time Onsite | https://www.citusdata.com/jobs/

We're looking for software engineers on the database development team which is responsible for development of the Citus extension and related tools, and providing custom solutions for customers. Programming is done primarily in C, but without all the usual messiness thanks to Postgres' elegant internal APIs. We also build tools to help customers in whichever language is appropriate. If you're interested in working on distributed SQL, high availability, distributed transactions, seamless scale out, and other parts of a distributed database, and you're excited about working in a distributed organisations with engineers from companies like Amazon/Heroku/Google/Uber then Citus might be the place for you.

To see our other positions visit: https://www.citusdata.com/jobs/

Apply by sending your resume to hadi@citusdata.com or imagine@citusdata.com.

I think use-case for Google Cloud SQL, RDS, Heroku, etc is a bit different from Citus and other distributed databases. It seems that Cloud SQL has very limited scalibility (32 processors, 200GB of RAM), so it might not be very good at usecases that your working dataset is in order of terabytes or more. Citus on the other hand has horizontal scalability and you can add more CPU power and RAM by adding another machine to your machines.

If my data were at order of 10GBs, I would choose Cloud SQL, RDS, etc. At order of 100GBs, I would try both Cloud SQL, RDS, etc. and Citus, etc. to see which one fits my usecase. At order of terabytes, I would choose Citus or some other distributed database.

(I'm a former Citus employee and Current Googler in a non-Cloud SQL team)

(As someone who was pretty familiar with PgSQL internals)

1. I think from the 'storage' point of view, a column-store will use much less space than a collection of key/value PgSQL tables:

A) Each PgSQL table comes with several system columns, so each key/value pair will have the large overhead of (key-size + system column size), which will most likely be larger than the actual size of data. This will defeat one of the goals of columnar stores which is to load less data in-memory (to achieve less disk I/O, assuming more frequent columns will get eventually cached), unless you have so many columns and use only very few of them.

B) PostgreSQL doesn't compress each column. Column-stores usually use some kind of light-weight compression to use less disk. When I worked on cstore_fdw, this was one of the desirable features that attracted users.

2. I haven't done PostgreSQL benchmarking in last ~10 months, but unless selectivity of your query is high, fastest of joins won't be even close to a sequential table scan. If the selectivity is low and your query only needs to scan small sub-set of rows, then joins+indexes should be faster, but then again you have overhead of indexes.

One method I found useful in PostgreSQL is to create an index of columns of very frequent queries, and then tune the system to use index-only-scan for these queries.

Haskell Skyline 11 years ago

Just to make sure, are you referring to bucket sort and similar algorithms or something else?

Haskell Skyline 11 years ago

"foldl" works like aggregation in databases. When you say "fold func init values", the result is calculated as:

  result = init
  for value in values:
     result = func(result, value)
  return result
So, "foldl add_endpoints [] bs" will translate to:
  result = []
  for (x1, h, x2) in bs:
     result = add_endpoints(result, (x1, h, x2))
  return result
If you expand the 3rd line, you get:
  result = []
  for (x1, h, x2) in bs:
     result = result ++ [(x1, height x1), (x2, height x2)]
  return result
where "++" is the list concatenation, and "height x" is a function which finds the skyline height by finding the tallest building with "x1 <= x && x < x2".

I think the 2nd solution should be easy to understand if you understand the 1st solution. Probably the only new thing is that I've sorted the buildings by height before passing them to "foldl".

In the 3rd solution, the following lines:

  skyline bs = (skyline (take n bs), 0) `merge` (skyline (drop n bs), 0)
                where n = (length bs) `div` 2
mean:
  first_half = first_n_elements(bs, length(bs) / 2)
  second_half = remove_first_n_elements(bs, length(bs) / 2)
  result = merge ((skyline(first_half), 0), (skyline(second_half), 0))
You may wonder what are those 0s? In the merge function I need to keep track of current height of each half, and the initial height of left and right skylines are 0.

Then, in merge function:

  merge ([], _) (ys, _) = ys
  merge (xs, _) ([], _) = xs
means return the other list if any of the lists become empty. The underscores mean a variable whose value is not important for us. We don't care about the current height values here, so I've put _'s instead of real names.

Then the other cases:

  merge ((x, xh):xs, xh_p) ((y, yh):ys, yh_p)
    | x > y = merge ((y, yh):ys, yh_p) ((x, xh):xs, xh_p)
    | x == y = (x, max xh yh) : merge (xs, xh) (ys, yh)
    | max xh_p yh_p /= max xh yh_p = (x, max xh yh_p) : merge (xs, xh) ((y, yh):ys, yh_p)
    | otherwise = merge (xs, xh) ((y, yh):ys, yh_p)
First case, "x > y" simply swaps the two args. This ensures that in the following cases we have x <= y.

Second case is probably easy to understand.

In third case, we know that x < y. Just before reaching x, skyline has height "max xh_p yh_p". When we reach x, height of skyline changes to "max xh yh_p". If these values are not equal, we have a height change. So we a construct a new list with head "(x, new height)" and the result of merging the rest of skylines.

If the height doesn't change, we just ignore the change at x and continue with the rest of skylines.

The problem with tech entrepreneurship in Iran is that US sanctions disable iranians to have business with the rest of the world. Most of online payment methods are blocked in Iran, and I think most companies are not allowed to have business with Iranians.

I didn't try to participate in olympiads, but I started participating in competitions when I was 20. I practiced for ACM ICPC for 3 years, which was arguably my most enjoyable days in my life.

I stopped participating in programming competitions when I was about 24. But now I am 27 and I have started doing them again. I am not as strong as I was (or even close to it), but I am aiming to become strong again. One of my goals is to qualify to the GCJ finals next year (this year I was in Round 3, but couldn't make it to finals).

Joy of solving problems is the greatest joy I've ever experienced.