+arcadeshopper Posted April 6, 2023 Share Posted April 6, 2023 55 minutes ago, stagemanbob said: Having a ball with TIPI. Infocom and Atari games are working. Mega Menu, Finalgrom, and ForceCommand are a hoot. I purchesd and installe the eprom for the TIPI PEB board and every thing works as usual. I notice there are now files in my TIPI disk directories that are /sectors. What can I do with them. What new features do I have to play with and mess up? Inquiring minds want to know. those are sector dumps for the disks you uploaded, in case you use something like pascal or plato that needs sector access.. this is documented in the wiki: https://github.com/jedimatt42/tipi/wiki/Disk-Images 3 Quote Link to comment Share on other sites More sharing options...
jrhodes Posted April 6, 2023 Share Posted April 6, 2023 (edited) I have installed the newest TIPI SD card image to a new sd card to test it out. It appears to be working, the web interface is there and working etc, successfully updated to 3.4. How ever, i noticed that once it finishes booting, the connected monitor i have on my Rasberry Pi 3B blanks out. This is inconvenient for me. On the old SD card image of TIPI 2.40 i was able to use the monitor and a usb keyboard when needed straight away without any doing on my part. Honestly the telnet 40 and 64 column mode ran from CALL TIPI looks like crap for doing things from a linux command line and i I don't have a F18a to test 80 column mode so can not comment on that. It was much easier to accomplish what i needed directly from a real monitor at a real keyboard hooked straight into the Pi. I would like to know how i can achieve the same thing on the new release, I.E. be able to use my usb keyboard and monitor as a linux terminal directly on the Pi. Edited April 6, 2023 by jrhodes Quote Link to comment Share on other sites More sharing options...
+9640News Posted April 6, 2023 Share Posted April 6, 2023 I know on my PI4, everything is fine. Any chance there is a cable not plugged in fully? Quote Link to comment Share on other sites More sharing options...
jrhodes Posted April 6, 2023 Share Posted April 6, 2023 13 minutes ago, 9640News said: I know on my PI4, everything is fine. Any chance there is a cable not plugged in fully? Everything is hooked up correctly. The monitor is using the 4-pole AV "headphone" jack to connect, not hdmi. Only thing hooked up is a usb keyboard, which works with other OS images i have tried, no problem. Nothing was changed physically except a different SD card. Image attached shows PI during boot. A few more seconds, and the monitor blanks out. Pardon the dust. Quote Link to comment Share on other sites More sharing options...
+arcadeshopper Posted April 6, 2023 Share Posted April 6, 2023 do you have your config.txt set up as before? that would have been replaced 1 Quote Link to comment Share on other sites More sharing options...
jrhodes Posted April 6, 2023 Share Posted April 6, 2023 Got it. I had to ssh into the Pi from a linux command line on my Ubuntu machine: ssh -l tipi 192.168.0.7 Then i did sudo raspi-config, and changed: 2 display options > D6 composite > Would you like composite video output to be enabled? > Yes Good enough. My main computer is clear across the house. Much better when i can do everything seated in front of my TI instead of trekking all over the house. Now back to my normal tinkerings. Quote Link to comment Share on other sites More sharing options...
+jedimatt42 Posted April 7, 2023 Author Share Posted April 7, 2023 On 4/1/2023 at 4:50 PM, jrhodes said: I'm still running TIPI v2.40 and plan to stay there. I'm running the older DSR ROM too. Unless newer updates bring some kind of a "must-have" feature that i think i can't live without, i'm staying put. As long as i can use my TIPI to load and save programs, i'm good; everything else is fluff... Ok maybe not everything, but really, acting as a disk replacement was my main reason to purchase, but i've been playing around with the PI.CLOCK device a bit, just because. ??? Quote Link to comment Share on other sites More sharing options...
jrhodes Posted April 7, 2023 Share Posted April 7, 2023 (edited) 12 minutes ago, jedimatt42 said: ??? Yes, i do intend to stick with 2.40 still. 3.x offers nothing new for my daily day to day usage. But now i have it setup and ready to go, if i need it in the future, monitor and keyboard and all. When the day comes that i need 3.x, i just swap the sd card, do any pending updates, and go from there. Edited April 7, 2023 by jrhodes Quote Link to comment Share on other sites More sharing options...
+jedimatt42 Posted April 8, 2023 Author Share Posted April 8, 2023 Update 3.5 - - Added JSON querying capability of file contents. - when opening a URL through PI.HTTP, or PI.HTTPS, or a local native file, you can use the native file handing modifier: ?J to indicate that it should be processed as a JSON data file. - the modifier goes after the device name, so TIPI.?J.MYJSONDATA or PI.?J.http://my.favorite.json.provider.org/the/best/data/ever - the query syntax follows an available 'standard' that is available in many modern languages: https://jmespath.org/tutorial.html Here is an example (TIDBIT style XB): MAIN: URL$="https://api.open-meteo.com/v1/forecast?latitude=32.46&longitude=-86.46¤t_weather=true&temperature_unit=fahrenheit&windspeed_unit=mph&precipitation_unit=inch" READDATA: OPEN #1:"PI.?J."&URL$,DISPLAY ,VARIABLE 254 PRINT #1:"current_weather.temperature" LINPUT #1:TEMP$ PRINT #1:"current_weather.winddirection" LINPUT #1:WD$ PRINT #1:"current_weather.windspeed" LINPUT #1:WS$ CLOSE #1 SHOW: PRINT "Temp: "&TEMP$ PRINT "Wind speed: "&WS$ PRINT "Direction: "&WD$ Normally opening the PI.HTTP to such a URL provides the following result: {"latitude":12.3456789,"longitude":12.3456789,"generationtime_ms":0.2345655987548828,"utc_offset_seconds":0,"timezone":"GMT","timezone_abbreviation":"GMT","elevation":67.0,"current_weather":{"temperature":50.6,"windspeed":12.0,"winddirection":66.0,"weathercode":3,"is_day":1,"time":"2023-04-08T23:00"}} With the file open in JSON mode, you can write a JMESPath query and the result of the query is made available as the text records that can be read. So, in the example I write the query: current_weather.temperature And the next LINPUT #1:TEMP$ reads 50.6 into the TEMP$ variable. (All of the magic of TI DISPLAY format is still working for you in BASIC, so TEMP could have been a numeric variable instead of a string if you want.) An empty string written as a query, will provide the entire JSON ( broken into length limited records ). This is the default state of the records if no query has been issued. As should be apparent in the example, you can query the file multiple times to fish different bits out of the data. If you write an illegal query expression, the error message from the JMESPath parser will be set as the available record data. A thing to note, when TIPI consumes the JSON data, it will order the keys and strip unnecessary whitespace. (Documentation on the TIPI wiki is still pending looks a lot like the above text) 8 1 Quote Link to comment Share on other sites More sharing options...
+InsaneMultitasker Posted April 14, 2023 Share Posted April 14, 2023 @jedimatt42 Is "PI.STATUS" intended to tell the user that there is an update from 2.x to 3.x? My TIPI reports 2.40 in the VERSION and LATEST values. I only happened upon the 3.x update posts by coincidence. Quote Link to comment Share on other sites More sharing options...
+arcadeshopper Posted April 14, 2023 Share Posted April 14, 2023 1 hour ago, InsaneMultitasker said: @jedimatt42 Is "PI.STATUS" intended to tell the user that there is an update from 2.x to 3.x? My TIPI reports 2.40 in the VERSION and LATEST values. I only happened upon the 3.x update posts by coincidence. 3.x is not an update to 2.x.. 2.x is the end of a road.. 3.x is a new road Quote Link to comment Share on other sites More sharing options...
+InsaneMultitasker Posted April 14, 2023 Share Posted April 14, 2023 25 minutes ago, arcadeshopper said: 3.x is not an update to 2.x.. 2.x is the end of a road.. 3.x is a new road Understood, though it does me little good if I don't know there is a new road to follow. If 2.40 is the latest that will be reported for the 2.x road, then is there a way the 2.x "LATEST" value can nudge the user toward 3.x. 1 Quote Link to comment Share on other sites More sharing options...
+arcadeshopper Posted April 14, 2023 Share Posted April 14, 2023 I don't think we've been shy about announcing it in the support forum, discord, facebook group etc.. There's no way in software right now to do what you are suggesting, it would require new code to be introduced in the cfg tool and tipi software on the PI to announce a new road. Quote Link to comment Share on other sites More sharing options...
+jedimatt42 Posted April 14, 2023 Author Share Posted April 14, 2023 There was not a way to nudge in system for a while. I had broken my GitHub lineage. I have since fixed GitHub. But there is also this thread that I have pointed every TIPI user at. Spending my hobby time on writing an update to 2.41 that just tells the users a message seems like a waste of good hobby development time. As a case study, you found out. So there seems to be no need. I can't spend my time on FOMO or FOMU (fear of missing users LOL) Quote Link to comment Share on other sites More sharing options...
+Vorticon Posted April 14, 2023 Share Posted April 14, 2023 On 4/8/2023 at 6:46 PM, jedimatt42 said: Update 3.5 - - Added JSON querying capability of file contents. - when opening a URL through PI.HTTP, or PI.HTTPS, or a local native file, you can use the native file handing modifier: ?J to indicate that it should be processed as a JSON data file. - the modifier goes after the device name, so TIPI.?J.MYJSONDATA or PI.?J.http://my.favorite.json.provider.org/the/best/data/ever - the query syntax follows an available 'standard' that is available in many modern languages: https://jmespath.org/tutorial.html Here is an example (TIDBIT style XB): MAIN: URL$="https://api.open-meteo.com/v1/forecast?latitude=32.46&longitude=-86.46¤t_weather=true&temperature_unit=fahrenheit&windspeed_unit=mph&precipitation_unit=inch" READDATA: OPEN #1:"PI.?J."&URL$,DISPLAY ,VARIABLE 254 PRINT #1:"current_weather.temperature" LINPUT #1:TEMP$ PRINT #1:"current_weather.winddirection" LINPUT #1:WD$ PRINT #1:"current_weather.windspeed" LINPUT #1:WS$ CLOSE #1 SHOW: PRINT "Temp: "&TEMP$ PRINT "Wind speed: "&WS$ PRINT "Direction: "&WD$ Normally opening the PI.HTTP to such a URL provides the following result: {"latitude":12.3456789,"longitude":12.3456789,"generationtime_ms":0.2345655987548828,"utc_offset_seconds":0,"timezone":"GMT","timezone_abbreviation":"GMT","elevation":67.0,"current_weather":{"temperature":50.6,"windspeed":12.0,"winddirection":66.0,"weathercode":3,"is_day":1,"time":"2023-04-08T23:00"}} With the file open in JSON mode, you can write a JMESPath query and the result of the query is made available as the text records that can be read. So, in the example I write the query: current_weather.temperature And the next LINPUT #1:TEMP$ reads 50.6 into the TEMP$ variable. (All of the magic of TI DISPLAY format is still working for you in BASIC, so TEMP could have been a numeric variable instead of a string if you want.) An empty string written as a query, will provide the entire JSON ( broken into length limited records ). This is the default state of the records if no query has been issued. As should be apparent in the example, you can query the file multiple times to fish different bits out of the data. If you write an illegal query expression, the error message from the JMESPath parser will be set as the available record data. A thing to note, when TIPI consumes the JSON data, it will order the keys and strip unnecessary whitespace. (Documentation on the TIPI wiki is still pending looks a lot like the above text) This is pretty cool! Opens up quite a few possibilities of getting real world data from the internet into the BASIC/XB environment. 2 Quote Link to comment Share on other sites More sharing options...
+arcadeshopper Posted April 14, 2023 Share Posted April 14, 2023 13 minutes ago, Vorticon said: This is pretty cool! Opens up quite a few possibilities of getting real world data from the internet into the BASIC/XB environment. agreed .. on fujinet (atari/adam) they are doing iss trackers, better weather app, mastodon client etc using similar functionality 1 Quote Link to comment Share on other sites More sharing options...
+Vorticon Posted April 14, 2023 Share Posted April 14, 2023 24 minutes ago, arcadeshopper said: agreed .. on fujinet (atari/adam) they are doing iss trackers, better weather app, mastodon client etc using similar functionality Yup. I've got a Fujinet on my Adam and it's pretty cool what can be done with this. 1 Quote Link to comment Share on other sites More sharing options...
+InsaneMultitasker Posted April 14, 2023 Share Posted April 14, 2023 I was posing the question in case it was as simple as changing the 2.x version text to inform users they are no longer on the most recent branch/version. I wasn't trying to waste anyone's time nor asking for another update. Anyway, the JSON feature caught my attention while reading the wiki for how to use the "?W" feature that @9640News mentioned to me. I was playing with "?J" and it didn't work; it wasn't obvious to me that I needed the 3.x branch update. I guess it was a matter of unfortunate timing but now I know how to proceed after reading the forum. Edit: crabby statement removed. 3 Quote Link to comment Share on other sites More sharing options...
dgrissom Posted April 14, 2023 Share Posted April 14, 2023 On 4/8/2023 at 6:46 PM, jedimatt42 said: Update 3.5 - - Added JSON querying capability of file contents. - when opening a URL through PI.HTTP, or PI.HTTPS, or a local native file, you can use the native file handing modifier: ?J to indicate that it should be processed as a JSON data file. - the modifier goes after the device name, so TIPI.?J.MYJSONDATA or PI.?J.http://my.favorite.json.provider.org/the/best/data/ever - the query syntax follows an available 'standard' that is available in many modern languages: https://jmespath.org/tutorial.html Here is an example (TIDBIT style XB): I've been using these new features with @Asmusr's JS99'er and @jedimatt42's "http://tipi:9900/files" interface. I used Notepad++ to work on a number of JSON and non-JSON web applets. All of these are in @matthew180's TIDBIT format and most will run on stock Extended BASIC. There are 2 files (PIJOKE8.TB and PIQUOTE8.TB) that require @senior_falcon's XBGEM to run the 40/80 column versions (change the default screen widths in code code). These applets include Bible Verses, Jokes, Quotes, Insults, and Weather data. Hopefully, these illustrate the power of the newest version's of TIPI. The main post has the zip file attachments. D.Grissom 3 Quote Link to comment Share on other sites More sharing options...
+InsaneMultitasker Posted April 14, 2023 Share Posted April 14, 2023 Upgrading to 3.5 went well. I completed all steps using my Geneve this time around, including the telnet session to localhost to expand the disk. Thank you for making the upgrade process so simple and easy to follow. I wrote a JSON test program to query a local file on the Rpi. When the values are returned, the strings include brackets and double quotation marks. e.g., if I query for "Directory Manager" the responses are ["Clint Pulley"] and ["2.62"]. The wiki states that "Simple strings, numbers, and booleans are presented in DISPLAY mode to the 4A without adornments such as surrounding quotes.", so I am sharing my program and the sample data for review. 1 !SAVE DSK8.JSONTEST 100 !OPEN #1:"TIP1.?J.JSON9640",DISPLAY ,VARIABLE 254 105 INPUT A$ 110 CALL QUERY(A$,AUTH$,LATEST$) :: PRINT A$;AUTH$;LATEST$ 120 GOTO 105 999 !query by program name 1000 SUB QUERY(PROG$,AUTH$,LATEST$) 1010 OPEN #1:"TIP1.?J.JSON9640",DISPLAY ,VARIABLE 254 1020 PRINT #1:"Geneve[?program=='"&PROG$&"'].Author" 1030 LINPUT #1:AUTH$ 1040 PRINT #1:"Geneve[?program=='"&PROG$&"'].Latest" 1050 LINPUT #1:LATEST$ 1060 CLOSE #1 1100 SUBEND Sample JSON file "JSON9640": JSON9640 (windows format file) { "Geneve": [ { "program": "Directory Manager", "Author": "Clint Pulley", "Mode": "MDOS", "Latest": "2.62", "Year": "2023" }, { "program": "GenWipe", "Author": "T. Tesch", "Mode": "MDOS", "Latest": "1.00", "Year": "2023" } ] } 1 Quote Link to comment Share on other sites More sharing options...
+jedimatt42 Posted April 15, 2023 Author Share Posted April 15, 2023 You are selecting all Author attributes from an array, so it returned an array of 1 item... You can add an array index to the query to select the first item in the array.. [0] 1 Quote Link to comment Share on other sites More sharing options...
+jedimatt42 Posted April 15, 2023 Author Share Posted April 15, 2023 I could probably extend the TIPI integration for JMESPath to unpack array results as separate records to be sequentially read 1 Quote Link to comment Share on other sites More sharing options...
+InsaneMultitasker Posted April 15, 2023 Share Posted April 15, 2023 16 minutes ago, jedimatt42 said: You are selecting all Author attributes from an array, so it returned an array of 1 item... You can add an array index to the query to select the first item in the array.. [0] Thank you. Adding "|[0]" to my selection returns the first element as a string -without- the quotes. I now think that I understand the difference. The link you provided to this interactive tutorial site JMESPath Tutorial — JMESPath has been very helpful as a learning aid, however, I am very ignorant when it comes to JSON. I definitely have some reading and learning ahead of me that is not TIPI specific. Did I mention that I really like this "?J" support? Very cool. 1 1 Quote Link to comment Share on other sites More sharing options...
+jedimatt42 Posted April 15, 2023 Author Share Posted April 15, 2023 Update 3.6 - April 14th 2023 - The JSON file handling will now unpack arrays into individual records to read. - Add experimental wildcarding in file names.... So, the array handling: if your query yields: [ 1, 2, 3 ] tipi will return 3 lines: 1 2 3 if your query yields: [ "hello" ] tipi will return 1 line: hello if your query yields a simple primitive value: "hello" tipi will return 1 line: hello --------------- The file path wildcarding... A while back @OLD CS1 suggested it would be handy to have conveniences in referencing files, like that C64 load "*",8,1 where "*" is a glob pattern for the commodore disk drive to process... So in that spirit, I added wildcarding to processing TI to linux file path translation inside TIPI. However, to not conflict with the wildcarding that I already support in ForceCommand at the OS level ( the my TI-99/4A OS ), I chose to use the Amiga filesystem wildcard symbol of #? If the wildcarding matches more than one item, they are sorted, and TIPI acts as though you selected the first item. So, if you go into Tunnels of Doom, and want to load pennies and prizes, you can use a file name like: TIPI.TOD.P#? Or if you want to reload that tidbit program named GAME/TB in your DEV directory, you can OLD TIPI.DEV.#?/TB It also works for directory names. Keep in mind, the TI does not know the full name of the matched file. So, if you use this when CD'ing into a directory in Force Command, it will think the current directory is the one with the #? expression. Which is fine as long as you don't undermine yourself. ( retro computing, no handrails ) This is pretty wild-west right now. I am contemplating adding more intelligence, so that it will only consider appropriate files for the type being operated on, such as limiting to directory for path parts, or PROGRAM images ( or TIPI convertible files ) for LOAD operations. ------ Docs are for Sundays... 4 Quote Link to comment Share on other sites More sharing options...
dgrissom Posted April 15, 2023 Share Posted April 15, 2023 12 hours ago, InsaneMultitasker said: Thank you. Adding "|[0]" to my selection returns the first element as a string -without- the quotes. I now think that I understand the difference. The link you provided to this interactive tutorial site JMESPath Tutorial — JMESPath has been very helpful as a learning aid, however, I am very ignorant when it comes to JSON. I definitely have some reading and learning ahead of me that is not TIPI specific. Did I mention that I really like this "?J" support? Very cool. I've played with JSON strings for a month and still think it refers to JASON from the slasher movies! 😁 I just tried the "?J". Amazing! 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.