Page 1 of 5 123 ... LastLast
Results 1 to 10 of 41

Thread: Really Disgusted

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Really Disgusted

    I pulled Lazarus out to give it a second, third or fourth (whichever), chance. I decided to remake an old project of mine that used SynEdit to edit the random map scripts from Age of Empires 2.

    The resulting executable with just a SynAnySyn and a SynEdit, with no debug info and full optimization, was a 12.7mb bloated application. There isn't even a menu! This is 50% larger than Lazarus itself. :?

    All I have the thing do is load a sample script, load the highlighting settings, and then enable the highlight settings. No really, this is it:
    Code:
      SynAnySyn1.LoadHighLighter('rms.ini');
      SynAnySyn1.Enabled := True;
      SynEdit1.Lines.LoadFromFile('ForestLand.rms');
    Yeah, wow. I don't know whether to be insulted yet, but I can't even find, let alone compile the SynEdit highlighter generator to compile my real highlighter script. The removal of SynAnySyn for the real highlighter object the generator spits out would probably be better and smaller.

    To add insult to injury, take a peek at the following screenshot. Two colors, comment and keyword, are utterly bungled. Roughly one third of all the objects and keywords are missing, unhighlighted, despite their presence in the INI-highlighter definition. Things like "random_placement", "ALPINE_MAP" and a number of others. I didn't bother to add the codes to highlight numbers.


    Is it too much to ask that the application work correctly, even if it doesn't fit into the size it should? The older versions of Lazarus crammed it into ~4mb or less yet now it is three times larger. Not to mention that it malfunctions now too.

    Please, is this just me? I want to like Lazarus, but every time I touch it something goes wrong, malfunctions, or bloats in crazy or inexplicable ways. Anyone who wants to see for themselves and maybe point out my error(s), you can retrieve the project here.

  2. #2

    Really Disgusted

    And you are sure you read any available info on the FPC-FAQ?
    Like how to generate an executable without debug-stuff in it.

    And much more important: Do you use a released version or the
    daily build? If the daily doesn't work you have to live with that - there
    is no support for absolutely untested stuff.

  3. #3

    Really Disgusted

    To reduce the size of a Lasarus application do the following:
    - Select Compilation options
    - Select linking tab
    - in debugging section uncheck all options except the last one: remove all symbols from executable
    - check the smart linking option

    This will reduce the size of your executable to something like 1.3 Mb

    P.S. I have tested this on Lazarus 0.9.24 (fpc 2.2.0)

  4. #4

    Really Disgusted

    Is it already possible to add components dynamicaly. Last time i tried lazarus had to be recompiled.
    http://3das.noeska.com - create adventure games without programming

  5. #5

    Really Disgusted

    Waran, yes I am informed. It's an easy option right there in project options. I have the released version, what is labeled as stable and not a daily build. I'd rather have stability than cutting edge technology.

    Grudzio, IIRC I did that except for smart linking. I'll have to try it again, after I'm done with my reformat (don't ask, long story...).

    Noeska, you misunderstand my issue, the latest version of a Lazarus compatible highlighter generator wasn't included; I don't have Delphi installed and refuse to install it, and so cannot actually build the project. So I lack the ability to generate a better highlighter.


    This all doesn't explain the malfunctions present in SynAnySyn. Didn't you guys notice the missing keywords and objects right there in that screenshot? It's practically impossible to miss, and is why I am so disgusted. Because even if it is bloated, the least I expect is correct functionality.

  6. #6

    Re: Really Disgusted

    Quote Originally Posted by Robert Kosek
    I pulled Lazarus out to give it a second, third or fourth (whichever), chance. I decided to remake an old project of mine that used SynEdit to edit the random map scripts from Age of Empires 2.

    The resulting executable with just a SynAnySyn and a SynEdit, with no debug info and full optimization, was a 12.7mb bloated application. There isn't even a menu! This is 50% larger than Lazarus itself. :?
    Lazarus does seem to generate bigger code especially with GUI kind of stuff. The minimal uncompressed size I could get in a project was 1.7 Mb.

    However, I was able to compile some ugly old code in FPC/Lazarus and it miraculously worked. The IDE is vastly improved from what I've seen 2-3 years ago, as well as compilation time in FPC. I think FPC/Lazarus guys are doing better than those from CodeGear (guess, Delphi 2007 Trial crashed before, during and after installation). My only minor complaint is the overstrict syntax, but for the rest - I found compiled apps to be pretty stable.

    Your problems might be related to SynEdit project improperly ported and I honestly didn't see any major improvements in it during last 4 years.

  7. #7
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25

    Really Disgusted

    To my knowledge, SynEdit is an abandoned component. However due to mostly the Laz Team's efforts, it's been ported and modified to work with Lazarus.

    I recommend that if you have an error or a noticeable bug, report it through the freepascal.org website. They have a whole system that they are dedicated to working on and knocking off issues one-after-the-other on a near daily basis. But if it's not in there.... you know what good that does the end product, right?
    Jason McMillen
    Pascal Game Development
    Co-Founder





  8. #8

    Really Disgusted

    SynEdit was abandoned for some time, but it's last update was March of last year ... and they've never had much alacrity. What I do know is that it worked well every time in Delphi, and that a port was planned.

    In all honesty, it would be nice to have a warning when components aren't fully ported. It's easy to make a dialog that pops up when placed on the form, warning the user when something isn't fully ported. Or at least a slice of the docs mentioning this.

    When Lazarus uses the components to get itself working and I try and follow suit only to find it doesn't work, this doesn't give me a "warm fuzzy feeling" about the IDE!

    Quite frankly I am shocked that no one seems to have caught this yet.

    ---

    Addendum:

    I have now endeavored to fix the hideous code I've found. I have no clue why the following code was written the way it was, save for being cryptic, but I cannot figure out how to recompile the component. Nice of Lazarus to let me do a full recompile automatically like delphi does.

    This is the wackiest code I've seen for a for loop:
    Code:
      while First <= Last do
      begin
        I &#58;= &#40;First + Last&#41; shr 1;
        Compare &#58;= CompareStr&#40;fKeywords&#91;i&#93;, Token&#41;;
        if Compare = 0 then
        begin
          Result &#58;= True;
          break;
        end else
          if Compare < 0 then First &#58;= I + 1 else Last &#58;= I - 1;
      end;
    Okay, I rebuilt Lazarus and this section of code is the culprit. I hate cleaning up after people who code like this...

  9. #9

    Really Disgusted

    I have come to the conclusion that SynAnySyn works exactly as programmed: wrongly. Perhaps this wasn't the intent, but the silly attempt at optimization, or whatever you'd call it, resulted in both obfuscation and an easily prevented bug. Who wrote this flawed code I don't know, but it is very irritating to have to rebuild Lazarus to fix one component that should have already been tested and repaired.

    The negligence in maintenance, translation, and or testing could be so bad as to drive potential newcomers to Lazarus away. This was completely preventable.

    The flaw in the logic has to do with binary math. They add the first with the last element indices and then shift right all the way through the loop. Given which string doesn't match in the comparison either the beginning or ending index is manipulated, the start grows and the end shrinks. Don't you think that this could cause a few bugs? Why not do a for-loop?

    Using for-loops is approximately the same speed but without the bug, so I have repaired the unit.


    The other problem is native to the compiler, and foolish. Lazarus uses BGR notation in hexadecimal colors and doesn't tell you this anywhere. The only way you learn this is by trial and error. So my colors were flawed because they were in RGB notation, like you would expect to have used. RGB is the "standard" in other pascal compilers, so why not Lazarus? This deviation prevents any cross compiler reuse of syntax highlighter configuration for SynAnySyn.

    If you want to download a working copy of SynAnySyn you may do so here.

  10. #10

    Really Disgusted

    Quote Originally Posted by Robert Kosek
    The flaw in the logic has to do with binary math. They add the first with the last element indices and then shift right all the way through the loop. Given which string doesn't match in the comparison either the beginning or ending index is manipulated, the start grows and the end shrinks. Don't you think that this could cause a few bugs? Why not do a for-loop?
    Sounds like a failed attempt at binary search.

Page 1 of 5 123 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •