Better HN
topnewbestaskshowjobs
Log inSign up

eugene-khyst

186 karma · joined Oct 25, 2023 (3y ago) · 37 submissions

Submissions

1.

Show HN: I made a free painting assistant web app – ArtistAssistApp(artistassistapp.com ↗)

1 points · by eugene-khyst · 2y ago · discuss

comment 3y ago · link · parent

Great idea. I've thought to do LaTeX to PDF resume tool. But YAML to PDF is much better. The only feature I miss, is possibility to convert YAML to PDF from CLI (globally installed npm package, or Docker image). This way, it will be possible to have YAML in GitHub repository and export it to PDF on each modification using GitHub Actions. Then up to date PDF resume will always be available on GitHub.

comment 3y ago · link · parent

plpgsql is good language. But in my experience Java and .NET developers tend to choose solutions that do not use plpgsql, PL/SQL, T-SQL. And these developers is the main audience for the project.

comment 3y ago · link · parent

Thanks for suggestions. I will add @Transactional(readOnly = true) annotation. I will mention in the README the possibility of using two data sources.

comment 3y ago · link · parent

I can definitely recommend EventStoreDB. I used it in production and most colleagues like this DB. I have a sample Java Spring Boot + EventStoreDB project <https://github.com/eugene-khyst/eventstoredb-event-sourcing>.

comment 3y ago · link · parent

Here is the code <https://github.com/eugene-khyst/postgresql-event-sourcing/bl...>

comment 3y ago · link · parent

Yes, Debezium is an implementation of the Transaction log tailing pattern an alternative to Transactional outbox pattern.

comment 3y ago · link · parent

Thanks for sharing.

> My linked code works with involving the MVCC snapshot's xip_list as well, to avoid this gotcha.

I will definitely take a look. It would be great to fix this problem. This problem really concerns me, although in most cases it is not critical.

comment 3y ago · link · parent

The "little trick" in the Citus approach is very inventive. SHARE ROW EXCLUSIVE mode protects a table against concurrent data changes, and is self-exclusive so that only one session can hold it at a time. Thus, when such lock is obtained, we can be sure that there are no more pending transactions with uncommited changes. It's a protection from loosing data of the pending transactions. Throwing the exception immediately releases the lock. Thus, the exclusive table lock is held for milliseconds. I like the general idea, but I don't want to add plpgsql functions/procedures. I'll see if this can be elegantly implemented in Java+SQL (without plpgsql) and perhaps add it as alternative approach to my project. Such approach may be even more effective because it focuses on a single table and not on all transactions like the one described in my project, thus, locks on irrelevant tables have no effect on event handlers. Thanks for sharing.

comment 3y ago · link · parent

Thanks for noticing. I will add Apache License 2.0.

comment 3y ago · link · parent

I tried to evaluate Kafka usage for event sourcing: <https://github.com/eugene-khyst/ksqldb-event-souring>. More out of curiosity. But never tried it in production.

comment 3y ago · link · parent

No doubt audit tables are a popular alternative to event sourcing. But if the current state and changes history of the entity are stored in different tables, someone may say: "Prove me that your audit log is correct". Because you are not using audit table for the business logic, you may not immediately notice the problem with it that corrupts the audit log. Event Sourcing provides other advantages, not only audit log. For example, a service command typically needs to create/update/delete aggregates in the DB (JDBC/R2DBC) and send messages to a Kafka. Without using the two-phase commit (2PC), sending a message in the middle of a transaction is not reliable. There is no guarantee that the transaction will commit. With Event Sourcing you have to subscribe to the event and send the message to Kafka from listener. The delivery guarantee is "at least once". Anyway, there is a demand for Event Sourcing on the market

comment 3y ago · link · parent

The illustrations are made with PlantUML.

comment 3y ago · link · parent

Great idea. But I tried it on two photos, and the cartoon avatars generated don't look anything like the people in those photos.

15.

Show HN: Light implementation of Event Sourcing using PostgreSQL as event store(github.com ↗)

231 points · by eugene-khyst · 3y ago · 47 comments

16.

Show HN: Nginx and Let's Encrypt in 3 minutes using Docker Compose and CLI tool(github.com ↗)

3 points · by eugene-khyst · 3y ago · discuss

comment 3y ago · link · parent

I've just recorded a video tutorial on using color mixing and palette without photos <https://youtu.be/fmQO177shoQ?feature=shared>.

comment 3y ago · link · parent

I've just added 3 sample photos, so people can play with the app without uploading anything.

comment 3y ago · link · parent

I've just added acrylic paints to the ArtistAssistApp.

comment 3y ago · link · parent

Thanks! I'm not sure that realistic color mixing or tonal value sketch can be improved in any way by AI. It's a pure math. A math models can be improved. For example, in color mixing instead of relying on sRGB color space which has limited color gamut, adopt CIE LAB color space. Paint reflectance charts can be measured with higher precision. Probably, with the help of AI simplified sketch can be done. But I'm not sure that the simplified sketch made with AI will be better than the one made by applying the median blur.

comment 3y ago · link · parent

These are really great features but they are not easy to implement. Sometimes I take a photo of my painting and convert to greyscale to compare with the reference tonal values. Automating this process will be very useful. Thanks for sharing this.

comment 3y ago · link · parent

Sounds fantastic. Here is the relevant source code on GitHub: <https://github.com/eugene-khyst/artistassistapp/blob/main/sr...> and reflectance chart visualization demo on YouTube <https://youtu.be/jC1HAeegm2I?feature=shared&t=157>.

comment 3y ago · link · parent

The app doesn't use AI. Just good old math.

comment 3y ago · link · parent

I don't have an iPhone to check it myself. But zooming works in Safari on Mac. Do you try to zoom a photo on the Colors tab using pinch?

comment 3y ago · link · parent

Glad to hear that. I launched the app on the right time.

comment 3y ago · link · parent

The source code is available on GitHub. You can use it as an inspiration. Also, feel free to contribute to improve something in the app.

comment 3y ago · link · parent

BTW it's possible to see the "Reflectance chart". It shows reflectance curves of the paints and the mix. Here is a demo video on YouTube: <https://youtu.be/jC1HAeegm2I?feature=shared&t=157>.

comment 3y ago · link · parent

I am very pleased to hear that.

comment 3y ago · link · parent

Thanks for the idea. I will think how to implement it.

comment 3y ago · link · parent

The resulting color of a paint mix is a weighted geometric mean of the paints' reflectance curves. The code is available on GitHub: <https://github.com/eugene-khyst/artistassistapp/blob/main/sr...>.
12