Sinphaltimus Posted December 26, 2016 Share Posted December 26, 2016 (edited) They seem the same to me? Prefer offline since I travel and am often without internet. AFAIK, the web interface has the top and bottom screens, top for input, bottom for output. The application is command prompt only. What are you using when offline? Edited December 26, 2016 by Sinphaltimus Quote Link to comment Share on other sites More sharing options...
Airshack Posted December 26, 2016 Share Posted December 26, 2016 (edited) 1. Open the windows command prompt. 2. Change directory path to your PHP path. 3. Type: PHP> php -S localhost:8000 4. Open browser 5. Within browser enter URL: localhost:8000/tidbit_web.php Makes TIdbit work offline exactly as it does online -- in the browser. No need to ever use the online interface again. No longer dependent on the web. Sent from my iPhone using Tapatalk Edited December 26, 2016 by Airshack 1 Quote Link to comment Share on other sites More sharing options...
Sinphaltimus Posted December 26, 2016 Share Posted December 26, 2016 1. Open the windows command prompt. 2. Change directory path to your PHP path. 3. Type: PHP> php -S localhost:8000 4. Open browser 5. Within browser enter URL: localhost:8000/tidbit_web.php Makes TIdbit work offline exactly as it does online -- in the browser. No need to ever use the online interface again. No longer dependent on the web. Sent from my iPhone using Tapatalk You're now my short duration personal saviour for the day! Quote Link to comment Share on other sites More sharing options...
Airshack Posted December 26, 2016 Share Posted December 26, 2016 We're learning so much of this together you know. I've been reading your questions and learning from them. Glad to have been of some assistance. You made me aware of TIdbit btw. Sent from my iPhone using Tapatalk 1 Quote Link to comment Share on other sites More sharing options...
matthew180 Posted December 30, 2016 Author Share Posted December 30, 2016 Just as an alternative, the command-line work-flow looks like this: 1. edit your TidBit code. 2. at the command prompt, hit "up-arrow" then "enter". 3. copy output code to emulator and run. 4. goto 1. Step 2 could also be automated depending on your editor, since many editors have the ability to run external commands. Some assumptions to making this work: 1. php is in your path, so from anywhere at a command prompt you can type "php" and the interpreter will run. 2. the command line "tidbit_cmd.php" is located with your source code, or someplace that you know the path. 3. that you understand the command-prompt "history", i.e. hitting the "up-arrow" at the command prompt takes you back through any previous commands you have entered. So the whole "setup" would look like this: 1. open your TidBit source in your favorite text editor (Textpad, Notepad++, etc.), using "source.txt" in this example. 2. open or create the output file (the code that TidBit will generate) in your favorite text editor, using "output.txt" in this example. If you are just starting out then this file may be empty. You will never edit this file directly, just copy the code from this file. 3. open a command prompt and change to whatever directory you have you TidBit source and output files in (I assume then reside in the same directory). 4. at the command prompt type: php <path_to_tidbit>\tidbit_cmd.php source.txt 100 10 output.txt 5. edit your TidBit code. 6. at the command prompt, hit "up-arrow" then "enter". Or, if you have a macro set up in your text editor, activate the macro. 7. switch to the output.txt file, your editor should be telling you it has changed. Acknowledge and accept the changes since this is the code just generated by TidBit in the previous step. 8. select-all and copy from ouptput.txt and paste into your emulator to run. 9. goto 5. Quote Link to comment Share on other sites More sharing options...
Sinphaltimus Posted December 30, 2016 Share Posted December 30, 2016 I appreciate all that, I really do there's something about the interface I can't get away from. I don't have to worry about paths or files or anything. My workflow now consists of this: 1. Execute custom batch file to launch tidbit web on local host. 2. Open np++ which auto opens my source and tidbit output. 3. Edit source. 4. Copy paste source in to tb, translate, then copy paste output in to np++ file. 5. Edit tb output (because I have commented lines that need to be executed when I copy paste into emulator. 6. Copy paste in to emulator and test. This is my dream zone where everything happens within my comfort zone of happiness. Quote Link to comment Share on other sites More sharing options...
Airshack Posted January 14, 2017 Share Posted January 14, 2017 See above^^^^ No typing just copy and paste = user friendly and best. 1 Quote Link to comment Share on other sites More sharing options...
LASooner Posted August 20, 2017 Share Posted August 20, 2017 (edited) So I'm using TIdBit a lot lately and the workflow was starting to get in my way. Yes it's faster than typing it all in on the TI, but it could be faster with the command line version. It requires that you have TIdBIT set up locally I've created 2 batch scripts to help speed up using it You'll need to edit both to add your own paths to PHP and TIdBIT cmd. The "compile" batch is if you're iterating on the same file, the "input compile" is if you want to do a quick compile on some code without editing the compile batch file Open the input file When you're ready to compile your TIdBIT code,save the source, run the compile batch file When you run it, it copies the compiled file to clipboard, post straight to Classic 99 removes task of copying your source, clearing the web INPUT field, and pasting it, pressing translate, select output, copying output to paste in Classic 99. Also one less window you have to have open or deal with because you're not using a browser anymore. These batch files are going to save some of my sanity. TIdBIT_batchfiles.zip Edited August 20, 2017 by LASooner 2 Quote Link to comment Share on other sites More sharing options...
LASooner Posted August 20, 2017 Share Posted August 20, 2017 (edited) I noodled some more with the batch file, and created an auto compile batch, change the paths and files in auto_compile.bat (everything in astericks below) And when you run it, it will stay resident and check to see if you have changed the file that you specified. So run the batch file, edit your tidbit code in whatever editor you use, save it, it will auto compile and get copied to your clipboard. So as long as the batch is running all you have to do is save and paste into C99 @Echo Off Set _Delay=10 Set _Monitor=[****INPUT PATH****]\input.xb Set _Base=%temp%\BaselineState.dir Set _Chck=%temp%\ChkState.dir Set _OS=6 Ver|Findstr /I /C:"Version 5">Nul If %Errorlevel%==0 Set _OS=5 & Set /A _Delay=_Delay*1000 :_StartMon Call :_SetBaseline "%_Base%" "%_Monitor%" :_MonLoop If %_OS%==5 (Ping 1.0.0.0 -n 1 -w %_Delay%>Nul) Else Timeout %_Delay%>Nul Call :_SetBaseline "%_Chck%" "%_Monitor%" FC /A /L "%_Base%" "%_Chck%">Nul If %ErrorLevel%==0 Goto _MonLoop [****PHP PATH****]\php [****TIdBIT PATH****]\tidbit_cmd.php [****INPUT PATH****]\input.xb 100 10 [****OUTPUT PATH****]\output.xb clip < "[****OUTPUT PATH****]\output.xb" Goto :_StartMon ::::::::::::::::::::::::::::::::::::::::::::::::::: :: Subroutine ::::::::::::::::::::::::::::::::::::::::::::::::::: :_SetBaseline If Exist "%temp%\tempfmstate.dir" Del "%temp%\tempfmstate.dir" For /F "Tokens=* Delims=" %%I In ('Dir /S "%~2"') Do ( Set _Last=%%I >>"%temp%\tempfmstate.dir" Echo.%%I ) >"%~1" Findstr /V /C:"%_Last%" "%temp%\tempfmstate.dir" Goto :EOF TIdBIT_batchfiles - auto_compile.zip Edited August 20, 2017 by LASooner 2 Quote Link to comment Share on other sites More sharing options...
+Vorticon Posted August 20, 2017 Share Posted August 20, 2017 Nice. Will have to try it out. Quote Link to comment Share on other sites More sharing options...
LASooner Posted August 22, 2017 Share Posted August 22, 2017 Just to clarify, "autocompile" translates TIdBit code to Basic. It doesn't actually compile the code to assembly. There was some confusion about that. Quote Link to comment Share on other sites More sharing options...
+Vorticon Posted September 30, 2017 Share Posted September 30, 2017 I noodled some more with the batch file, and created an auto compile batch, change the paths and files in auto_compile.bat (everything in astericks below) And when you run it, it will stay resident and check to see if you have changed the file that you specified. So run the batch file, edit your tidbit code in whatever editor you use, save it, it will auto compile and get copied to your clipboard. So as long as the batch is running all you have to do is save and paste into C99 @Echo Off Set _Delay=10 Set _Monitor=[****INPUT PATH****]\input.xb Set _Base=%temp%\BaselineState.dir Set _Chck=%temp%\ChkState.dir Set _OS=6 Ver|Findstr /I /C:"Version 5">Nul If %Errorlevel%==0 Set _OS=5 & Set /A _Delay=_Delay*1000 :_StartMon Call :_SetBaseline "%_Base%" "%_Monitor%" :_MonLoop If %_OS%==5 (Ping 1.0.0.0 -n 1 -w %_Delay%>Nul) Else Timeout %_Delay%>Nul Call :_SetBaseline "%_Chck%" "%_Monitor%" FC /A /L "%_Base%" "%_Chck%">Nul If %ErrorLevel%==0 Goto _MonLoop [****PHP PATH****]\php [****TIdBIT PATH****]\tidbit_cmd.php [****INPUT PATH****]\input.xb 100 10 [****OUTPUT PATH****]\output.xb clip < "[****OUTPUT PATH****]\output.xb" Goto :_StartMon ::::::::::::::::::::::::::::::::::::::::::::::::::: :: Subroutine ::::::::::::::::::::::::::::::::::::::::::::::::::: :_SetBaseline If Exist "%temp%\tempfmstate.dir" Del "%temp%\tempfmstate.dir" For /F "Tokens=* Delims=" %%I In ('Dir /S "%~2"') Do ( Set _Last=%%I >>"%temp%\tempfmstate.dir" Echo.%%I ) >"%~1" Findstr /V /C:"%_Last%" "%temp%\tempfmstate.dir" Goto :EOF This seems to work really well! Much easier workflow now. Thanks! 1 Quote Link to comment Share on other sites More sharing options...
LASooner Posted September 30, 2017 Share Posted September 30, 2017 no problem. I stopped using the auto translate. I feel like I have more control by executing the batch scripts myself. Quote Link to comment Share on other sites More sharing options...
RXB Posted September 30, 2017 Share Posted September 30, 2017 See above^^^^ No typing just copy and paste = user friendly and best. Same thing I do with GPL Code on Classic99 other then I have to run the Ryte Data GPL Assembler, but I have 4 sessions going on at same time so can do multiple Classic99 projects at once all using varied drives 1 to 9. 1 Quote Link to comment Share on other sites More sharing options...
+Vorticon Posted October 2, 2017 Share Posted October 2, 2017 Looks like I found a bug. When a double colon separating 2 statements follows a label, the label is not interpreted. For example: IF TEST=1 THEN GOSUB some_label :: PRINT "TEST" When translated, the label some_label is not exchanged for a line number... 1 Quote Link to comment Share on other sites More sharing options...
LASooner Posted October 2, 2017 Share Posted October 2, 2017 I ran into this last night, I just added a space between them and it worked fine Quote Link to comment Share on other sites More sharing options...
+Vorticon Posted October 2, 2017 Share Posted October 2, 2017 I ran into this last night, I just added a space between them and it worked fine Good to know. Thanks. Quote Link to comment Share on other sites More sharing options...
matthew180 Posted October 3, 2017 Author Share Posted October 3, 2017 Can you give the me example of the code that does not work, but use the forum [ code ] tags so I can see exact syntax that was failing. Also keep in mind that TidBit does not parse for execution like the real interpreter, thus it relies on space more than the interpreter. Quote Link to comment Share on other sites More sharing options...
+Vorticon Posted October 3, 2017 Share Posted October 3, 2017 Here you go: CALL CLEAR A$="THIS IS A TEST"::GOSUB print_string::STOP print_string: PRINT A$ RETURN Quote Link to comment Share on other sites More sharing options...
matthew180 Posted November 18, 2019 Author Share Posted November 18, 2019 On 10/3/2017 at 4:35 PM, Vorticon said: Hi Matt. I found an error in TidBit with the ON ERROR statement. In the following construct label: ON ERROR label::INPUT #1:ANS$ label is not converted to a line number. It's not a common construct, but I happened to need it for my robotics project... Walid 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. Quote Link to comment Share on other sites More sharing options...
matthew180 Posted November 18, 2019 Author Share Posted November 18, 2019 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 2 Quote Link to comment Share on other sites More sharing options...
RXB Posted November 18, 2019 Share Posted November 18, 2019 You would think this would create more XB programs that use the SUB command but the opposite seems to be the case looking at some programs output. The entire point for SUB name-of-routine was to not use GOSUB and save stack memory being used as the same routine that finds GPL names in XB is used by SUB Quote Link to comment Share on other sites More sharing options...
Opry99er Posted November 18, 2019 Share Posted November 18, 2019 Making the SUB is up to the programmer. All this does is translate labeled BASIC code into line-numbered BASIC code. Programmers can make the SUBs just fine. And they'll translate here just fine. But TIdBiT doesn't take shite code and make it better--it doesn't optimize memory. It simply allows the programmer some additional freedoms and then turns that free, numberless code and makes it runnable. Quote Link to comment Share on other sites More sharing options...
RXB Posted November 19, 2019 Share Posted November 19, 2019 8 hours ago, Opry99er said: Making the SUB is up to the programmer. All this does is translate labeled BASIC code into line-numbered BASIC code. Programmers can make the SUBs just fine. And they'll translate here just fine. But TIdBiT doesn't take shite code and make it better--it doesn't optimize memory. It simply allows the programmer some additional freedoms and then turns that free, numberless code and makes it runnable. My point was the when you make SUB routines it makes less code and more organized to run. 1 Quote Link to comment Share on other sites More sharing options...
+Vorticon Posted November 19, 2019 Share Posted November 19, 2019 14 hours ago, RXB said: My point was the when you make SUB routines it makes less code and more organized to run. 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. 1 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.