Re: Purebasic support from GPT-Chat...
Posted: Thu Dec 29, 2022 7:43 am
I suppose we should be glad that ChatGPT is not self-aware? Haha. Unless it's lying to mislead us.


http://www.purebasic.com
https://www.purebasic.fr/english/
Code: Select all
; Declare the variables we will need
String url
String bookmarks[10]
; Set the bookmarks array with some initial values
bookmarks[0] = "https://www.google.com"
bookmarks[1] = "https://www.youtube.com"
bookmarks[2] = "https://www.twitter.com"
; Create a GUI window to hold the browser
OpenWindow(0, 0, 800, 600, "PureBasic Web Browser", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_ScreenCentered)
; Create a TextField for the user to enter a URL
TextFieldGadget(1, 10, 10, 780, 25)
; Create a Button to load the URL
ButtonGadget(2, 700, 10, 80, 25, "Go")
; Create a ListBox to hold the bookmarks
ListBoxGadget(3, 10, 50, 150, 540)
; Create a WebView to display the webpage
WebViewGadget(4, 170, 50, 620, 540)
; Populate the ListBox with the bookmarks
ForEach(bookmark, bookmarks)
ListBoxGadget(3, -1, -1, -1, -1, bookmark)
Next
; Set the WebView to load the first bookmark as the initial page
WebViewGadget(4, 0, 0, 0, 0, bookmarks[0])
; Main loop to process events and update the GUI
Repeat
Event = WaitWindowEvent()
Select Event
Case #PB_Event_Gadget
; If the Go button is clicked, load the URL from the TextField into the WebView
If EventGadget() = 2 And EventType() = #PB_EventType_Click
url = TextFieldGadget(1, 0, 0)
If Len(url)
WebViewGadget(4, 0, 0, 0, 0, url)
EndIf
EndIf
; If a bookmark is selected in the ListBox, load it into the WebView
If EventGadget() = 3 And EventType() = #PB_EventType_Select
url = ListBoxGadget(3, EventIndex())
WebViewGadget(4, 0, 0, 0, 0, url)
EndIf
EndSelect
Until Event = #PB_Event_CloseWindow
; Clean up and close the window
CloseWindow()
Exactly. Such articles won't help you to implement some own model. It's much more theory behind and experience needed.pdwyer wrote: Sun Feb 05, 2023 1:59 pm Has any one read the "Attention is all you need" article?
At first it doesn't seem that difficult to understand (at a high, theoretical level) but if you start trying to implement it (like you would your own ANN) you find it's a bit of a rabbit hole for the dependencies.
The reason for this is that while your inputs are all being saved as well as the outputs, the model has to be retrained (modified) in a way that will benefit the model for their own business model, so all of the users prompts and the responses are stored and will be used to improve the system in the future, but this is a separate job. This is what everyone is currently doing for free. You are working for them doing data entry and data tagging without a real benefit for yourself. There could be a future benefit, but you'll have to pay for it most likely.marcos.exe wrote: Sat Mar 25, 2023 4:01 am GPT mixes PureBasic with other basic languages, puts libraries that don't exist as if they exist, as well as import files: "I think.PBI", and then just apologize to try other crazy commands, or simply repeat the error.
So far, it has not given any code that does not contain an error.
But it's still interesting. It would be nice if it did simple tasks to save me having to type to create basic and repetitive structures.
But for now, it looks like it's just a novice who's read part of the manual, and it looks like he's purposely trying to guess the rest of the requested code.
I wonder if GPT4 can create a simple code that works. It would help me a lot, since I'm blind, and PureBasic is accessible to my screen reader, unlike other ide's, besides being much easier to create what I usually need.