Shop OBEX P1 Docs P2 Docs Learn Events
Open Propeller Project #3: Propeller IDE V0.1 Package Available - Page 16 — Parallax Forums

Open Propeller Project #3: Propeller IDE V0.1 Package Available

1131416181929

Comments

  • Cluso99Cluso99 Posts: 18,069
    edited 2014-03-07 16:22
    Hey guys, nice work.

    Seems we are getting all the nice bits of PropTools coloring.

    Please let me know when it is ready for prime time testing (too busy to read back thru all the posts) - maybe a change in the title would do it.
  • jazzedjazzed Posts: 11,803
    edited 2014-03-07 21:53
    Roy committed the background coloring tonight. Thanks Roy!

    The spin autocompleter (spinsense?) has also been updated.

    Next up:
    Point to line number in source for compile errors.
    Add the zip diffs from Dennis (already in hand).
    Add Find/Replace diffs from Dennis when they're ready.
    Should be able to make some end user install packages early next week.
  • dgatelydgately Posts: 1,629
    edited 2014-03-08 06:13
    Roy,

    I'm getting this white banding between each line when I use either of the Parallax fonts unless I use a very small size (8). Doesn't happen with Courier font:

    highlightBackground.jpg


    This is on Mac OS X (10.9).


    dgately
    1024 x 688 - 102K
  • Heater.Heater. Posts: 21,230
    edited 2014-03-08 06:55
    Just built again on Debian. No such banding here.

    Awful slow changing tabs with a large project load though.
  • mindrobotsmindrobots Posts: 6,506
    edited 2014-03-08 07:17
    I just built on Win7, no banding here with either font. Didn't expect any since Win7 is used by Roy. I probably won't be able to test on Mac until tomorrow at the earliest.

    It looks reel good.

    I pressed my Beanie and it could tell I had a P1 connected and something else.....my DE0. The Propeller detection appears to be working well on Windows. I can connect and disconnect my Prop and it recognize dboit hactions repeatedly.

    I couldn't comment on the tab switching speed with large projects because I don't have any large projects! :smile:

    It's looking really great....except it doesn't recognize my P2 (yet)! :lol:
  • ctwardellctwardell Posts: 1,716
    edited 2014-03-08 07:25
    Looks good on Win7/64.

    I see that the older version of the Parallax font is scaling properly now as opposed to when I made post #321.

    http://forums.parallax.com/showthread.php/153921-Open-Propeller-Project-3-Propeller-IDE?p=1245679&viewfull=1#post1245679

    C.W.

    Edit: I tried out my two new quickstart boards and they were both detected and worked fine.
  • mindrobotsmindrobots Posts: 6,506
    edited 2014-03-08 08:16
    I just built on Mac OSX 10.9.2 and saw banding until you get to a certain size on the Parallax font (I don't have Parallax2 installed)

    I played with some other fonts some have banding on some sizes, some have no banding. Courier has on banding that I could see but Courier New had banding on some sizes.
  • jazzedjazzed Posts: 11,803
    edited 2014-03-08 08:34
    Rick, Parallax2 should have been added to the font database. Can you re-check for it in the Font dialog?

    The parallax.ttf is still broken. I just skipped the bad sizes in the zoom in/out feature. You can still pick them from the font dialog.

    Regarding performance with big files: The source browser is the main culprit, and I'm thinking of changing the way it works ... not today though.
  • Roy ElthamRoy Eltham Posts: 3,000
    edited 2014-03-08 11:21
    The way the background coloring works is using a feature of Qt. So that banding is a bug in the Mac version of Qt. Do you see it when you select a block of text also?

    I'm not totally happy with how it does the coloring, and may end up overriding QPlainTextEdit's paint code in order to do it better (and potentially add more, like the gray indent level guide thingies).

    Heater, just to be sure, are you building release or debug? I have noticed it being a touch slower with bigger spin files, but not terribly slow. It is doing a lot of reparsing of stuff when switching tabs.
  • fridafrida Posts: 155
    edited 2014-03-08 12:05
    I have different colors in my dat section, because I use var_ and var_1 as variables.
  • Heater.Heater. Posts: 21,230
    edited 2014-03-08 12:55
    I just did a release build. Can't say I notice much difference in speed. When switch back to a tab with a lot of methods it's about 4 seconds. Longer than it takes to compile the whole project!
  • dgatelydgately Posts: 1,629
    edited 2014-03-08 15:28
    Roy Eltham wrote: »
    Do you see it when you select a block of text also?

    Yes, I still get banding when selecting text.

    Banding/non-banding is hit & miss for all fonts at different sizes. I'm not able to figure put a pattern for the non-banded occurrences.


    dgately
  • Roy ElthamRoy Eltham Posts: 3,000
    edited 2014-03-09 00:56
    frida wrote: »
    I have different colors in my dat section, because I use var_ and var_1 as variables.

    You found a bug in my section start detection stuff. :) I'll get a fix in soonish (kind of busy this weekend, so may be a few days).
  • Roy ElthamRoy Eltham Posts: 3,000
    edited 2014-03-09 00:59
    Heater. wrote: »
    I just did a release build. Can't say I notice much difference in speed. When switch back to a tab with a lot of methods it's about 4 seconds. Longer than it takes to compile the whole project!

    Yikes, I've never seen it take anything close to that long. How many functions are in that file you are switching to?

    The slowness I was seeing was where it would take a couple hundred milliseconds sometimes on some large files I have.
  • Heater.Heater. Posts: 21,230
    edited 2014-03-09 04:10
    Roy,

    I'm playing with msrobot's Server_W5100_RTC program. There are 322 PUBs and PRIs (according to grep and wc). Perhaps 4 seconds is an exaggeration. Longer than it takes to compile everything anyway.

    Admittedly I'm using an old amd 64 machine here but it that a slow a slow old girl. Using this on a Rasperry Pi will be another 8 or ten times slower.

    I have a simple parser in JavaScript here that pulls out the same PUB/SUB signatures and locations in a lot less than a second :)

    I was wondering about those panels on the right hand side:

    a) It seems that when you have a tab open the lower panes shows all PUBs and SUBs lower down the object tree.
    There are a lot of methods listed that you cannot reach from the current file as they are private or more than one level deep. This seems unnecessary.

    b) The tree view at the to changes to reflect the tree starting from the currently open tab. Perhaps it should always show the tree from the top down so you know where you are.
  • Roy ElthamRoy Eltham Posts: 3,000
    edited 2014-03-09 11:18
    Heater,
    I had a similar idea about "always showing from the top down" but currently there's no top object stuff. Until then, it treats each file you have in focus as the top, essentially.

    The parsing that's in there now will eventually be replaced by the compiler when it gets integrated. Steve is still working in there if I recall correctly, so it'll probably get better soon.
  • jazzedjazzed Posts: 11,803
    edited 2014-03-09 12:59
    I'm sure the method browser is taking lots of time to load.

    Strictly speaking it is an unnecessary feature especially just for loading a file into the GUI. It should only be populated when required. There are a couple of alternatives to do it right now.

    Roy had mentioned making the method browser available as a tool-bar. We are adding a tool-panel to the bottom of the IDE for doing search/replace (not complete yet). It is reasonable to add a method browser in a similar way, and it could be hidden until someone wanted it. The other option is to make a +/- tree element for each file on the left side. I'm more in favor of adding the hidden browser at the moment. Adding it to the top of the editor, just under the tab may be better because it is a per-file thing.

    Right now i'm struggling with some zip file issues. I have the changes isolated so it won't be too disruptive. Most likely I'll just commit what I have and finish it later.

    Regardless, I expect to not be very productive today because of another huge distraction.
  • Heater.Heater. Posts: 21,230
    edited 2014-03-09 14:49
    I quite like the method tree idea.

    If I have a bunch of spin files open and a few in a library folder then it might be nice to see all the methods available as I'm typing now. Only the methods in the current spin file and any PUBs of files I have put in OBJ. In my current scope that is.
    That's the stuff that auto complete should offer.

    So much so I started making one for openspin in he browser.
  • Heater.Heater. Posts: 21,230
    edited 2014-03-09 14:58
    Grrrrgh,

    OK Who did it? Stand up!

    Propeller IDE converted my ASCII encoded Spin sources to UTF16 !!

    I might never have known or cared but last night I was hacking away on my parser. It's a JavaScript thing that finds all sub-objects required of a Spin file and all the PUPs and PRIs in the sources. Recursively for the whole program. Just like in Propeller IDE but an order of magnitude faster :)

    It was late and I was getting tired and just as everything was working fine it broke. Desperately I thrashed around trying to find that last change I made that broke everything. I got more tired and stressed and gave up.

    This morning I remembered I had played with PropellerIDE at some point. Sure enough it had corrupted my Spin sources and broke my parser !
  • Roy ElthamRoy Eltham Posts: 3,000
    edited 2014-03-09 15:09
    corrupted?

    You parser should handle any of ASCII, UTF-8, or UTF-16 inputs. Spin source will be in any of those commonly. PropTool saves everything in UTF-16. OpenSpin will read any of them also.
  • Heater.Heater. Posts: 21,230
    edited 2014-03-09 15:42
    Yes, corrupted.
    $ file ../project/WebServer_W5100_RTC.spin 
    ../project/WebServer_W5100_RTC.spin: Little-endian UTF-16 Unicode text
    $ grep PUB  ../project/WebServer_W5100_RTC.spin 
    $ 
    $
    
    If I open a document in some word processor and it saves it to a different format, say DOCX instead of the original RTF, then that is a corruption of my document. Even if the content is somehow the same. Perhaps my other tools cannot handle it.

    Strangely when I throw those same spin sources at openspin in the browser from a simple node.js server it can handle ASCII, UTF-8 and UTF-16 (Well actually UCS2) and I don't have to do anything special to deal with that,

    The JS in the browser, or my parser, knows nothing of any of this encoding. Everything is just a JS string. Which is actually UCS2 under the hood which means it can't really handle unicode properly.

    Unicode should be banned.

    I can open files as byte buffers and check for UTF-8/16 and then convert those buffers to sting with the right encoding options I guess. Blech...
  • jazzedjazzed Posts: 11,803
    edited 2014-03-09 16:06
    Hey Heater.

    Sorry about the UTF-16 stuff. I just assumed that was the Spinny thing to do.

    The iconv command in linux can change things from UTF-16 to ASCII.

    I'll update the PropellerIDE code to save as whatever it was opened as.
  • Heater.Heater. Posts: 21,230
    edited 2014-03-09 16:23
    Jazzed,

    iconv is my old friend in Spiny land :)

    I just noticed that if PropellerIDE is saving to a file it does not have permissions to write to it fails silently.
  • jazzedjazzed Posts: 11,803
    edited 2014-03-09 17:09
    Heater. wrote: »
    I just noticed that if PropellerIDE is saving to a file it does not have permissions to write to it fails silently.

    Oops. Thanks for noting this.
  • kuronekokuroneko Posts: 3,623
    edited 2014-03-09 17:10
    Roy Eltham wrote: »
    PropTool saves everything in UTF-16.
    Only if it can't get away with ASCII.
  • Roy ElthamRoy Eltham Posts: 3,000
    edited 2014-03-09 17:12
    Steve,
    You can't just blanketly save the file in the format it was opened as.... What happens if they open an ASCII file, but then add a bunch of parallax font characters to draw a schematic or whatever, and then save it, it should save in unicode to retain the drawing, but if you force it back to ascii you will destroy their file.

    I agree it could attempt to save it in the original form if possible, but if not then either upgrade to unicode by default or throw up a prompt saying they need to either save as unicode or lose information in their file.

    Heater, I'm amazed the JavaScript doesn't just automatically work with whatever unicode you give it (ASCII is just utf-8 without the BOM character and no characters above 127, which is legal).
  • jazzedjazzed Posts: 11,803
    edited 2014-03-09 18:33
    Roy Eltham wrote: »
    Steve,
    You can't just blanketly save the file in the format it was opened as.... What happens if they open an ASCII file, but then add a bunch of parallax font characters to draw a schematic or whatever, and then save it, it should save in unicode to retain the drawing, but if you force it back to ascii you will destroy their file..

    Qt has some stream decoders in it. I'm looking at that closer. It would be easy if the whole world was Spinny of course :) But it ain't, and I'm happy to deal with it.

    Heater has mentioned liking the method browser as is. Honestly though, it would be best to move on to a per-file browser. I'll probably start moving that way soon.
  • jazzedjazzed Posts: 11,803
    edited 2014-03-09 22:25
    Ok.

    I decided to go back to the SimpleIDE methodology for load/save. Basically, it goes like this:

    On loading a file, if the UTF-16 Byte Order Mark exists at the beginning of a file, then the file will be treated as UTF-16, and any file save will be as UTF-16. If the Byte Order Mark does not exist, then the file will be treated as UTF-8. Since UTF-8 is a superset of ASCII, any ASCII file will be preserved in the original form. If any special characters are added to the file, they are saved as part of UTF-8 format. Any new files will be saved as UTF-16 (this is a little different from SimpleIDE since it tries to deal with UTF-8 exclusively).

    You may also notice not that the file change marker (*) in a tab goes away on save now.

    Also if a save fails for some reason (can't open file for writing), the program will notify with a message box.

    These changes have been pushed. Please pull, update, build, and test.
  • Heater.Heater. Posts: 21,230
    edited 2014-03-09 23:16
    Jazzed,
    Heater has mentioned liking the method browser as is.
    I'm not sure what "as is" yet.

    Currently I have webserver_w5100 open and the method browser has more entries in it than one can deal with.

    Certainly PRI methods of sub objects don't need to be shown, at least by default, I cannot call them fro here.

    Similarly sub-sub-objects need not be shown.

    Having methods in sorted order would be nice.
  • Roy ElthamRoy Eltham Posts: 3,000
    edited 2014-03-09 23:23
    Do you handle the UTF-8 BOM character also? If it's there it should be retained, and if not should be left off.
Sign In or Register to comment.