This group is intended for discussions of coding and design competitions held by Telegram. Please use English. See @contest for information. For discussions in Russian, please use @contests_ru https://t.me/contests/51172
I suspect this requirement was added because Web A still doesn't support other fields with formatting after all. For example, inserting custom emojis in folder names or formatting message when gifting. It seems that the current implementation is too inflexible for reuse.
Читать полностью…To tell the truth, I also agree with Vladimir. Knowing these people and seeing how they are intentionally being silent about this, they could easily be looking for 10x developers who can complete that much work in 21 days (this is not me, I can't). So, unless they clarify what needs to be done, I will refrain from participating in the contest.
Читать полностью…I agree with other people complaining about "from scratch," there is so much prop drilling and spaghetti code (no offense, I understand this was written in a hurry for a contest). If we actually had to rewrite "the text editor" (whatever this means) from scratch, we would have to rewrite half the code base.
Читать полностью…or if you promise to give part of your prize - I'm ready to help
Читать полностью…In the Markdown RegExp (const SIMPLE_MARKDOWN_REGEX = /(\\|__).+?\1/g;), only italic and bold text are supported. Does anybody know where the other part of the rendering logic (for strikethrough text, quotes, etc.) is
Читать полностью…I think keyblock is emitted only for config changes, at least, when I needed to emit keyblock in my test chain, I had to change config for keyblock to appear. In usual functioning of the network, they appear periodically because of Elector working (two sequential keyblocks per cycle as I described above).
Читать полностью…Base solution, for example, has:
td::actor::send_closure(actor_id(this), &ContestValidateQuery::got_neighbor_out_queue, i,
r_state.ok()->message_queue());
got_neighbor_out_queue(i, r_state.ok()->message_queue())Читать полностью…
did you work with promise ?
it's like using method:
then(CallBack)Читать полностью…
Did anyone manage to understand whether td::actor::send_closure_later
does multithreading or not?
Having read the comments here in Telegram chat, I got an impression, that it does multithreaded, but I decided to try myself, and it seems to be executed later (after all "Loop #i" output), but completely sequentially ("thread started", "thread finished", "thread started", ...).
Multi-threading totally works, when done with std::async, but actors don't seem to do the job. Anyone has an idea?
I launched with "—threads 8"
for (int i = 0; i < threads_count; i++) {Читать полностью…
LOG(ERROR) << "Loop #" << i;
// fs.push_back(std::async(std::launch::async, [this] { ContestValidateQuery::decrease_pending(); }));
td::actor::send_closure_later(actor_id(this), &ContestValidateQuery::decrease_pending);
}
td::actor::send_closure_later(actor_id(this), &ContestValidateQuery::log_pending);
return;
void ContestValidateQuery::decrease_pending() {
LOG(ERROR) << "Thread: started";
int r = rand() % 1000000;
for (long long j = 0; j < thread_decrements; j++)
if (r + j >= 0)
pending--;
LOG(ERROR) << "Thread: finished";
}
void ContestValidateQuery::log_pending() {
std::this_thread::sleep_for(1000ms);
LOG(ERROR) << pending;
reject_query("Test");
}
No, but as for me, I can't understand how that phrase may be interpreted differently
Читать полностью…I don't understand the argument on this, at the end of the day they expect a fully functional text editor. You could be a patch guy and apply fixes on the existing one, or be a DIY person and implement it from scratch, and even from scratch there are lots of existing utilities that would make implementing it easier.
Based on my experience from previous contests, the result matters.
You are a Telegram official? It's an official response or it's a blunt personal opinion based on literal task read?
Читать полностью…Rework the existing text editor from scratch
A whole point to make people confused?
Or to rewrite "from scratch"?
Cause the listed required changes really can be implemented in a step aside from the text editor, without touching 99.99% of the text editor.
Also cause without any other requirements than those listed the 99.99% of the editor will anyway be almost the same code, you can scratch as much as you want but it does what it must do - and there is not so much wiggle in ways to write React (/Teact)
So I do not see the whole point. Or rather - I see it kinda differently and hope that "from scratch" is not a hard requirement
heey guys
does anyone know if the API is configured to change the folder icon ? thanks in advance
Btw, how did you parsed proof pruned cell account_blocks and transactions trees? I had bad times while trying to get anything with dict_get/next, until found the sources of the ton/core dict parser 🙂
Читать полностью…actors are not depend on specific thread, they just need a thread to work when they need, so cpuwrokers routed by another class to manage tasks ...
the actor thread-safety or non-thread-safety is depend on Developer design.
The tasks are significantly easier this contest, there might easily be like 20 winners, so the prizes won’t be that considerable themselves. Then imagine splitting it.
Читать полностью…I don't think anybody will help you. We are competing against each other for money
Читать полностью…Honestly, AI assistant in CLion (GPT-4o) was surprisingly effective at understanding Node code and explaining different patterns with pointers, memory allocation, and multithreaded functionality (especially those closer to standard modern C++). The only issue was that source files are so huge they could not fit into context, and had to feed them part by part for AI to understand the logic. However, creating code is entirely different story... may be useful rather for some small refactorings and completions.
Читать полностью…From my tests it seems that all methods on the same actor are executed in the same thread. I don't know why, but guys that wrote node just love to do those send_closure stuff for continuing operations callback-style.
Take a look, for example, at tonlib\tonlib\TonlibClient.cpp lines 1488 upto 1628 - send_closure, after send_closure and sends send_closure.
Most likely, that may help to prevent thread clogging (send_closure may act like yield), and to keep the stack depth in check (deep direct function calls may overwhelm the stack).
it's depend on the flow you are using.
if they are independent, they can using the idle threads(thread workers , as I remember it was cpuworker , Im not sure what was its name)
it's like an queue and working like a promise
you can assume that like an even loop, but working like a promise and a little bit different.
Well, thank you! :)
That's why I've added "I hope that they were not literal in total rewrite from scratch as a hard requirement".
Total rewrite _could_ introduce new bugs. The repository does not contain any tests (although it contains both jest and playwright configs lol), so there is no way to be sure that your/mine/whatever 2-5-10-20 thousand lines of code will not introduce any untested behaviour.
In opposite, if you fix all mentioned flaws of existing text editor - you can be almost sure that you've changed something that does not affect all the surroundings. Well, if you know what you do obviously
The difference will be in stability and the way of developing, I guess
Читать полностью…how different this "new editor" will be from the "old one"? In percentage? WDYT?
Читать полностью…Totally agree, I guess the best way to do it here, is to do it the way it has to be done, like you mentioned. Telegram team looking for the good developer to join their team, and good developer won't rewrite from scratch something that is already working and good enough to be patched in order to support some new features. So maybe this is just kind of "test"?
Читать полностью…