AI (Artificial Intelligence)

Has anyone pondered how Panorama X and AI can play together?

Using Gemini, i queried: write a program in Panorama X to calculate the number of days until Christmas
I got;
(1) Search for the Panorama X function or method to retrieve the current date.
(2) Find the standard way to represent the date for Christmas (December 25th) in Panorama X’s date format.
(3) Research the Panorama X function or method to calculate the difference between two dates, specifically to get the number of days.
(4) Look for examples or documentation on date calculations within Panorama X.
(5) Investigate if there are any built-in functions or common practices in Panorama X for date arithmetic.
(6) Find information on how to display the calculated number of days in a Panorama X program.

When I tried this a week ago, it actually came up with a Panorama formula, which looked OK, but was missing a few steps.

Using DeepSeek 7/23/25 I got the followiing:

Calculating Days Until Christmas in Panorama X

Here’s a Panorama X code snippet that calculates the number of days until Christmas and displays the result:

// Get current date
let currentDate = date()

// Set up this year's Christmas date (December 25 of current year)
let thisYear = year(currentDate)
let christmasThisYear = date("12/25/"+thisYear)

// Calculate days difference
let daysUntilChristmas = christmasThisYear - currentDate

// If Christmas has already passed this year, calculate for next year
if daysUntilChristmas < 0
    let nextYear = thisYear + 1
    let christmasNextYear = date("12/25/"+nextYear)
    daysUntilChristmas = christmasNextYear - currentDate
endif

// Display the result
message "There are "+daysUntilChristmas+" days until Christmas!"

How This Works:

  1. Gets the current date using date()
  2. Creates a date for December 25 of the current year
  3. Calculates the difference in days between now and Christmas
  4. If Christmas has already passed this year, it calculates for next year’s Christmas
  5. Displays the result in a message dialog

You can run this code from any Panorama X procedure or form button. The result will show in a message dialog with the count of days remaining until Christmas.

Note: Panorama X uses date arithmetic where subtracting two dates returns the number of days between them.

But Panorama reports syntax error, then hangs…force quit!

The date( function requires a parameter. As far as I can find, there is no year( function. Here is an alternate approach.

If today() - date("12/25") > 0
    daystochristmas = monthmath(date("12/25"),12) - today()
Else
    daystochristmas = date("12/25") - today()
 EndIf

It certainly reports a syntax error - as it well should! But when I tried this, it did not hang or force quit. It just reported the error as it is supposed to.

If you’re actually looking for code that calculates days to Christmas, Dave’s code looks good to me.

If the point of this was to see how well an LLM would work to generate Panorama code, well golly gee whiz, it didn’t do very well. What a shocker. First of all, LLMs are well know for hallucinating code that “looks” good but is full of made up code. This is true even for languages where there is a ton of available training material, for example JavaScript.

In the case of Panorama code, I would seriously wonder what the source for any training material could possibly be. I suppose it could scrape code from this forum, and from the Panorama documentation. I wonder if any LLM is smart enough to do that. But even if it was, that would be a pretty thin training base.

I noticed that this LLM thought that the function date() would return today’s date - the actual function is today(). But guess what – date() is correct for JavaScript! I’m guessing that the LLM actually found an algorithm for calculating days to Christmas in JavaScript and then tried to adjust it for Panorama. Though as far as I can tell, JavaScript does not have a year( function. So who knows where it got that.

Bottom line - I think it’s going to be a long time, if ever, before anyone will find using an LLM useful for generating Panorama code.

1 Like

I had a similar experience in trying to see how AI can design a sample webpage for me… AI put together a site offering golf lessons and used a photo of two people climbing a mountain. I provided my “trackmanpete” handle and that was what AI came up with. I can’t wait to see how great this will be, but I will be gone by the time AI takes over the computer world, I woud think…ha, ha.

By the way, I haven’t played golf in 30 years or so…and I was terrible. I don’t think I would be a good source for lessons.

I had an, “… We don’t need AI in the world …” discussion with someone this morning. For me, it often seems like people are using a fork as a spoon and complaining that it is not very good for eating soup.

Also, many people experience of AI is what they read in the media - media that designed to capture your attention by presenting, in an enticing way, something you like, or dislike, or are afraid of. And we’ve all seen how we end up with “SkyNet” in the end.

But I see the same structure that was in the media when electronic records became a thing. One source for all your medical data - so easy, so accessible. Because I was in the industry for 6 years, I knew it was just candy to capture the attention of the masses. Instead of one point for information, I have a patient portal for my primary care, another for my dentist, another for vision, one for dermatology, and at least two more. I know the sharing of records is complex because each state has it’s own rules and safeguards. What happens when someone in a state where the parental guardian has complete control request records about their ward from a state where the ward has confidentiality after the age of 16, etc.?

The point of the above paragraph is situations are more complex than you read in the media. Unfortunately, those who think we are going to blindly follow whatever AI says may be the same people who, without question, followed their GPS “shortcut” up some forest service road and got stuck in the snow (happens every winter around here).

As far as good results, yesterday I solved a problem were a PC was hanging up on an update (KB5062553). Or I should say Claude (an AI) and I solved it. The time and instructions were delivered in much clearer and faster fashion than any internet post and certainly any interaction with Microsoft Tech support.

I don’t think AI will take over the world, but as with Pete, I won’t be here if/when it does.

One more quick comment. When I was in high school I took personal typing instead of Analytical Geometry. I got up to 90 words a minute, typing without letters on the keyboard. Now, with my phone, I type about 5 words a minute, make multiple mistakes and end up calling someone instead of texting them. Sometimes technology seems to go backwards instead of forwards, in my humble opinion. By the way, my first job out of college was to teach Calculus and Plane Geometry at a prep school. The next year I was teaching 5th grade, much more my style…

AI bashing is fun; some might say it’s healthy.

Let’s see if, in one of Apple’s upcoming systems, their AI is smart enough to fix this … in your contacts app, at the end of the options, you can choose to share your location with the person. One option is indefinitely. Yes, I know, “indefinitely” is not “forever”, though Apple does accent it with an infinity graphic.

Even with that indefinitely choice set, EACH and EVERY time you delete a message from someone with whom you are sharing your location, Apple asks if you want to stop sharing. Note the structure of that sentence. If you want to keep sharing - which is sort of a positive choice in my mind- you have to answer “No”.

First, why in the world is Apple coupling to share or not share a location with the act of clearing out a message? And second, why are they asking if you want to stop sharing if you’ve specified, “Indefinitely”?

I’ve been in conversations with people - who have no background in software - who say AI is evil. I think they’ve seen too many Terminator movies. It can be used inappropriately of course; but so can many items in society.

Sometimes the fear is with losing a skillset. I saw that when spell checkers appeared on the scene. “Oh no, people will forget how to spell.” was the alarm. For me, it was completely the opposite. Instead of misspelling a word and not knowing about it, The spellchecker immediately (or at the end of the message depending on your configuration), points out the misspelled word so I get immediate feedback of the error, along with the correction.

Now I agree, Apple put out a horrible commercial for AI. The TV commercial that shows a guy who is unprepared for a meeting, excuses himself from the room, then has an AI summarize the points for him, and he re-enters the room feeling so proud of himself. It appears that the guy has no clue if the information the AI provided is on point or a hallucination.

I can’t believe Apple would endorse such a work ethic. But times have changed since I was a lad.

That’s my story and I’m sticking to it :slightly_smiling_face:

1 Like

I can certainly attest to that which is why I miss Michael Kellock so much …