Shop OBEX P1 Docs P2 Docs Learn Events
PZST - an open-source Propeller IDE in development [ Version 1.0.1 released! ] - Page 4 — Parallax Forums

PZST - an open-source Propeller IDE in development [ Version 1.0.1 released! ]

124678

Comments

  • Heater.Heater. Posts: 21,230
    edited 2011-03-21 11:00
    And now I rebuild pzst and qscintilla with Qt v4.7.0.

    Result: The whole file is loaded as a single line!!

    What on earth is going on?
  • martinhmartinh Posts: 58
    edited 2011-03-21 12:51
    I think we will not get a bugfix for qt4 too soon.
    http://bugreports.qt.nokia.com/browse/QTBUG-18038
    The only chance seems to be not to use QTextStream for reading the file but to do it low level with QFile and successive read(1) like in the good old days.:frown:
    Or discard the automatic support for old style mac files and leave it to the user to convert them - this would be IMO the worst solution.

    Addendum: If you replace line 48 in file spineditor.cpp
    if (!file.open(QFile::ReadOnly | QFile::Text)) {
    
    with
    if (!file.open(QFile::ReadOnly)) {
    
    it seems to work, but I am not sure if that introduces other side effects.
  • Andrey DemenevAndrey Demenev Posts: 377
    edited 2011-03-21 16:44
    martinh wrote: »
    Addendum: If you replace line 48 in file spineditor.cpp ............it seems to work, but I am not sure if that introduces other side effects.

    Parser and highlighter rely on \n as line separator, so this is not a good solution
  • martinhmartinh Posts: 58
    edited 2011-03-21 16:47
    Parser and highlighter rely on \n as line separator, so this is not a good solution

    I made a comment on your issue in google code which avoids that by replacing the non LF end of lines consistently.
    http://code.google.com/p/pzst/issues/detail?id=1
  • Andrey DemenevAndrey Demenev Posts: 377
    edited 2011-03-21 17:09
    Yeah, I was ready to commit exactly the same change when I saw your comment there :)
  • rosco_pcrosco_pc Posts: 464
    edited 2011-03-22 04:49
    It works :D
  • Andrey DemenevAndrey Demenev Posts: 377
    edited 2011-04-04 04:04
    OK, my birthday gift project is now completed (BTW - I've started to post details here), so in few days I return to PZST development.
  • Andrey DemenevAndrey Demenev Posts: 377
    edited 2011-04-23 22:32
    Making some progress. Written a new, much faster lexical scanner for SPIN code. This is going to replace separate scanners used in different places (method names extraction, pre-processing, syntax highlighting), so only one pass of scanning is done when code changes.

    Also, basic autocompletion is done - see attachment. Now working on context-aware autocompletion, so for example in DAT block autocompletion list would not include names from VAR blocks

    Stay tuned - first release is coming soon :)
    748 x 548 - 44K
  • Andrey DemenevAndrey Demenev Posts: 377
    edited 2011-04-26 00:54
    More progress

    Autocompletion now works for methods and constants in objects. Also, call tips are implemented
    537 x 400 - 29K
    536 x 398 - 30K
  • Heater.Heater. Posts: 21,230
    edited 2011-04-26 02:02
    Fantastic. I love this.
    I'd like to get it compiled and running on my ARM board http://www.igep.es/index.php?option=com_content&view=article&id=46&Itemid=55
    Only trouble is BST does not run there. It might be possible to get the HomeSpun comiler running under Mono though. If PZST will ever support the use of HomeSpun...
  • Andrey DemenevAndrey Demenev Posts: 377
    edited 2011-04-26 03:04
    Now we have code folding :)
    615 x 465 - 54K
  • Andrey DemenevAndrey Demenev Posts: 377
    edited 2011-04-26 03:06
    Heater. wrote: »
    If PZST will ever support the use of HomeSpun...

    Not a big trouble, I think. Basic command-line options are the same, possibly there are differences in list file format and error reporting. But this is not a priority
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2011-04-26 06:24
    Interested. Why does every one use Qt? There are much better widget toolkits out there, if you must use a cross platform widget toolkit. As example; FLTK, X, Zune, etc... Qt is one of the most bloated.
  • Andrey DemenevAndrey Demenev Posts: 377
    edited 2011-04-26 06:31
    It allows me to do things. I have devoted some time to learn it. The results are satisfactory. I have no time to learn all those toolkits available. Is that enough?
  • Heater.Heater. Posts: 21,230
    edited 2011-04-26 07:46
    DavidSaunders:
    Interested. Why does every one use Qt? There are much better widget toolkits out there

    No there aren't :)

    FLTK is probably faster and lighter, it's also a lot, well, less.
    zune does not exist for Linux as far as I can tell. Never heard of it before.
    X is not a tool kit as such. A raw X application is not cross platform unless your platform has X.

    Yes Qt is somewhat huge and perhaps not has fast as we'd like but it does run on mobile phones and it does run on my credit card sized ARM boards. It is at least very cross-platform. Qt is not just for graphical widgets, it provides pretty much cross-platform everything.

    Up until now it had excellent support from a huge company, Nokia, and others. Sadly Nokia has gone all Windows Phone so I hope Qt survives the chaos.
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2011-04-26 09:33
    heater wrote:
    A raw X application is not cross platform unless your platform has X.
    Yes this is true. Though I am not aware of a commonly used platform for which X is not available. There are ports of X11 to almost everything including: Amiga, TOS+MiNT, Windoze, M$-DOS, Mac OS (from Mac OS 7.1 up), almost all unixons, and many more.
    heater wrote:
    Yes Qt is somewhat huge and perhaps not has fast as we'd like but it does run on mobile phones and it does run on my credit card sized ARM boards. It is at least very cross-platform. Qt is not just for graphical widgets, it provides pretty much cross-platform everything.
    Ok fair enough, I can see the advantage of having more than just a Widget Toolkit cross platform.
    andrey wrote:
    It allows me to do things. I have devoted some time to learn it. The results are satisfactory. I have no time to learn all those toolkits available. Is that enough?
    I did not mean to change what you are doing. Also I apologize if my statement caused a personal reaction.

    I was just voicing my personal dislike for toolkits that are bloated to the point that you need a 'modern' system to use them. I have always been about optimizing things to unreasonable extremes, to the point that when I code in C I keep in mind how the particular C compiler being used does its optimizations so that I may write my code in such a way to best facilitate good optimization by that compiler (why do we want faster computers if we are just going to slow them down by bloated, not well optimized code).
  • tdeyletdeyle Posts: 85
    edited 2011-04-26 15:38
    ...waiting patiently for r22...
  • Andrey DemenevAndrey Demenev Posts: 377
    edited 2011-04-26 23:28
    I apologize if my statement caused a personal reaction.

    Well, all the world is spinning around personal reactions, personal preferences, personal wishes :)
  • Andrey DemenevAndrey Demenev Posts: 377
    edited 2011-04-27 06:35
    Those interested to try new features (code completion and call tips) - checkout revision 22. Also, syntax highlighting is now much faster - no visible delay when jumping from start to end of just-loaded file. You will need re2c to compile PZST.

    I am starting to work on improved search engine. After this stage is complete - first binary release will be rolled.
  • SSteveSSteve Posts: 808
    edited 2011-04-27 07:56
    I'm running into a compile error. termios.h on OS X 10.6 only defines baud rate constants up to B230400.
    #define B7200	7200
    #define B14400	14400
    #define B28800	28800
    #define B57600	57600
    #define B76800	76800
    #define B115200	115200
    #define B230400	230400
    #define EXTA	19200
    #define EXTB	38400
    

    compile error pzst 1.jpg
    1024 x 196 - 43K
  • tdeyletdeyle Posts: 85
    edited 2011-04-27 16:03
    Is code folding not in R22?
  • Andrey DemenevAndrey Demenev Posts: 377
    edited 2011-04-27 18:20
    I had to disable it for now, it is causing troubles with editing in folded areas. Not sure if this is scintilla's glitch or problem of my implementation.
  • Andrey DemenevAndrey Demenev Posts: 377
    edited 2011-04-27 19:03
    SSteve wrote: »
    I'm running into a compile error. termios.h on OS X 10.6 only defines baud rate constants up to B230400.

    Currently, serial port is only used for communication with Propeller's bootloader, at 115200. So in eserialport_posix.cpp, you can remove all those case stements that refer undefined constants.

    Fingers crossed, waiting for result of compilation under OSX
  • SSteveSSteve Posts: 808
    edited 2011-04-27 20:26
    Thanks to some help from Andrey in private messages I'm getting very close to successfully compiling. Here's where things stand.

    First, Qt Creator couldn't find re2c. It's in /opt/local/bin which is in my PATH, but Qt Creator isn't seeing the PATH that's created in .bash_profile or in .bashrc. So I manually added /opt/local/bin to Qt Creator's search path.

    Then it couldn't find libqscintilla2.a. I'm not sure where the install process put the Qt sdk. The executables, examples, etc. are in various directories under /Developer. I tried those and /usr/local/Qt4.7 and none of them worked. Andrey suggested using "make install" to have the library magically moved to the correct location. That turned out to be /Library/Frameworks.

    Now the linking process fails with
    Undefined symbols:
      "PZST::SpinCodeLexer::scan(char*, char*, char**)", referenced from:
          PZST::SpinPreprocessor::findObjects(QString, QStringList, QStringList&, QStringList&)in spinpreprocessor.o
          PZST::SpinCodeParser::parseCode(QString)     in spincodeparser.o
    ld: symbol(s) not found
    

    I should have left work an hour ago. I need to leave now. I'll try to work on this more over the next couple days.
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2011-04-27 20:34
    Sorry off topic:
    SSteve wrote:
    I should have left work an hour ago. I need to leave now. I'll try to work on this more over the next couple days.
    Oh unlucky you must be :( . I work 6 feet from where I sleep (and 2 feet from my computer), so that I never 'need to leave' work :) .
  • Andrey DemenevAndrey Demenev Posts: 377
    edited 2011-04-27 20:34
    Steve, most likely that is because it did not catch up changes to spincodelexer.cpp due to failures to launch re2c. Try to delete spincodelexer.cpp (or select "Clean All" from Qt Creator's "Build" menu), then rebuild pzst
  • Andrey DemenevAndrey Demenev Posts: 377
    edited 2011-04-27 20:36
    I work 6 feet from where I sleep (and 2 feet from my computer), so that I never 'need to leave' work :) .

    Same thing here :) I can add that I work one browser tab from the Parallax forums :)
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2011-04-27 20:38
    I can add that I work one browser tab from the Parallax forums :smile:
    Me to :) .
  • SSteveSSteve Posts: 808
    edited 2011-04-27 21:15
    Sorry off topic:
    Oh unlucky you must be :( . I work 6 feet from where I sleep (and 2 feet from my computer), so that I never 'need to leave' work :) .

    I did that for about ten years, but I had a separate office in the house so I still "left" work. But that dried up so now I have to drive fifteen minutes to work. The 30-second commute was definitely better, but I do enjoy my current job.
  • SSteveSSteve Posts: 808
    edited 2011-04-27 21:33
    Steve, most likely that is because it did not catch up changes to spincodelexer.cpp due to failures to launch re2c. Try to delete spincodelexer.cpp (or select "Clean All" from Qt Creator's "Build" menu), then rebuild pzst

    Success! Pzst compiles and runs. Where does pzst look for bstc.osx? It's in my path, but I'm getting the "Failed to start compiler" message. [Edit: I tried renaming bstc.osx to bstc but still get the error.]

    Unfortunately, I won't be able to hook up a Propeller to test until this weekend. Tomorrow night I'm going to the Parallax meetup in Rocklin and Friday night is promised to my wife.
Sign In or Register to comment.