Mar. 1st, 2023

juan_gandhi: (Default)
 Слушаю всякий музончик по ютьюбу (да, и про Любу тоже), и удивляюсь.

Откуда в России столько уголовников? Это след Гулага, или что вообще? При царе, конечно, тоже были всякие там каторжники, но они как-то не особо светились.

Статистику преступлений нет смысла сравнивать - что в Норвегии или Японии преступление, то в Тунисе или в Бангладеше справедливая месть за поруганную честь. Так что давайте без статистики.

Конечно, я слышал, что в США очень много людей по тюрьмам сидят, и согласен, что распространителей марихуаны нужно выпустить и выплатить им компенсацию - но есть же и настоящие преступники. Но они или в тюрьме, или тихарятся. А в России празднуют.

(Мурка вообще заебала в этом потоке музончика. И вот эти вот все хари. Брр.)

Но почему, почему? 

P.S. (2025) Теперь-то мы знаем. Это общее качество населения.

dybr

Mar. 1st, 2023 10:51 pm
juan_gandhi: (Default)
 Oh, I was working all day and just finished it (pushing my shit to github).

What was going on: Postgres, handled via Slick, was hanging on certain operations. Giving it 15 seconds or something did not help. More, psql was hanging on connection. Meaning that connections were interfering. Really not my area of expertise, yet. Safa was supposed to be helpful, but well.

Anyway, now I know what happened.

Slick, when you call it, returns you a future. If you don't want to wait (why should you), you "chain it" with the next future. But the fucking truth is that it's a Scala Future. It launches right away. Which is not what I want to have, I want it start after the first one is finished, there's a dependency.

So, one solution would be to concatenate all those sqls in one big chunk, and execute; another would be to remember what I knew about Scala Futures and chain them properly. The third solution would be to use ZIO.

But wait, I can't seriously expect something different from Slick, it just returns you a launched future. I'll have to chain them via "onComplete".

Vaguely I remember dealing with this shit eons ago, no I have to fix it. Why would a promise help, I don't see. Oh, whatever. Tomorrow.

An alternative would be just use a regular CPS, since that's how it works. Not creating a future before the previous one started. That would be the sanest solution.
 

Profile

juan_gandhi: (Default)
Juan-Carlos Gandhi

December 2025

S M T W T F S
  12 3 4 56
7 8910111213
14151617181920
21222324252627
28293031   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Dec. 9th, 2025 08:30 am
Powered by Dreamwidth Studios