HNHacker News
TopNewBestAskShowJobs

fforflo

3,497 karma · joined August 13, 2015

Data & AI Tools - Postgres - Python

tselai.com

submissionscomments
fforflo··on Llama-Scan: Convert PDFs to Text W Local LLMs
If you're interested in this sort of thing with an SQL flavor, you may find the pgpdf PostgreSQL extension useful https://github.com/Florents-Tselai/pgpdf .

It's basically an SQL wrapper around poppler.

fforflo··on Open Source Projects Receive Funding to Reclaim the Public Internet
Except for the fact that big consultancies who receive most of the government contracts, have zero contribution to the open source ecosystem.
fforflo··on Pope Francis has died
Technically yes, but they're used interchangeably nowdays. Plus, the official transcript mentions "Mytilene" so I wanted to follow that. Although I use Lesvos myself.
fforflo··on Pope Francis has died
In 2021, during a visit to the Greek island of Mytilene, Pope Francis delivered one of the finest speeches I've ever read:

> This great basin of water, the cradle of so many civilizations, now looks like a mirror of death. Let us not let our sea (mare nostrum) be transformed into a desolate sea of death (mare mortuum). Let us not allow this place of encounter to become a theatre of conflict. Let us not permit this “sea of memories” to be transformed into a “sea of forgetfulness”. Please brothers and sisters, let us stop this shipwreck of civilization!

> We are in the age of walls and barbed wire. To be sure, we can appreciate people’s fears and insecurities, the difficulties and dangers involved, and the general sense of fatigue and frustration, exacerbated by the economic and pandemic crises. Yet problems are not resolved and coexistence improved by building walls higher, but by joining forces to care for others according to the concrete possibilities of each and in respect for the law, always giving primacy to the inalienable value of the life of every human being

Worth reading in full https://www.vatican.va/content/francesco/en/speeches/2021/de...

fforflo··on Show HN: I built an AI that turns GitHub codebases into easy tutorials
With $GEMINI_MODE=gemini-2.0-flash I also got some decent results for libraries like simonw/llm and pgcli.

You can tell that because simonw writes quite heavily-documented code an the logic is pretty straightforward, it helps the model a lot!

https://github.com/Florents-Tselai/Tutorial-Codebase-Knowled...

https://github.com/Florents-Tselai/Tutorial-Codebase-Knowled...

fforflo··on Show HN: I built an AI that turns GitHub codebases into easy tutorials
It's decent enough. But you'd probably have to use a model like llama2, which may set your GPU on fire.
fforflo··on Show HN: I built an AI that turns GitHub codebases into easy tutorials
If you want to use Ollama to run local models, here’s a simple example:

from ollama import chat, ChatResponse

def call_llm(prompt, use_cache: bool = True, model="phi4") -> str: response: ChatResponse = chat( model=model, messages=[{ 'role': 'user', 'content': prompt, }] ) return response.message.content

fforflo··on Hunter-gatherer sea voyages extended to remotest Mediterranean islands
It's also exciting that their code to actually reproduce these is also available. https://github.com/wccarleton/mesoneomalta
fforflo··on Ask HN: What are you working on? (March 2025)
I'm working on spat https://github.com/Florents-Tselai/spat a Postgres extension.

spat is a Redis-like in-memory data structure server embedded in Postgres. Data is stored in Postgres shared memory. The data model is key-value. Keys are strings, but values can be strings, lists, sets, or hashes.

It's still alpha, but it works.

fforflo··on The Gang of Four is wrong and you don't understand delegation (2012)
I tend to agree. The OOP-all-the-things mantra created many problems; lots of books were printed (more than necessary), and lots of evangelists made their name on unnecessary abstractions over abstractions. One might blame Java for that, but it's a chicken-and-egg problem.
fforflo··on Stoop Coffee: A simple idea transformed my neighborhood
The "New World" is re-discovering what the Balkans / Southern Europe have been doing for decades.
fforflo··on Ask HN: What is the simplest data orchestration tool you've worked with?
Makefile with make2graph to visualize DAGs.
fforflo··on Boston Dynamics shows off another major leap in humanoid mobility
Whenever I read something about Boston Dynamics now, I can't help but remember that scene from Silicon Valley (HBO) where Eric kicks BigDog https://www.youtube.com/watch?v=BFnMBW95RZI
fforflo··on Removing nulls from JSON arrays – coming in PostgreSQL 18
PostgreSQL 18 won't have many JSON enhancements - how much better can it get after all? And virtual generated columns will probably be the highlight of the release. But there's always some room for improvement. One long-standing pain point has been simply removing nulls from JSON arrays.
fforflo··on Coming in PostgreSQL 18 – Removing null array elements
Here's a small patch that addresses a very common question in Postgres: "How do I remove nulls from a jsonb array?"
fforflo··on Xata Agent: AI agent expert in PostgreSQL
Of course, there are, but I guess this relies on the various System views (pg_*), like most monitoring tools, which have fine-grained control access if you create appropriate roles.
fforflo··on The Internals of PostgreSQL
Apart from the usual advice to "start working on a patch to learn the internals," which is not as easy to do because it's a mature product and most of the low-hanging fruits have been reaped, I'd also suggest checking the extensions shipped with the main source tree under $top/contrib. Each one is self-contained and usually works with a subset of the internals. Some good ones: pageinspect, pg_buffercache, pg_prewarm, pg_statstatements, pg_walinspect
fforflo··on The Internals of PostgreSQL
Parent probably means that email clients don't send the attachments (patches) with the appropriate content type (i.e. text/x-patch or text/x-diff) but use application/octet-stream.
fforflo··on Ask HN: Where are the good Markdown to PDF tools (that meet these requirements)?
Does converting to HTML first and then to PDF help?
fforflo··on SQL pipe syntax available in public preview in BigQuery
I'm all for such an approach, but I also like Firebolt's approach with Lambda functions focusing on arrays. [0]

