Shop OBEX P1 Docs P2 Docs Learn Events
REPL for SPIN2? — Parallax Forums

REPL for SPIN2?

The recent JavaScript discussion, which also mentioned environments like Lua and Python, touched on their REPL capabilities. It occurs to me that this might a good thing for SPIN2 to support. From an educational perspective, I find REPL to be extremely handy for experimentation and learning.

Comments

  • There already is a mature REPL...it's called Tachyon2!!
  • mindrobots wrote: »
    There already is a mature REPL...it's called Tachyon2!!
    Tachyon2 is SPIN?
  • yetiyeti Posts: 818
    edited 2016-07-16 14:11
    Seairth wrote: »
    The recent JavaScript discussion, which also mentioned environments like Lua and Python, touched on their REPL capabilities. It occurs to me that this might a good thing for SPIN2 to support. From an educational perspective, I find REPL to be extremely handy for experimentation and learning.
    Using Propeller-OSes like Sphinx and Spinix (some others too), you can run a SPIN compiler on the Propeller1.

    That's not really a SPIN REPL but a step into the direction of a self hosted SPIN based system...
  • yeti wrote: »
    mindrobots wrote: »
    There already is a mature REPL...it's called Tachyon2!!
    Tachyon2 is SPIN?

    Spin is not REPL but Tachyon is, but more correctly it Reads, Compiles, Executes, Loop, so it is more of a RCEL as that whole EVAL PRINT thing is a bit of an over simplification.

    Here is some simple Tachyon for the P2 (TF2) console "REPL"
    TF2# Q
    --------------------------------------------------------------------------------
    CODE MEMORY  @ $00.8152 for 29,010
    NAME MEMORY  @ $00.B3D0 for 9,973
    DATA MEMORY  @ $00.E310 for 290
    FREE MEMORY  = 12,926
    
    MODULES LOADED:
    7197: EASYNET.fth         WIZNET NETWORK SERVERS 160707.1500
    655B: W5500.fth           WIZNET W5500 driver for TF2 160707.1500
    4F9A: SDFAT.fth           P2 SDFAT FILE SYSTEM - 160619.0000
    2D80: EXTEND.fth          TACHYON FORTH EXTENSIONS for the P2 - 160707-1500
    POLL #0 ?EASYNET
    2016/07/17 SUN 00:24:01
    -------------------------------------------------------------------------------- ok
    TF2# .VER   Parallax Propeller 2 .:.:--TACHYON--:.:. Forth V11160702.1400 PIONEER
     ok
    TF2# $7F $20 DO I EMIT LOOP  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ok
    TF2# ls
    NO NAME
    WARPEACE.TXT   EXTEND  .FTH   EEWORDS .FTH   VGA     .FTH   CLOCK   .FTH
    EASYFILE.FTH   BREAKOUT.FTH   SDCARD  .FTH   W5500   .FTH   LIFE    .FTH
    EASYNET .FTH   IOT5500 .HTM   WELCOME .TEL   POPCORN .MP3   HOME    .HTM
    P8CPU   .JPG   IOTPINS .JPG   LOVE    .WAV   HELP    .TXT   P8      .H
    IOT5500H.JPG   DRAGON  .JPG   IOT5500 .JPG   128K    .BIN   256K    .BIN
    W5200   .FTH   PREVIOUS.ROM   DEBUG   .ROM   POPCORN .WAV   P8X32A  .PDF
    IMAGE3         FRED    .PNG   FSRSCH  .PNG   FSRPCB  .PNG   IMAGE
    HTTP404 .HTM   IMAGE2         IMAGE1         LOGON   .HTM   TACHYON .HTM
    WELCOME .FTP   P2BOOT  .IMG   POWERMAX.LOG   SITE0002.LOG   SITE0001.LOG
    FAVICON .ICO   PARALLAX.PNG   HOME1   .HTM   SYSLOG  .TXT   HCB4208 .JPG
    CE1372  .JPG   CE1372  .PDF   CHARLCD .JPG   ECOLCD  .PDF   LOVE    .MP3
    FIRMWARE.ROM     ok
    TF2# ifconfig
    NETWORK STATUS:
    LINK *UP*
    HARDWARE: BeMicroCV-A9 using WIZnet W5500 V4
    SRC IP    192.168.016.150
    MASK      255.255.255.000
    GATEWAY   192.168.016.001
    MAC       02.FF.FB.1D.A6.9B.
    SKT HH:MM:SS MODE  PORT  DEST TXRD TXWR RXRD RXWR RXSZ  IR STATUS            IP ADDR
    #1  00:24:37 TCP     21 53134     .    .    .    .    . 08 14 LISTEN
    #2  00:24:37 TCP        53069 DE11.DE11.    .    .    . 13 00 closed
    #3  00:24:37 TCP  10001 19790     .    .    .    .    . 04 14 LISTEN
    #4  00:24:37 TCP     81           .    .    .    .    . 00 14 LISTEN
     ok
    TF2#
    
  • yetiyeti Posts: 818
    edited 2016-07-16 14:17
    yeti wrote: »
    mindrobots wrote: »
    There already is a mature REPL...it's called Tachyon2!!
    Tachyon2 is SPIN?

    Spin is not REPL but Tachyon is, but more correctly it Reads, Compiles, Executes, Loop, so it is more of a RCEL as that whole EVAL PRINT thing is a bit of an over simplification.
    The question definitely was for a SPIN REPL.

    Why do Forthers always jump into non Forth threads advertising Forth?

    That's annoying!

    I want a Forth ad-blocker...
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2016-07-16 14:27
    yeti wrote: »
    yeti wrote: »
    mindrobots wrote: »
    There already is a mature REPL...it's called Tachyon2!!
    Tachyon2 is SPIN?

    Spin is not REPL but Tachyon is, but more correctly it Reads, Compiles, Executes, Loop, so it is more of a RCEL as that whole EVAL PRINT thing is a bit of an over simplification.
    The question definitely was for a SPIN REPL.

    Why do Forthers always jump into non Forth threads advertising Forth?

    That's annoying!

    I want a Forth ad-blocker...

    Why are you being so rude, I simply answered your (first) question in line with the OP's statement " I find REPL to be extremely handy for experimentation and learning. " and the reply by mindrobots.

    Anyway, there is no such thing as a "Forther" as if it is about "us" and "them". Forth is a tool that is available, why would I try to hammer a screw in because I hate "drillers"? Just use the best tool available.

  • yeti wrote: »
    mindrobots wrote: »
    There already is a mature REPL...it's called Tachyon2!!
    Tachyon2 is SPIN?

    Peter has also talked about being able to support Spin syntax on top of the Tachyon VM. That would for all practical purposes give you a Spin REPL rather quickly.

    Sorry you got up on the wrong side of the bed today. Forums seem to be a silly thing to get upset about these days with everything else going on.

Sign In or Register to comment.