Spin2 editor (now works with P1 & P2)

1356

Comments

  • I really LOVE that, without changing files in your project directory, you can test-run changes easy.

    Yup. Same.
    Do not taunt Happy Fun Ball! @opengeekorg ---> Be Excellent To One Another SKYPE = acuity_doug
    Parallax colors simplified: https://forums.parallax.com/discussion/123709/commented-graphics-demo-spin<br>
  • potatohead wrote: »
    I really LOVE that, without changing files in your project directory, you can test-run changes easy.

    Yup. Same.
    Have you ever lost your work because after an afternoon of testing you forgot to save your file?
  • potatoheadpotatohead Posts: 9,714
    edited 2018-09-04 - 02:33:26
    Nope.

    Like just about everything else "warm fuzzy" = save, super easy, built in, default workflow, muscle memory. It's no different from an afternoon writing in Microsoft Word, or Powerpoint, and failing to save.

    Most people do that once, maybe twice, then it's over.

    What actually happens, is people do some work, like it, save that state, continue, maybe don't like it, revert, or maybe are not sure, so they save as, continue...





    Do not taunt Happy Fun Ball! @opengeekorg ---> Be Excellent To One Another SKYPE = acuity_doug
    Parallax colors simplified: https://forums.parallax.com/discussion/123709/commented-graphics-demo-spin<br>
  • jmgjmg Posts: 13,449
    David Betz wrote: »
    Have you ever lost your work because after an afternoon of testing you forgot to save your file?
    .. or there was a power cut...., or windows decided to force a restart.... or the Class bell rang, and the stampede for the door occurred...

    LOTS of reasons to not fool about with volatile memory, and very few reasons to actually need it.
    More than enough ways for failures already lurk, without crafting new ones !

    Many company flows expect/require that a batch build, gives the identical output every time. No context or order funnies lurking...

  • potatoheadpotatohead Posts: 9,714
    edited 2018-09-04 - 04:34:30
    Feel free to continue that workflow jmg. :D

    Frankly, being on laptops these days, very little of that kind of thing actually happens. (And Microsoft finally backed off the update mess. Computers don't just restart, and if they do, the user did something. So don't do that. And when they did fix that, I went ahead and setup a Win 10 machine. So far, it's pretty great. I'm happy as I was with 7, which is what my PropTool computer still runs for now.)

    This isn't about companies. It's all about individual developers, perhaps small teams working on things. When one is rapid testing, learning, build from RAM is a killer workflow.

    Make no mistake, build from disk is the pro way. I won't argue that. However, when one isn't a pro... :D Like I said, it's nice to have options.

    It's the little stuff like this, how SPIN works, PropTool, etc... that made for a very compelling package. It is very different in some basic ways, and those matter to people. That is precisely why many who used the tools want to continue, myself included.

    The little notebook holding PropTool, and some other goodies, has basically performed the same way for a really long time. All the code works, and it's robust. Love that, would not give it up very easy. IMHO, it's "finished" Better can be done. Has. If I need that, great! Really haven't, but for a time or two.

    And that thing is some crappy Intel Atom, 1GB RAM, Win 7 Starter, or MATE Linux. It's juuuuuust enough to develop for the Prop very comfortably. It has more trouble loading larger web pages, and handling images than it ever does building P1 programs. I modified the batteries from the shipped default. It runs for basically a day. Weighs nothing, tiny.

    If you are working on a laptop, netbook, tablet, or phone, power loss is a non issue, solved problem. Other things could happen. In practice, they basically don't. That's no joke.

    Besides, this also isn't about changing 100 lines, adding 50, kinds of things. One could just save on a given investment like that.

    No, this is about quick testing, change a value, conditional, edit some data, check, look good? Great, save, continue to build. Looks bad? Either revert, or modify, test, repeat. A really good use case is firing up a demo someone made. You can just poke at it to get a feel before jumping into doing something more involved. The other use case, I find compelling, is just picking through someone else's code. Poking around with no worries is a luxury, and super lean. Nothing really has to change, unless one is good and ready for that to actually happen, and there is no real planning involved, nor needed either.

    These SSD devices have added one other nice change, and that is rapid, no moving parts, hibernate. I've set all my machines to do that on lid close, and I no longer have desktop machines at all. I can't tell you when I had a power event happen last. It's been darn near a decade. If not more. So, that "rush on class bell" case is a doddle. Just close the lid, stuff it in your back pack, and go! When you land somewhere, open it up, and it's all gonna be there, easy peasy.

    Advances in tech have made this kind of workflow far less of an issue than it once was. Even then, it was fine, and millions of people do it every day too. My point being, having this as an option makes some sense for more users than we would probably admit. It's a nice option, that's all. One I would love to see continued because I do make use of it consistently.

    Should we get an on-chip environment fired up, it will pay off there too.

    When it's there, I find it feels much more like interpreted systems are. Speed and lean operation are both on par, at least for small to modest code bodies. It's nice to just write a couple lines, run it, write a couple more, or different ones, run those. Like for toggling pins, bone head simple hardware tests, poking at a sensor...

    To get better, we need a real interpreter, or Tachyon, and the good news there is we get a little bit of that right out of the gate on P2!

    Not all state is a big deal. In fact, I would argue for smaller state change or just the state itself, inclusive type cases, it's leaner to work this way than it is build from storage.
    Do not taunt Happy Fun Ball! @opengeekorg ---> Be Excellent To One Another SKYPE = acuity_doug
    Parallax colors simplified: https://forums.parallax.com/discussion/123709/commented-graphics-demo-spin<br>
  • jmgjmg Posts: 13,449
    potatohead wrote: »
    No, this is about quick testing, change a value, conditional, edit some data, check, look good? Great, save, continue to build. Looks bad? Either revert, or modify, test, repeat. A really good use case is firing up a demo someone made. You can just poke at it to get a feel before jumping into doing something more involved. The other use case, I find compelling, is just picking through someone else's code. Poking around with no worries is a luxury, and super lean...

    Yup, I often do exactly that too, using the undo-across-save feature in Notepad, and conditional compile is great too. Works a treat, and I have less risk exposure.
    Conditional compile also archives, so I remember what tests I did 5 months later. Try that with your RAM hosted forks !! ;)

  • You have more overhead. And that's just fine. You've made investments with specific ends in mind. Having options means we all get to do that, or not, depending on what those ends and specifics may be.

    It's like having interrupts, come to think about it. You know, there is people want to use them?

    Do not taunt Happy Fun Ball! @opengeekorg ---> Be Excellent To One Another SKYPE = acuity_doug
    Parallax colors simplified: https://forums.parallax.com/discussion/123709/commented-graphics-demo-spin<br>
  • David Betz wrote: »
    Have you ever lost your work because after an afternoon of testing you forgot to save your file?

    Well, the beauty is that you can save your file as usual, it is in a different directory, but while compiling the file in the tab comes first.

    Mike
    I am just another Code Monkey.
    A determined coder can write COBOL programs in any language. -- Author unknown.
    Press any key to continue, any other key to quit

    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this post are to be interpreted as described in RFC 2119.
  • TorTor Posts: 1,972
    edited 2018-09-04 - 09:12:19
    o Compiling from memory: There's nothing magic to this, many programs can do similar things. What you do is simply to write to a temporary file, using the 'give me a temporary filename' system function of your OS, compile, then delete the temporary file. No need for a compiler 'library', just execute the command line compiler as per usual.

    o Forgot to save the file: My Emacs editor, and most sane editors, never let me do that. a) If I try to exit the editor it will ask me about every buffer I haven't saved, and b) it auto-saves continously to its own temporary files, so if I just shut down the computer I'll get access to the 'non-saved' files the next time I try to edit that file. I haven't lost a single file because of not-saving-it accidents, not in the last twenty years at least. Not once. I'm absolutely baffled whenever I hear about someone losing files that way. What editor are they using?
  • Tor,
    your solution doesn't work in many cases. Top file includes a file by name, that file is in a tab edited, your temp file is ignored in compile. Same for many files included by other files, all in tabs... edited or not.

  • It can be made to work though.

    Once a file is opened create a copy of it into a temp file and keep a record of the temp file names for each real file. When any other file makes a reference to another just look up the temp file name for it and use that instead.

    Kind of messy and clunky I guess.

    Better to just compile what is in the real file. Save then compile.

    If anyone wants to go backwards that is what undo is for.

    If your experiments are a bit big to manage/revert with undo use git.


  • TorTor Posts: 1,972
    edited 2018-09-04 - 09:37:45
    Heater. wrote: »
    Once a file is opened create a copy of it into a temp file and keep a record of the temp file names for each real file. When any other file makes a reference to another just look up the temp file name.

    It wouldn't work with a standalone compiler though - so it wouldn't solve the problem Roy pointed out w.r.t. my suggestion. The standalone compiler wouldn't know about the table that the editor maintains.
    But, instead of a temporary file, write the buffer(s) to a temporary directory, using their proper names.. then a compile would work. Unless the 'include' directives point to absolute paths.
  • Roy ElthamRoy Eltham Posts: 2,604
    edited 2018-09-04 - 10:02:31
    It's all just messy. The way proptool does it is simple. My code supports that.
    You can do whatever you want.

    Also, part of the reason I didn't mention my editor/ide thing before is all this design by committee stuff that happens here with people demanding you do it their way. I intended to just make it and drop it on you all, and let you deal with it.
    I'm not really planning on finishing it now, too many other editors being made. I just wanted something to use OpenSpin properly and by default.
  • I see now that the highlighting is different inside a DAT section... More work to do still...
    Prop Info and Apps: http://www.rayslogic.com/
  • Hmm... think I'll write myself an editor:)

    Maybe I should get back to that completely in browser IDE msrobots and I were putting together some time ago...

  • FWIW - my take on editors and compilers...

    I love PropTool. It's simple and does the job and I love the built in editor, compiler and downloader. I like the compile without saving as I have my own method to save versions. But PropToo is missing a terminal emulator. PST works, but it's not ideal.

    @ make it indispensable when required.

    However, P2 code development caused me to operate differently. In P2 I edited in PropTool, saved (but left it open), re-read in pnut and compiled and downloaded.

    This took me back to the past where I had to use a separate editor, etc. So this leads me to a different opinion of what I think the P2 scene should look like...

    A separate cross platform full featured editor... my choice is NotePad++. Syntax highlighting can be done somewhat easily. It's not going to be a PropTool equivalent. But then again, syntax highlighting can be done a lot better IMHO.

    That leaves us with OpenSpin2. If it gets the support that it didn't unfortunately get in P1, then all those features such as macros etc that we've been wanting for the past 10 years might just get done.

    So I guess I am leaning on the separate programs and tie them together by command passing or a batch file.
    My Prop boards: P8XBlade2, RamBlade, CpuBlade, TriBlade
    Prop OS (also see Sphinx, PropDos, PropCmd, Spinix)
    Website: www.clusos.com
    Prop Tools (Index) , Emulators (Index) , ZiCog (Z80)
  • I'm all for the idea of keeping the compilers and tools as separate command line programs. Then they can be used from any IDE/editor.

    Notepad++ is anything but cross platform. It's written to the legacy Win32 API.

  • Sigh...

    Do not taunt Happy Fun Ball! @opengeekorg ---> Be Excellent To One Another SKYPE = acuity_doug
    Parallax colors simplified: https://forums.parallax.com/discussion/123709/commented-graphics-demo-spin<br>
  • potatohead wrote: »
    Should we get an on-chip environment fired up, it will pay off there too.

    I think this is potentially where things get really interesting. Keen to see what Chip has in mind for those second VGA ports on the P123 boards.



  • I agree. A no dependencies type environment could be really stable over longer periods of time.

    Good times ahead, IMHO
    Do not taunt Happy Fun Ball! @opengeekorg ---> Be Excellent To One Another SKYPE = acuity_doug
    Parallax colors simplified: https://forums.parallax.com/discussion/123709/commented-graphics-demo-spin<br>
  • Heater. wrote: »
    I'm all for the idea of keeping the compilers and tools as separate command line programs. Then they can be used from any IDE/editor.

    Notepad++ is anything but cross platform. It's written to the legacy Win32 API.

    Oh! I thought it was cross platform and open source. :(
    My Prop boards: P8XBlade2, RamBlade, CpuBlade, TriBlade
    Prop OS (also see Sphinx, PropDos, PropCmd, Spinix)
    Website: www.clusos.com
    Prop Tools (Index) , Emulators (Index) , ZiCog (Z80)
  • RaymanRayman Posts: 9,456
    edited 2018-09-05 - 14:16:29
    I think I have DAT sections drawing about right now...
    Just noticed that things like "<<" get a different highlight, but going to ignore that for now...

    Getting hard to tell between this and PropTool now...
    I fixed the accelerator for redo also.
    1130 x 1171 - 113K
    Prop Info and Apps: http://www.rayslogic.com/
  • RaymanRayman Posts: 9,456
    edited 2018-09-05 - 14:41:04
    Shoot, just noticed that things like "if_z" aren't working right because the "_" character mucks up word delineation...
    Prop Info and Apps: http://www.rayslogic.com/
  • Maybe all better now:
    1130 x 1171 - 107K
    Prop Info and Apps: http://www.rayslogic.com/
  • Rayman wrote: »
    I think I have DAT sections drawing about right now...
    Just noticed that things like "<<" get a different highlight, but going to ignore that for now...

    Getting hard to tell between this and PropTool now...
    I fixed the accelerator for redo also.

    Looking good!

    Yeah, where are you headed? LOL.
    Do not taunt Happy Fun Ball! @opengeekorg ---> Be Excellent To One Another SKYPE = acuity_doug
    Parallax colors simplified: https://forums.parallax.com/discussion/123709/commented-graphics-demo-spin<br>
  • I'm about to add a Spin2 mode to the colorizer...
    Prop Info and Apps: http://www.rayslogic.com/
  • Ray
    Does your colorizer allow users to pick the colors/bold/etc. for each catagory like PropTool, or are you just using the defaults fixed?
  • That could be added, but I personally have never used that option... So, it's not on the current ToDo list...
    Prop Info and Apps: http://www.rayslogic.com/
  • RaymanRayman Posts: 9,456
    edited 2018-09-05 - 16:36:16
    Whole reason I'm doing this is the get back the Prop Tool default coloring...
    I've been using Prop Tool for many years now and somehow feel more comfortable with the colors.
    I think it may actually help me remember how to code for Propeller...
    Prop Info and Apps: http://www.rayslogic.com/
  • It definitely helps me when I have been away from it.
    Do not taunt Happy Fun Ball! @opengeekorg ---> Be Excellent To One Another SKYPE = acuity_doug
    Parallax colors simplified: https://forums.parallax.com/discussion/123709/commented-graphics-demo-spin<br>
Sign In or Register to comment.