[0] https://www.firebolt.io/blog/sql-thinking-in-lambdas

fforflo··on How about trailing commas in SQL?
That's not that easy to enforce in a system like Postgres. If you ship something you have to stay with it for many years. Thus, all possible angles have to be taken into consideration.
fforflo··on Open Euro LLM: Open LLMs for Transparent AI in Europe
In the EU, we need some social contracts for those things. Multiple EU-funded projects are launched, consortiums between Unis and Private sector companies are created, deliverables are delivered, and grants are allocated, but the cumulative results haven't been that great, have they? That has happened for every "trend," from nuclear physics to "expert systems" in the 1990s to green tech, now AI, etc.
fforflo··on Xi (ξ) Correlation Coefficient in Postgres
pgxicor is a Postgres extension that exposes a SELECT xicor(X, Y) aggregate function. XI can detect functional relationships between X and Y. You can use it as a more powerful alternative to standard corr(X, Y) which works best on linear relationships only.
fforflo··on Bunkers in Albania
Another Albanian thing worth mentioning is an extensive list of oil wells dispersed across residential areas see [0]. Family legend has it that my father almost drowned in one [1] when he was a kid, and a relative had to pull him by his nose to save him.

[0] https://en.wikipedia.org/wiki/List_of_oil_and_gas_fields_in_...

[1] https://en.wikipedia.org/wiki/Visoka_oil_field

fforflo··on Bunkers in Albania
Shameless plug (who would have thought): I've played hide and seek in Albania and used a bunker as a hideout. AMA :D That's one of the few experiences I remember when I was 3-5yo.
fforflo··on Databases in 2024: A Year in Review
I've been working on something Redis-y over the holidays, and it has reinforced my view that it's the epitome of a 20%- 80% tool. I've always used the 20%, but anything beyond that sounds useless unless you've encountered the requirement in a production environment. The challenges Redis has been solving for years, never really touched the research/academic community (even the 20%).

Even in the various taxonomies of DBS in the research literature, Redis was mentioned with a wave of the hand as an "in-memory" database, which undersells the important (for me) part of the "data structure" server.

Putting the "database" after Redis could be a marketing misstep. Because it puts you in the is-it-sql territory.

TL;DR: Redis is mostly appreciated by practitioners (web) developers. Academics find it lacking a theoretical foundation, so... meh.

fforflo··on Where can you go in Europe by train in 8h?
People living in central/western Europe: You have no idea how fortunate you are to be able to hop on a train and ride to another major city in a few hours. We mortals of the southeastern Europe feel detached from the rest of the world.

Yeah, I know German trains occasionally are late, but I remember standing on the platform in Munich, envying those who could travel to Madrid or Brussels without going to the airport—security checks, yada.

fforflo··on Cognitive load is what matters
Congrats on your PhD at Stanford, but some humility has to be part of the scientific process for sure. It looks like a lot of folks called "programmers" agree with the points in the post. If it's such a common experience that should tell you something about the state of affairs.

It's a blog post on the internet. Of course one should take it with a grain of salt. The same applies to any peer-reviewed article on software engineering for example.

Just yesterday, I was watching this interview with Adam Frank [0] one of the parts that stood out was his saying why "Why Science Cannot Ignore Human Experience" (I can't find the exact snippet, but apparently he has a book with the same title.

[0] https://www.youtube.com/watch?v=yhZAXXI83-4

fforflo··on 20 years of Google Scholar
Haha,that, or it's a validation of the blowup.
fforflo··on Creating a QR Code step by step
Plug: Now that you know how they work, you can use them in your SQL queries too https://github.com/Florents-Tselai/pgQR
Page 1 of 5Next →