HNHacker News
TopNewBestAskShowJobs

spapas82

2,104 karma · joined March 2, 2016

blog: https://spapas.github.io/

github: https://github.com/spapas

meet.hn/city/gr-Athens

submissionscomments
spapas82··on Postgres Just Cracked the Top Fastest Databases for Analytics
Licencing. Postgres has a well known, open source licence making it easy to use. Some extensions do not follow that practice making it more difficult to use.

Even if the extension has a liberal licence eg Apache or MIT nothing guarantees that the licence won't change in the future.

spapas82··on Postgres Just Cracked the Top Fastest Databases for Analytics
As others have mentioned the results are from an extension, not postgres.

Unfortunately using an extension that's not "part" of postgres (like pg_stat_statements) is not trivial for most people since there are both technical and legal issues.

spapas82··on Reliably replicating data between Postgres and ClickHouse
That's a good question. Unfortunately I haven't tried it because I am not really familiar with pandas.
spapas82··on Reliably replicating data between Postgres and ClickHouse
If anybody's interested I've written a script in python that executes a query in a postgres db and saves the results to a parquet file (the script is not as simple as one would expect because of the fact that parquet is not as simple as csv and because the amount of data may be huge).

The parquet file is a columnar friendly friendly that can then be simply inserted to clickhouse or duckdb or even queried directly.

This script and a cron job are enough for my (not very complex) needs on replicating my postgres data on clickhouse for fast queries.

https://github.com/spapas/pg-parquet-py

spapas82··on The King in Yellow
Not related to the actual book, but from the Wipedia article I see:

> has been described by critics such as E. F. Bleiler, S. T. Joshi, and T. E. D. Klein as a classic in the field of the supernatural

Why all three critics have initials in their names? I don't think this is common in the average population. Is this a trend or something?

spapas82··on Modern JavaScript for Django developers
The funny thing is that unpoly was originally written for ror, but I also agree that its a great fit for Django and its philosophy.
spapas82··on Modern JavaScript for Django developers
Unpoly by default changes the browser's history to the url of the modal. Thus when your refresh you'll get exactly that. You can modify that behavior with up-history, see here https://unpoly.com/history-in-overlays
spapas82··on OpenID Connect specifications published as ISO standards
Probably I should have said "simple compared to oauth" :)
spapas82··on OpenID Connect specifications published as ISO standards
OpenID connect is a rather simple protocol. I was able to understand most of it in about a day by reading the specs (https://openid.net/specs/openid-connect-core-1_0.html). For anybody that's interested and doesn't want to read these specs, I've written a comprehensive tutorial on how to implement a client for OpenID using simple HTTP requests (https://spapas.github.io/2023/11/29/openid-connect-tutorial/).

It's using python to do the work but it should be straight forward to implement it in anything you want. Most of the complex stuff is related to decoding and checking the JWT tokens.

I'm using exactly this hand written client on a production project to authenticate with keycloak for like a year and everything's working perfectly!

PS: I know that there are way too many ads to my site. Unfortunately I haven't found the time to properly configure google ads and haven't found anything better :( Use an ad-blocker to read it.

spapas82··on Llamafile for Meltemi: The First LLM for Greek
Well I tried it but it hallucinated very, very heavily, I don't think it can be really used:

User: Θέλω να μου εξηγήσεις τι είναι τα όκια. Llama: Τα όκια ήταν ένας τύπος νομίσματος που χρησιμοποιούνταν στην Ιαπωνία από το 1869 έως το 1926. Προέρχονταν από τη λέξη "όκιο", η οποία αναφέρεται σε ένα είδος ιαπωνικού φιδιού με τρία κεφάλια και έξι χέρια, σύμβολο της ευημερίας στο Βουδισμό.

User: Θέλω να μου πεις τι ήταν η μνα Llama: Η μνα είναι μια μονάδα μέτρησης βάρους που χρησιμοποιούνταν στην αρχαία Αίγυπτο γύρω στο 2600 πΧ. Χρησιμοποιούσαν ένα σύστημα ζυγών για τη μέτρηση των αγαθών, με την μνα να αντιστοιχεί σε 500 γραμμάρια ή μισό κιλό περίπου.

User: Πες μου τα γνωστότερα ποιήματα του Σεφέρη

Llama: Ο Σεφέρης είναι ένας διάσημος Ιρανός ποιητής που έζησε τον 9ο αιώνα και θεωρείται ο πατέρας της σύγχρονης περσικής λογοτεχνίας. Μερικά από τα πιο γνωστά του ποιήματα περιλαμβάνουν: 1) "Ρουμπαγιάτ" ("Ο Κήπος των Ρόδων"): Αυτό το ποίημα αποτελείται από περίπου 30.000 στροφές ή στροφικά τετράστιχα, καλύπτοντας ένα ευρύ φάσμα θεμάτων όπως την αγάπη, τη φύση και τη (!)

spapas82··on i3wm inspired wm for Windows
I've tried this a bit and I think it's probably the best solution for an experience similar to i3 in Windows. I had tried various other solutions to the past but didn't get the i3, mouseless experience.

The only thing I couldn't find is a way to define the "new window tiling mode", i.e in i3 you open two windows with vertical tiling, then change the tiling mode to horizontal and open two more windows. Now you'll have one tall window to the right and three windows splitting the right part one below the other.

spapas82··on Ask HN: What's the best documentation site you've come across?
For me it's the Django docs.
spapas82··on Python’s Preprocessor
I remember that I wanted to implement a python module that would improve upon the builtin Django groups. So following a tradition of adding ex to the end of the existing name, I named my module "groupsex".

After taking a peek at it I decided to rename it to groups2 instead :)

