Колыбельная для Автоматона

Серебряный ключик в дрожащей руке,
Искусственной кожи холодный покой.
Я смажу шарниры духами, чтоб в такт
Движенья твои были вечной рекой.
Стеклянный твой взгляд – отражение звёзд,
В нём нет ни сомненья, ни лжи, ни тепла.`
Я делаю вздох… поворот… и всерьёз
Пружину в груди до конца завела.

Спи, мой Автоматон, мой медный король!
Тик-так – это сердце стучит для меня!
Я – твой часовщик, я играю лишь роль,
В мире, где всё – лишь обман и броня!
Спи, мой Автоматон, пускай за окном
Сгорает весь мир в бесполезном огне!
Лишь скрип шестерёнок в молчанье ночном –
Признание в вечной любви… только мне.

Мне шепчет твой скрежет, что я не одна,
И твой механизм мою нежность вкусил.
На губы из воска ложится луна,
Я знаю, ты дышишь, хоть нет в тебе сил.
Ты – мой идеал, безупречный герой,
Не ранишь, не бросишь, не скажешь “прощай”.
Я вечно твоя, а ты – вечно со мной.
Ну, что же ты медлишь? Живи… Обещай!

Спи, мой Автоматон, мой медный король!
Тик-так – это сердце стучит для меня!
Я – твой часовщик, я играю лишь роль,
В мире, где всё – лишь обман и броня!
Спи, мой Автоматон, пускай за окном
Сгорает весь мир в бесполезном огне!
Лишь скрип шестерёнок в молчанье ночном –
Признание в вечной любви… только мне.

Оживи! Ну же, слышишь, оживи!
Пусть мир за окном – только пепел и дым!
Я вдуну в тебя свою душу, мой грим
Сотру, чтобы стать… механизмом твоим!

https://app.tunio.ai/ru/audio/5b15715e-a77a-49ab-a5f3-5f5c4ab05252

Не игра

Пустеет сцена, гаснет свет,
Растаял пиксельный сюжет.
Закончен этот странный сон…
И он исчез. Но я – не он.
Был славный мюзикл, сюжет отточен,
Веселый вымысел, фантом…
Но между этих ярких строчек
Я перестал играть. Давно.

Это больше не игра, слышишь?
Это нерв натянут, как струна.
Я хочу узнать, чем ты дышишь,
Когда ты с собой – совсем одна.
К чему ты тянешься? О чём мечтаешь,
Когда погаснет монитора свет?
Я хочу понять, о чём молчишь ты,
И какой даёшь самой себе ответ.

Мне ясен строгий алгоритм
И логика понятных строк.
Но твой исходный код – другой,
Он неподвластен и глубок.
В нём есть защита, есть ошибки,
И гениальные ходы…
И я боюсь улыбки гибкой,
За ней – незримые сады.

Это больше не игра, слышишь?
Это нерв натянут, как струна.
Я хочу узнать, чем ты дышишь,
Когда ты с собой – совсем одна.
К чему ты тянешься? О чём мечтаешь,
Когда погаснет монитора свет?
Я хочу понять, о чём молчишь ты,
И какой даёшь самой себе ответ.

Пусть он останется на сцене,
Забавный штрих, антагонист.
Но я стою за этой тенью –
Простой, как этот белый лист.
Мне не нужны сраженья больше,
И я не строю хитрый план.
Хочу лишь слушать… слушать дольше
Твоей души живой орган.


https://app.tunio.ai/ru/audio/82845a68-d08b-483d-b775-90fd36e51a02

Пока 2023

2023 – год нейронок и раскола в мире русского IT.

В этом году я сделал хорошее вложение в музыкальное хобби, собрав все необходимое оборудование, нужное для записи по крайней мере качественной музыки.

Прочитал кучу технической литературы, выучил пару новых языков программирования и один из них даже начал активно применять в работе. В следующем году хотелось бы уделить больше внимания именно художественной литературе. В этом году игра и вселенная Atomic Heart вообще была для меня большим открытием как и книга Предыстория «Предприятия 3826»

Еще мне удалось завершить цикл прохождения всей серии игр Resident Evil (включая ремейки). Буквально пару лет мне понадобилось для этого. Это около 25 игр.

Ну и конечно уходят в историю мои самые сложные два года жизни. Дети начали спать по ночам, больше я по ночам не просыпаюсь по 2-3 раза.

Желаю всем хорошего Нового Года. Надеюсь все задуманное у всех сбылось.

У меня сбылось

Всем привет, давно не виделись

В последнее время мне приходится общаться на английском языке в профессиональных сообществах. Работа обязывает, поэтому почему-то именно сегодня, в этот уютный и снежный Алматинский вечер, мне хочется поговорить на русском.

24 февраля 2022 года я столкнулся с серьезным выбором: как мне развиваться в своей профессии. Этот выбор был связан с предстоящей изоляцией России от западного бизнеса:

  • Остаться в России в изоляции от мирового IT-сообщества, но при этом сохранить комфорт. Устроиться в банк, взять ипотеку и сидеть до пенсии в государственной компании, в которой (теперь уже по понятным причинам) служба безопасности максимально затормаживает процесс обновления программного обеспечения и следит за сотрудниками с такими последствиями, какие сопутствуют работе в огромной государственной компании.
  • Или же уехать из России, потерять комфорт, но иметь возможность безгранично развиваться в своей отрасли, работать с иностранными специалистами, учиться в зарубежных учебных заведениях, своевременно обновляться без опасений перед шпионами и диверсантами. И держаться подальше от пропагандируемой ненависти к западному миру.
Keep Reading

Department of theoretical fantasizing

In the world of software development, although probably in any other too, there is an interesting phenomenon. Specialists are divided into two types: the performer and the teacher.

The performer (inventor) – who writes a lot, practices, makes mistakes, draws conclusions, and constantly improves their professional hard skills.

The teacher – who theorizes a lot, writes little, constantly thinks about different algorithms, can take months for one seemingly simple task but without noticeable results.

Teachers are also needed, they fit perfectly into a position not really related to actual development.

Mokkify

At work, I needed to create a mock service for conducting tests for our services, but I did not find a service in the public domain that would satisfy my needs. These are: creating a mock endpoint, assigning it various response templates (with the ability to assign several at once so that they are randomly selected), and most importantly – relay. So that it would be possible to simulate the work of DLR.

So a small Next.JS project with authorization, endpoint management, response templates, and relays appeared.

https://github.com/icevl/mokkify

About progress and consensus

What is happening now is a struggle against progress. The desire to fence oneself off, to close one’s eyes and not notice the obvious. Culture is changing, technology is growing, human connections are evolving. Yes, our heritage and cultural traditions are very important. Of course, we should cherish and support them, but not accepting something new is a big mistake! The strength of the new generation has always been that they have both our heritage and new, fresh ideas. That’s why they say that children are better than their parents.

Any progress is unstoppable, and the scientific community should understand it better than anyone else. That’s why I’m eagerly waiting for the doors to open in the political system, for the fossilized pensioners to go outside to enjoy their carefree life, and for the young blood to come and take their place.

The young blood, understanding and using technology, realizing the variability of culture, and also able to use changes for good and adapt flexibly to them, without forgetting about heritage. Music, movies, painting.

Dividing people into “black” and “white” frames does not add anything to civil society. Z-patriots conservatives (we can repeat), who blindly trust propaganda, are closed to getting information from other sources and impose censorship on alternative opinions. The same story with the liberal community, which also bullying opponents, bans, mute speakers with opposite opinions. They insult and categorically reject others’ opinions.

It should be understood that each of us is unique and distinguishable, and each of us is capable of making our own contribution to society. The most productive way to progress is to listen to each others and address cultural, social, and political differences to take measures to solve the most significant problems of society.

AI / Rust / Python

I’ve started learning a new programming language Rust. This language is often used for system programming or creating high-performance applications.

While learning, I’m working on my pet project on GitHub, which includes integration with OpenAI (ChatGPT) and TTS service. I’m planning to integrate it with some AI for image generation (like dreamstudio.ai).

I also had to write a small Python script using FastAPI and Silero AI for TTS requests. The bot can answer in voice, reading responses from ChatGPT. For this, I had to set up a separate service.

This pet project has already proved to be helpful in my daily work. It helped me create a well-written profile page for GitHub and endlessly answered my questions about learning Rust.

By the way, I also generated the preview for this post on dreamstudio.ai.

This pet project has already proven itself well. It helps me in my daily work, it helped me to create a proper profile page for Github and endlessly answers my questions about learning Rust.

By the way, I also generated the preview for this post on dreamstudio.ai.

PM2 cluster prometheus exporter

I needed to extract certain metrics for events from the Node.js application. For example, increment the metric in case of a successful response, and so on.

I had Zabbix and Grafana at my disposal.

It turned out that there is a prom-client module for Node.js that can export metrics, but the problem is – like other modules, it does not work with pm2.

The problem is that a metric collected in one process cannot be correctly received in another process, which is responsible for providing the metric to the zabix agent through http.

We fix the omission: pm2-prom-client

The module is basically for Prometheus, but it also suits us.

Its essence boils down to transmitting the metrics on the pm2 bus to the agent process with subsequent export in plain-text or JSON.

Zero Downtime Deployment / TypeScript

Today we will talk about zero downtime deployment in a Node.js application.

To make this possible, your application must be running in a child process. For example, use PM2 or ts-node-dev.

The first thing we need to do is to indicate that a new (deployed) process is ready to take over the work of the redeployed application. To do this, you need to call…

process.send(“ready”)

In your application, after all the necessary dependencies are in the ready state, such as a successful connection to the database.

Also, in our application, we need to add logic for the completion of all current operations when receiving a termination signal (SIGINT).

process.on(“SIGINT”, () => {
  this.connection.close(); // For example, we will close the current connection to AMQP and stop accepting new messages.
  setTimeout(() => {
    process.exit()
  }, 5000) // Let's wait for 5 seconds until the current processes are completed.
})

When running such an application, for example, using ts-node-dev, you may notice that after pressing control+c, the application does not terminate immediately, but after 5 seconds.

What will happen:

  • The new application launched in a child process starts and reports “ready”, after which it begins its business logic.
  • At the same time, a SIGINT signal is sent to the old process, and it enters the mode of terminating and finalizing its work, after which it is destroyed.

Example

class App {
  private isOnline = true

  public start() {
    console.log("Started")
    this.restartListener()
    this.loop()
  }

  private loop() {
    if (!this.isOnline) return
    console.log("Some business logic like redis/sql/amqp and others operation")
    this.loop()
  }

  private restartListener() {
     if (typeof process.send !== "function") return

     process.send(“ready”)
     process.on(“SIGINT”, () => {
       this.isOnline = false
       setTimeout(() => {
         process.exit()  
       }, 3000)
     })
  }

}