RXB Posted November 20, 2019 Share Posted November 20, 2019 9 hours ago, Vorticon said: I don't know about less code, but definitely a better structured program with clearly defined and controlled subroutine parameters. I rely on them heavily. A SUB creates a list of Temporary variable separate from normal Variables, this saves memory in VDP. Quote Link to comment Share on other sites More sharing options...
+TheBF Posted November 20, 2019 Share Posted November 20, 2019 Where are the local variables for the SUB kept Rich? (Never looked into this stuff) Quote Link to comment Share on other sites More sharing options...
RXB Posted November 20, 2019 Share Posted November 20, 2019 12 hours ago, TheBF said: Where are the local variables for the SUB kept Rich? (Never looked into this stuff) A temporary VDP Buffer is set up and as the main variables already have the values after completion there is no need to save them. This works the same way as a DSR VDP buffer, it is set up and used but deleted when done. 1 Quote Link to comment Share on other sites More sharing options...
+Vorticon Posted November 20, 2019 Share Posted November 20, 2019 On 11/17/2019 at 10:17 PM, matthew180 said: Ok, looking into it now. Can you give me a few lines of the actual code? Also note, labels that collide with reserved words are silently ignored. Here you go: OPEN #1:"RS232".BA=9600.DA=7,UPDATE !OPEN SERIAL COMM WITH ROBOT PRINT #1:5 !SEND MOVE FORWARD CODE TO ROBOT fwd_complete: ON ERROR fwd_complete::INPUT #1:ANS$ !WAIT FOR CONFIRMATION FROM ROBOT ON ERROR STOP !RESUME NORMAL ERROR TRAPPING IF ANS$<>"89" THEN fwd_complete !KEEP CHEKCING UNTIL CORRECT CODE RECEIVED ... The fwd_complete label does not resolve to a line number inside the ON ERROR line, but it does outside of it. Quote Link to comment Share on other sites More sharing options...
+Vorticon Posted November 20, 2019 Share Posted November 20, 2019 On 11/18/2019 at 2:00 AM, matthew180 said: Ok, the double-colon problem is now fixed, and it also fixes the problem posted in #219 above. I have updated the download file on the first page of this post (V3.1), as well as my website. Also, Vorticon, I'm not sure if you realize but you don't need the continuation operator ".." if the line ends with the double-colon. I have not seen your tidbit code recently, but the examples you posted many moons ago showed you were still using the ":: .." syntax. A=1 :: B=2 :: C=3 :: Translates to: A=1::B=2::C=3 You *don't* need to do this (since somewhere around 2015 or 2016 I think) A=1 :: .. B=2 :: .. C=3 Noted. Thanks. Quote Link to comment Share on other sites More sharing options...
matthew180 Posted November 20, 2019 Author Share Posted November 20, 2019 2 hours ago, Vorticon said: The fwd_complete label does not resolve to a line number inside the ON ERROR line, but it does outside of it. This is fixed now, since Monday. 2 1 Quote Link to comment Share on other sites More sharing options...
+Vorticon Posted November 28, 2019 Share Posted November 28, 2019 I found another bug related to ON ERROR. ON ERROR err_sub INPUT #1:ANS$ ... continue: PRINT "HELLO" END ... err_sub PRINT "ERROR!" RETURN continue <--- this label is not converted to a line number Quote Quote Link to comment Share on other sites More sharing options...
matthew180 Posted November 30, 2019 Author Share Posted November 30, 2019 The word "continue" is a reserved word and cannot be used as a label. Right now, any reserved words that are used as labels are silently ignored, i.e. they will pass through unmodified. If you change the code above to something like this, it will work: ON ERROR err_sub INPUT #1:ANS$ err_continue: PRINT "HELLO" END err_sub: PRINT "ERROR!" RETURN err_continue ---------------- 100 ON ERROR 140 110 INPUT #1:ANS$ 120 PRINT "HELLO" 130 END 140 PRINT "ERROR!" 150 RETURN 120 If you have any suggestions as to what to do about labels that conflict with reserved words, please let me know. To keep the parser simple it does not actually interpret the code, so it does not have the context to know the difference between a label's use and a real BASIC statement/word (which is why all BASIC and XB statements/words are reserved and cannot be used for labels). Currently, this is the list: private $reserved_words = array( 'abs', 'accept', 'all', 'and', 'append', 'asc', 'at', 'atn', 'base', 'beep', 'break', 'bye', 'call', 'chr$', 'close', 'con', 'continue', 'cos', 'data', 'def', 'delete', 'digit', 'dim', 'display', 'else', 'end', 'eof', 'erase', 'error', 'exp', 'fixed', 'for', 'go', 'gosub', 'goto', 'if', 'image', 'input', 'int', 'internal', 'len', 'let', 'linput', 'list', 'log', 'max', 'merge', 'min', 'new', 'next', 'not', 'num', 'number', 'numeric', 'old', 'on', 'open', 'option', 'or', 'output', 'permanent', 'pi', 'pos', 'print', 'randomize', 'read', 'rec', 'relative', 'rem', 'res', 'resequence', 'restore', 'return', 'rnd', 'rpt$', 'run', 'save', 'seg$', 'sequential', 'sgn', 'sin', 'size', 'sqr', 'step', 'stop', 'str$', 'sub', 'subend', 'subexit', 'tab', 'tan', 'then', 'to', 'trace', 'ualpha', 'unbreak', 'untrace', 'update', 'using', 'val', 'validate', 'variable', 'warning', 'xor' ); 2 1 Quote Link to comment Share on other sites More sharing options...
matthew180 Posted April 3, 2020 Author Share Posted April 3, 2020 I'm wondering if anyone is actively using TidBit on my website? Due to the pandemic situation, I'm going to be shutting down my current server and moving to a smaller cheaper service, and I'm reluctant to keep the "online" TidBit page working. The security risk has always made me uncomfortable too. Anyway, since I don't run any stats on my website, I don't know how much that page actually gets used. Quote Link to comment Share on other sites More sharing options...
RickyDean Posted April 3, 2020 Share Posted April 3, 2020 11 minutes ago, matthew180 said: I'm wondering if anyone is actively using TidBit on my website? Due to the pandemic situation, I'm going to be shutting down my current server and moving to a smaller cheaper service, and I'm reluctant to keep the "online" TidBit page working. The security risk has always made me uncomfortable too. Anyway, since I don't run any stats on my website, I don't know how much that page actually gets used. I piddled yesterday, but don't really use it. Quote Link to comment Share on other sites More sharing options...
+Vorticon Posted April 3, 2020 Share Posted April 3, 2020 3 hours ago, matthew180 said: I'm wondering if anyone is actively using TidBit on my website? Due to the pandemic situation, I'm going to be shutting down my current server and moving to a smaller cheaper service, and I'm reluctant to keep the "online" TidBit page working. The security risk has always made me uncomfortable too. Anyway, since I don't run any stats on my website, I don't know how much that page actually gets used. I definitely use it any time I work on an XB program. I can always install php on my computer and use it that way as well. Quote Link to comment Share on other sites More sharing options...
+OLD CS1 Posted April 3, 2020 Share Posted April 3, 2020 I have a cunning plan... Quote Link to comment Share on other sites More sharing options...
matthew180 Posted April 3, 2020 Author Share Posted April 3, 2020 Depending on the demand for a browser-based TidBit, I was considering porting it to C, the use Emscripten to compile to JavaScript. Then it would run in people's browser instead of on my server, and it would not be a security risk to my server either. But that is a lot of effort if no one is really using it very often. Maybe after the MK2 is done... Or, just port to C and make a native app for Win/MAC/Unix. 17 minutes ago, OLD CS1 said: I have a cunning plan... What is your plan? Quote Link to comment Share on other sites More sharing options...
jwild Posted April 4, 2020 Share Posted April 4, 2020 I can’t say I use it very often, but I have been using the version on your website. I understand the desire to get rid of security risks, but please don’t let the concept die. And thanks for making these cool tools.Sent from my iPad using Tapatalk Quote Link to comment Share on other sites More sharing options...
matthew180 Posted April 4, 2020 Author Share Posted April 4, 2020 3 hours ago, jwild said: ... but please don’t let the concept die. ... I'm not talking about it going away, the program has always been available as open-source. You can download and run it on your own computer. I'm just talking about not moving the functional page on CodeHackCreate.com to the new domain (dnotq.io) that I'm migrating to. TidBit will always have a page that describes it, as well as the github repo: https://github.com/dnotq/tidbit 7 hours ago, Vorticon said: I definitely use it any time I work on an XB program. Would having a native Win/MAC/Unix executable be better for your workflow? If I port it to C, this would be an option. 1 Quote Link to comment Share on other sites More sharing options...
+Vorticon Posted April 4, 2020 Share Posted April 4, 2020 5 hours ago, matthew180 said: Would having a native Win/MAC/Unix executable be better for your workflow? If I port it to C, this would be an option. Yes that would work great. For the record, I really think no one should code in Basic or XB without using TIdBiT unless working on real iron exclusively. 2 Quote Link to comment Share on other sites More sharing options...
unhuman Posted April 4, 2020 Share Posted April 4, 2020 (edited) @matthew180 I'd be happy to host. I have a pile of resources. Edited April 4, 2020 by unhuman Quote Link to comment Share on other sites More sharing options...
PeteE Posted April 4, 2020 Share Posted April 4, 2020 Porting to C would also have a potential advantage of being compiled using GCC for the TMS9900 so that you could run it natively on the TI. I've got another C project that I'm doing to learn how to use files on the TI, so I can offer my help with TidBit too. Quote Link to comment Share on other sites More sharing options...
matthew180 Posted April 4, 2020 Author Share Posted April 4, 2020 6 hours ago, unhuman said: I'd be happy to host. ... TibBit has always been open source, it is just one PHP file, and two example support files depending on if you want to run from the command line or via a web-form. Anyone who wants to set up a page on their website, please feel free to do so. 1 hour ago, PeteE said: Porting to C would also have a potential advantage of being compiled using GCC for the TMS9900 so that you could run it natively on the TI. Interesting. Possible I suppose. But the tool expects the source to be entirely in memory for parsing and building the symbol table, which takes up even more memory and a lot of time searching. I'll keep it in mind, but I can't make any promises, and I don't have a lot of time to spend on this. Quote Link to comment Share on other sites More sharing options...
+OLD CS1 Posted April 4, 2020 Share Posted April 4, 2020 I expect to have tidbit99.com set up by Monday 3 Quote Link to comment Share on other sites More sharing options...
LASooner Posted April 5, 2020 Share Posted April 5, 2020 I find it way better to use it locally on my machine using batch scriptsSent from my Pixel XL using Tapatalk Quote Link to comment Share on other sites More sharing options...
+jedimatt42 Posted April 6, 2020 Share Posted April 6, 2020 I added a feature to TIPI this weekend, that lets you OLD or RUN your native tidbit source directly into basic/xb as though it was a PROGRAM image file. Just edit from your PC, and load on the 4A. Conversion happens as the load occurs. Files must end in '.TB' on your PC, that '/TB' from the 4A perspective. -M@ 10 2 Quote Link to comment Share on other sites More sharing options...
matthew180 Posted April 6, 2020 Author Share Posted April 6, 2020 2 hours ago, jedimatt42 said: Just edit from your PC, and load on the 4A. Conversion happens as the load occurs. That is very cool. Nice reason to run locally too. Thanks for doing this. 5 Quote Link to comment Share on other sites More sharing options...
+OLD CS1 Posted April 6, 2020 Share Posted April 6, 2020 Happy to say that TIdBit has a new home at https://tidbit99.com It ain't purty but it is functional. I may dress it up a bit when I requisition a round tuit. 7 1 Quote Link to comment Share on other sites More sharing options...
+OLD CS1 Posted July 30, 2020 Share Posted July 30, 2020 NEW FEATURE for TIdBiT99.com combining the great works of @matthew180 and @Fredrik Öhrström! After translating your TIdBiT source into a program, a DOWNLOAD button will appear under the resulting program listing. This will download your program as a TIFILES binary. 5 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.