Блог пользователя Przemek

Автор Przemek, 12 лет назад, По-английски

I'm think, that applying astyle (or other code beautifier) to solutions before showing them in 'HACK solution mode', could be fine :)

What is your opinion?

  • Проголосовать: нравится
  • +13
  • Проголосовать: не нравится

»
12 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

I'm consider this idea again. Using macros for loops (like FOR, REP, EACH etc.) is an issue for astyle.

So, patch for astyle is required or we can choose other code beautifier.

»
12 лет назад, # |
  Проголосовать: нравится +2 Проголосовать: не нравится

Note that solutions in hack mode are shown in flash player plugin, not HTML (it is made to prevent code copy-paste).

And using code beautifier in flash is much harder than in HTML.

  • »
    »
    12 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    I'm thinking about running code beautifier before generating 'flash image'

  • »
    »
    12 лет назад, # ^ |
      Проголосовать: нравится +8 Проголосовать: не нравится

    How exactly flash prevents copy-paste? The code is transferred from server to client anyway, so if one wants to copy the code, he will do it. Flash just complicates the process (nice example of security-through-obscurity), and it also complicates the life of 64bit-linux users. I'd propose to rewrite it in JS (so that the code is rendered by js in picture), lazy cheaters won't copy it anyway, and it'll be possible to use js libs to process the code.

    • »
      »
      »
      12 лет назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      By the way, is code really transferred in text form now? I observed that the font rendering of the code is substantially different from what it would normally be on my system. This makes me think that the text is pre-rendered to a picture and only then transferred to the client (but then, why use Flash altogether?).

      There has been a 64-bit Flash for Linux for about 3 years now.

      • »
        »
        »
        »
        12 лет назад, # ^ |
          Проголосовать: нравится +3 Проголосовать: не нравится

        Even if it is transferred in picture, it is easy to use OCR to convert in it text. If there is no security anyway, there is no point in making others life harder.

        64-bit flash for Linux is one of the most bugged programs I've ever seen. And I have to keep it installed because of codeforces hacks :(