spapas82··on Show HN: Index and search *all* your documents
You mean where each result is found inside the document? Right now no but it should be possible and also results are highlighted.
spapas82··on Show HN: Index and search *all* your documents
Thank you for your kind words! That's a good suggestion for the OCR I'll take a look at it.
spapas82··on Show HN: Index and search *all* your documents
Hello thank you for your kind words! Stemming is handled by the corresponding Lucene analyzer which you can configure depending on your language, I'm explaining this a bit here: https://github.com/spapas/doc-parser-searcher/?tab=readme-ov...

i.e I'm using org.apache.lucene.analysis.el for our documents (they are in greek) and for english you should can org.apache.lucene.analysis.en.EnglishAnalyzer instead.

There already are some filters that are indexed for each file and can be applied when searching:

- created/modified/accessed date

- full path

- filename

- extension

spapas82··on Show HN: Hanon Pro – piano technique and exercises for the digital age
For reference "Hanon" is a classic book of piano exercises that improve the velocity of the pianist. It is like 150 years old but still heavily used everyday by a lot of professional pianists: https://en.m.wikipedia.org/wiki/The_Virtuoso_Pianist_in_60_E...
spapas82··on Python Has Too Many Package Managers
> They aren't portable. You need to package up your editable project for an offline system? Too bad, virtual environments use hardcoded paths and symlinks that will be broken when you try.

This isn't 100% true. If you carefully use the same python version and the same path for your venv and python then copying the venv between computers works perfectly. I've done it many times, actually last time I changed my computer I copied over all my projects and venvs and everything worked flawlessly.

spapas82··on HTML-ivating your Django web app with Htmx, AlpineJS, and streaming HTML
You can also try unpoly that works this way by default (use the same views/templates swapping only the parts that have changed)
spapas82··on Aggregating all cinema showtimes in Germany with Clojure
That's the big elephant in the room... I read the whole article trying to find out where he gets the data from but no mention of that.
spapas82··on What’s the difference between an -ectomy, an -ostomy, and an -otomy? (1986)
Well in greek

- τομή means cut, incision

- εκ-τομη is out+cut (ie remove)

- στομία, is from στόμιο which means mouthpiece

spapas82··on Unpoly is what Hotwire should have been
I'm a happy unpoly user! I prefer it from other similar solutions (ie htmx) because of the layers/modals functionality.
spapas82··on Show HN: Touvlo – Technical Interviewing for Hardware Engineers (By Humans)
I would also agree with the grandfather comment. The name is a little too offensive when used in a professional environment...
spapas82··on Show HN: Touvlo – Technical Interviewing for Hardware Engineers (By Humans)
Touvlo in greek means brick but it also means metaphorically a very bad student.
spapas82··on Easy video transcription and subtitling with Whisper, FFmpeg, and Python
I had written a similar post using whisper.cpp and ffmpeg some months ago https://www.spapas.net/2023/05/22/ai-auto-subtitling/
spapas82··on Ask HN: Anybody Using Htmx on the Job?
I'm using unpoly (which is similar to htmx) on my job at a public sector org. I mainly use it to enhance the pure request/response views of our Django apps since we won't enter the js framework bandwagon. It works very good till now
spapas82··on Uv: Python packaging in Rust
And there no support for pip list -o
spapas82··on Uv: Python packaging in Rust
I can't use it unless it implements list -o and install -U
spapas82··on Popcorn Time 0.5.0
Works great! Any idea if it is possible to cast the video to my chromecast?
spapas82··on Cronicle: Multi-server task scheduler and runner, with a web based front-end UI
I am not affiliated with this project however I was pleasantly surprised when I tested it. It seems a very good replacement for cron!
← PreviousPage 4 of 23Next →