OpenAI & Hollywood

Discuss any general programming issues here
Post Reply
nexus
Posts: 150
Joined: Sun Mar 07, 2010 11:54 am

OpenAI & Hollywood

Post by nexus »

I was curious and asked in ChatGPT4o for Hollywood
do you know the programming language Hollywood?
And indeed, it does:
ChatGPT
Yes, Hollywood is a programming language designed for multimedia applications. It was originally created for the Amiga computer platform but has since been made available for other systems, including Windows, macOS, Linux, and Android. Hollywood is known for its simplicity and ease of use, making it accessible for creating multimedia-rich applications, games, and presentations.

Key features of Hollywood include:

1. Cross-Platform Development: Write once, run anywhere approach. The same code can run on multiple operating systems without modification.
2. Integrated Development Environment (IDE): Provides a user-friendly environment for writing and testing code.
3. Support for Multiple Media Types: Handles images, audio, video, and text seamlessly.
4. Extensive Libraries: Includes a wide range of built-in functions and libraries for graphics, sound, networking, and more.
5. Scripting Language: Designed to be easy to learn and use, with a syntax similar to BASIC.

If you have any specific questions about Hollywood or need help with something related to it, feel free to ask!
So, I was wondering if chatGPT can speak Hollywood:
Please write an application in Hollywood that shows all photos from a folder as a slideshow.
Surprisingly, I got a reply, and it looks like Hollywood, but I guess is more pure LUA?
At least, some functions like `GetFileType(file)` and `IsFile(file)` seems not to be functions in Hollywood :)
By the way, the `GetFileType(file)` function, I would like to see in Hollywood :)

But anyway, it could help if you are stuck with some problems in Hollywood, too. So, I thought, it's worth sharing :)

Certainly! Here’s a simple example of a Hollywood script that shows all photos from a folder as a slideshow. This script assumes you have Hollywood installed and set up correctly.

Code: Select all

@REQUIRE "hollywood.hwp"

Function p_Main()
    Local photos = {}
    Local folder = "path/to/your/folder"
    Local files = FileRequest("Select a folder", folder, #FILEREQF_MULTISELECT)

    If files
        For Local i = 0 To ListItems(files) - 1
            Local file = GetFileEntry(files, i)
            If file And IsFile(file) And (GetFileType(file) = #FILETYPE_IMAGE)
                InsertItem(photos, file)
            EndIf
        Next
    EndIf

    If ListItems(photos) > 0
        Local screen = OpenDisplay(800, 600, 32, #DISPLAY_WINDOW, "Slideshow")
        Local currentIndex = 0

        Repeat
            Local photo = LoadBrush(Nil, photos[currentIndex])
            DisplayBrush(photo, 0, 0)
            FreeBrush(photo)

            currentIndex = (currentIndex + 1) % ListItems(photos)
            Wait(120)  ; wait for 2 seconds
        Until QuitRequest()
        CloseDisplay(screen)
    Else
        MessageBox("No images found in the selected folder.", "Error")
    EndIf
EndFunction

InstallEventHandler({OnStart = p_Main})
User avatar
jPV
Posts: 739
Joined: Sat Mar 26, 2016 10:44 am
Location: RNO
Contact:

Re: OpenAI & Hollywood

Post by jPV »

It may look like Hollywood code at the first look, but it's actually pure non-sense in code-wise.

Lots of non-existing functions as you said, and even the existing functions are using totally wrong arguments. And lots of small issues everywhere, like wrong require line, "If files" is always true because multiselect doesn't return empty variable ever, Wait isn't using seconds but ticks, and so on.

If you don't know these already, you'll have to learn Hollywood from the manual anyway, so it's just useless to start with this kind of script and just read the manual in the first place. And you probably leave many bugs which you don't even think to be a bug when starting with this kind of script (like the If issue).
Flinx
Posts: 351
Joined: Sun Feb 14, 2021 9:54 am
Location: Germany

Re: OpenAI & Hollywood

Post by Flinx »

nexus wrote: Tue May 28, 2024 1:32 pm So, I thought, it's worth sharing
Do you know how such an LLM works? It gets its training data from somewhere, and in this case it will mainly be this forum, mixed with other programming forums. As the model continues to be trained, it will read your posting in the next iteration and then provide even more nonsensical answers.
User avatar
airsoftsoftwair
Posts: 5862
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: OpenAI & Hollywood

Post by airsoftsoftwair »

Code looks Hollywood-ish but as jPV said, it's rather nonsense. It even got the Wait() function wrong, passing 120 instead of 100 for 2 seconds. This just confirms my assumption that AI is way too hyped at the moment. If it were really intelligent, it would easily understand from the 1000+ page Hollywood manual that Wait() takes an argument in ticks and 50 ticks are one second so 100 ticks are two seconds. But it doesn't seem to understand the manual at all and just throws random code at you.
Olaf
Posts: 5
Joined: Fri Feb 24, 2023 9:10 pm

Re: OpenAI & Hollywood

Post by Olaf »

Are there general reservations in this forum about Hollywood programming with LLMs,
or would it be worthwhile to share and exchange experiences here?

I am very interested in this topic, but I don't want to bother the forum community or start a flame war here.

Kind Regards,
Olaf
Bugala
Posts: 1399
Joined: Sun Feb 14, 2010 7:11 pm

Re: OpenAI & Hollywood

Post by Bugala »

Last I tried, it had got better again, but its been a while since I tried. Main problem is that there isnt enough examples in internet for LLM to grab the Hollywood.

However, someone could train AI specifically for Hollywood I suppose, especially, since even with the current model if you yourself teach him a bit of Hollywood, it does eventually start getting it right.

Most of time AI confuses Hollywood with LUA, and tends to take commands from there too. However, when you specifically tell it that it is using LUA instead of Hollywood, it does start getting towards right direction.

I havent used OpenAI for any large amount of code, only for small snippets.

I have also used it to construct me some general things, like Story Engines. While it doesnt make ready to use Story Engine for Hollywood, it gives you the functions and their names, logic how it should be made to work etc. which is very useful start point when you dont have experience on making such things before. That is the biggest use for Hollywood that I have had from AI.
Olaf
Posts: 5
Joined: Fri Feb 24, 2023 9:10 pm

Re: OpenAI & Hollywood

Post by Olaf »

Thank you very much, Bugala.
I am mainly focussed on building structurally simple GUI dialogs with rapagui and hollywood to make my everyday life handling bash shell scripts easier.
Hopefully simple straightforward tasks like this match the abilities of current LLMs in the consumer price level. I am trying with anthropics claude currently.
Ich will share my experiences if there are no concerns.
User avatar
jPV
Posts: 739
Joined: Sat Mar 26, 2016 10:44 am
Location: RNO
Contact:

Re: OpenAI & Hollywood

Post by jPV »

I'm sure it's OK to talk about it here, it's where the world goes and thus intresting to hear experiences.

I'm personally sceptic about it still, but that's my problem :) Especially for this marginal programming language it might be challenging to get good results codewise, because most of example codes in this forum are people asking solutions why something doesn't work, so they're not good examples to learn from :) But if these things can learn from manuals, then it might change.

It's quite surprising how good results some people get with more popular languages even on our platforms. Papiosaur is getting really good results with Claude when making programs in C for MorphOS, for example. And as Bugala told, it might be useful for pseudocode etc..
Post Reply