не лёха

@starkow


i post useless stuff

не лёха

06 Aug, 19:34


i even added shoutbox to starkow.dev! any of your guys messages could pop up here. once it gets approved by me, of course :P all you have to do is to send a message through previously created letterbox!

не лёха

06 Aug, 10:26


a few days ago decided to opensource my starkow.dev website, sources can be found here. i'll appreciate it if you decided to give it a star!

не лёха

01 Aug, 14:59


also, if you've ever encountered a .ton website, but are not able to visit it via telegram for some reason, you can just append it to .ton.run or .ton.website like this:
winterfall.ton → winterfall.ton.run
winterfall.ton → winterfall.ton.website

не лёха

01 Aug, 14:49


in the latest telegram update it is now allowed to browse .ton domains right in the telegram app. i've been busy setting up my own winterfall.ton domain, and since it's not that easy to do, i've created a telegra.ph article which will guide you through all the necessary steps to achieve your own .ton website!

https://telegra.ph/how-to-setup-your-own-ton-domain-08-01

а для всех русских есть отдельная версия (если честно, ей я уделил больше внимания, чем английской ¯\_(ツ)_/¯): https://telegra.ph/kak-setapnut-svoj-ton-domen-08-01

не лёха

30 Jul, 16:20


noticed that the @/whisperbot (a bot that allows you to send a message in the group chat to a certain user) has been going through some shady shit with it's "hamster kombat" and "trading" titles, so i thought "why not create my own that wont have that obscure title at any time? and i did!

@sottovoxbot is a bot that simply is a whisperbot, but it's created by meeee, is simpler to comprehend and will be opensourced around today or so.

usage: type @sottovoxbot henlo my dear fren @starkow in the group chat and click the button that appeared. that simple!

messages have a ttl (time-to-live) of 3 hours, so after 3 hours your message will be deleted. i might update on that area later, but as for now it is what it is ¯\_(ツ)_/¯

не лёха

29 Jul, 17:55


recently got to use meilisearch — a search system that is just like elasticsearch, but for smaller data amounts and easier to get to and start using. used it in an environment of typescript (node.js) and a self-hosted instance of meilisearch

first of all, it's so much easier to set this whole thing up than i thought it would be. although, i need to say that the whole "second-ish database that is constantly indexed" thing is new to me, so i had to understand that. basically, all you have to do is to addDocuments into your index instance of the meilisearch (and update it every time any document is created/edited/deleted on the main database so both dbs are in sync), probably updateTypoTolerance so you can search and accept a few typos and then simply index.search('hello')!

const index = meilisearch.index('messages')

const messages = [
{ global_id: 1, chat_id: 10, message_id: 1, from: { user_id: 1, first_name: 'John', last_name: 'Doe' }, text: 'Hello world!' },
{ global_id: 2, chat_id: 10, message_id: 2, from: { user_id: 2, first_name: 'Jane', last_name: 'Doe' }, text: 'Hi!' },
{ global_id: 3, chat_id: 10, message_id: 3, from: { user_id: 1, first_name: 'John', last_name: 'Doe' }, text: 'How are you?' },
...
]

const response = await index.addDocuments(messages, {
primaryKey: 'global_id'
})

const response = await index.search('hello', {
attributesToSearchOn: ['text'],
filter: 'from.user_id = 1 AND chat_id = 10'
})


i've been thinking about creating at least my own API for my own messenger (tm), but i've never thought about the search system. like, how the search bar in the telegram even work? i could not understand it until i tried out meilisearch. it's definitely a good experience overall, would recommend, ign, blah-blah-blah. wanna experiment with some other stuff more, probably will and probably will post it on here. stay tuned!

не лёха

06 Jul, 11:09


one of my subscribers sent me a message directing this post via letterbox. the original (on the left) and the broadly translated one (on the right) versions are present on the screenshot

first of all, what if you want to log.Fatal (or even log.Panic? is it called this way? i dont actually remember) multiple lines? e.g. your log line is so long it's better to split it up into two lines. so you would normally do something like this:
log.Fatal('... this is the first line');
log.Fatal('... this is the second line');
... expected (!) handling further ...
but you would quickly see that your second line of logs would never be executed because of this non-explicit exiting behavior

secondly, "there will be a hint when you will be writing log.Fatal indicating that os.Exit is called under the hood". and what about those half of programmers that don't use IDEs and code editors that splash with a hint every now and then? this logic must be as simple as possible and as obvious as possible: log.Fatal means log`ging on a `Fatal error, nothing else. period. why the fuck does an os.Exit call even happen? for what reason?

thirdly, "just use Error" — why should i use not what i wanted to use? why are there some assumptions what and whatnot to use? i want to use fatal logging level (of course you know about logging levels, right? right???) and that's all, i dont want a logger to unexpectedly exit my program because golang developers went nuts when creating this language

damn this went into a brag really quick, kinda sorry for that

не лёха

06 Jul, 10:27


just found out golang exits the program if you call log.Fatal(...)?! that's absurd to say the least!

imagine writing your own piece of code in which you log at a fatal level (e.g. something very-very-very bad happened), and then, all of a sudden, your program just crashes...? without saying anything? and you spend an hour or two just debugging and finding out that a logger has been exiting your process??

i wont quote everything that has been said on the site i linked to, but that's totally fucked up. this should not ever happen in any library unless the user has manually opted that in (e.g. passed a parameter like exitOnFatal: true or something)

не лёха

30 Jun, 17:06


just a reminder—there is this thing called 'anonymous letterbox' that exists on my website, through which you can send me a message and i will receive it! if it involves a question, i might post it here (or, maybe, i will decide to create another channel for the QnA stuff) and answer it, so look forward to it!

не лёха

30 Jun, 12:15


and here's how my generated nfts might look like when they're on TON blockchain... totally not a spoiler for a project that's totally coming...

не лёха

30 Jun, 12:14


ever wanted a telegram NFT username?
recently, i got interested in Telegram nft usernames as they look corny and beautiful and are actually useful in terms of Telegram. although i wouldn't recommend buying them altogether as they are much expensive, i would recommend (at least to myself) make something that looks similar to Telegram's official nfts for usernames just because they might look cool when inspecting my TON wallet (winterfall.ton, btw)

and then i remembered that i haven't coded anything for a while now, and that i want to work with graphics more (in context of typescript, image generation). this is when i thought it was a good idea to practice image generation to look alike Telegram's nft usernames. and this is why @nftygrambot was born.

its idea is simple — generate simple and deterministic images that look very much like Telegram's nft username images, but also support much more variety of inputs. as for now, it supports phone numbers (even +888 ones!), usernames (or, as the bot recognizes them, domains) and ips (like 1.1.1.1 or basically any other ip). all you have to do is /start the bot and write down the input (one of the described earlier types) and the bot will generate the image. if the bot does not answer — then input is bad.

this bot does not serve anything purposeful at all, instead, it's a reminder for me that image generation is fun or starts to get fun when you start involving all of yourself in it

also, recently i got interested in TON blockchain and its inner parts... we may release an nft collection based on these generated images... who knows?..

if you're interested as a developer, i made an api for this stuff, it's located at https://nft.starkow.dev/img and takes a input query parameter and returns either a image/png if input is valid or a json describing what went wrong

не лёха

23 Jun, 18:09


support me ⭐️

i will really appreciate any donation. it helps me to live and motivates me to do another project for y'all. thanks!! ⭐️

не лёха

29 May, 21:06


🎂

не лёха

05 Apr, 23:05


i've finally made my own website! you can even send me an anonymous message through letterbox in it!

▶️ starkow.dev 🆒