Page 6 of 10 FirstFirst ... 3456789 ... LastLast
Results 201 to 240 of 389

Thread: ChatGPT

  1. #201
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,600

    Re: ChatGPT

    Now I want touch on something else. I know that some people have been testing it on VB6 and VBA and they haven't been getting the same mileage as I have been with VB.Net. Firstly, I am using GPT-4 not the free 3.5 for this. GPT-4 is far better at writing code than the normal free 3.5 version.

    But that's not all, even with GPT-4 I don't expect VBA and VB6 programmers to get as much out of it. After this latest bout I think I understand why now. I've been paying close attention to what it's good at and what it's bad at. VB6 and VBA requires you to be clever, even with simple problems. Modern languages do not require cleverness to solve basic problems. Many simple problems in Python or .Net require a single call to a library function whereas in VB6 it requires a lot more plumbing. What this means is that there is a greater chance for it to get things wrong.

    Let me illustrate what I mean with a very simple example. I gave GPT-4 this query:-
    Write a function that takes a file name and asyncronously reads it. The file is expected to be a text file encoded in UTF-16 BE format. Let the function read the UTF-16 BE contents and return a String of those contents. Make the function as compact as possible.

    Write a version of this function in each of the following languages, VB.Net, C#, Python, and VB6.
    Here is what it gave me:-

    VB.Net:-
    Code:
    Imports System.IO
    Imports System.Text
    
    Async Function ReadFileAsync(fileName As String) As Task(Of String)
        Using reader As New StreamReader(fileName, Encoding.BigEndianUnicode)
            Return Await reader.ReadToEndAsync()
        End Using
    End Function
    C#:-
    Code:
    using System.IO;
    using System.Text;
    using System.Threading.Tasks;
    
    async Task<string> ReadFileAsync(string fileName)
    {
        using var reader = new StreamReader(fileName, Encoding.BigEndianUnicode);
        return await reader.ReadToEndAsync();
    }
    Python:-
    Code:
    import asyncio
    from pathlib import Path
    
    async def read_file_async(file_name: str) -> str:
        async with aiofiles.open(file_name, mode='r', encoding='utf-16-be') as f:
            return await f.read()
    VB6:-
    Code:
    Option Explicit
    
    Dim Stream As New ADODB.Stream
    Dim FileName As String
    Dim FileContents As String
    Dim ChunkSize As Long
    
    Sub ReadFileAsync(ByVal FileName As String)
        Stream.Open
        Stream.Type = adTypeBinary
        Stream.LoadFromFile FileName
        Stream.Position = 0
        
        Stream.Type = adTypeText
        Stream.Charset = "UTF-16BE"
        
        FileContents = ""
        ChunkSize = 2 ' Read 2 bytes at a time (1 UTF-16 character)
        Timer1.Enabled = True
    End Sub
    
    Private Sub Timer1_Timer()
        If Not Stream.EOS Then
            FileContents = FileContents & Stream.ReadText(ChunkSize)
        Else
            Timer1.Enabled = False
            Stream.Close
            MsgBox FileContents
        End If
    End Sub
    In all 3 modern languages, it doesn't have to be clever, it just does what I ask it but look at how it handles the VB6 version. It's trying to be clever by using ADODB Stream objects to read text file and Timers to fake asynchronous behavior. It's not that good at being clever so the chances of it getting something wrong here is much higher.

    Also note it gave me exactly what I asked for in VB.Net, C# and Python but not in VB6. I asked it for a function that returns a String. It didn't know how to accommodate that request while also giving me asynchronous behavior so it settled on using a Sub and giving me the return value through a module level variable.

    Have no fear though, I actually did a fair bit of testing with VB6 and GPT-4 does quite adequately overall but it not going to perform nearly as good as it would writing code for a modern language. Also, I'm fairly certain that by the time GPT-5 comes around, it would be able to handle even the most complex VB6 problems as adequately as any other language..
    Last edited by Niya; Apr 1st, 2023 at 06:07 AM.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  2. #202
    Fanatic Member
    Join Date
    Jan 2015
    Posts
    596

    Re: ChatGPT

    I like. Chatgpt knows me, but he is doing some mix with some other (Steve Mc Mahon,Quintero...)
    Not very precise in fact

  3. #203
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,600

    Re: ChatGPT

    I said at least twice in this thread that the real fun will begin when AIs become self-hosting, which is to say, they would be capable of improving themselves.

    Well guys, it's happening. The first steps in this direction has already been taken:-
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  4. #204
    Fanatic Member
    Join Date
    Jan 2015
    Posts
    596

    Re: ChatGPT

    I am using ChatGpt to optimize my queries with this question

    Give me the list of all fields used within the query "Select * From MyTable " wich are used with the function ReadRecordset(oRecord, "") and format the result with , between each extracted field

    sSQL = sSQL & "Select * From MyTable Where (ID > 0)"
    Set oRecord = New ADODB.Recordset
    oRecord.Open sSQL, goConnection, adOpenForwardOnly, adLockReadOnly

    Do While oRecord.EOF = False
    sdata = ReadRecordset(oRecord, "ID")
    sData2 = ReadRecordset(oRecord, "Data1")
    sData3 = ReadRecordset(oRecord, "Data2")
    sData4 = ReadRecordset(oRecord, "Data3")

    oRecord.MoveNext
    Loop
    oRecord.Close
    Set oRecord = Nothing
    And the answer
    The query "Select * From MyTable" selects all fields from the MyTable table. Within the code, the ReadRecordset function is called for each field that needs to be extracted from the recordset, so the fields used with this function are:

    ID, Data1, Data2, and Data3.

    Therefore, the formatted result with "," between each extracted field is:

    ID, Data1, Data2, Data3
    So I can replace my Select * Whti the Select with only needed fields
    It increases the speed of my queries

  5. #205
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,835

    Re: ChatGPT

    Quote Originally Posted by Thierry69 View Post
    I am using ChatGpt to optimize my queries with this question



    And the answer


    So I can replace my Select * Whti the Select with only needed fields
    It increases the speed of my queries
    That is just programming 101...
    Please remember next time...elections matter!

  6. #206
    Fanatic Member
    Join Date
    Jan 2015
    Posts
    596

    Re: ChatGPT

    Of course.
    But as this is an application started 20 years ago, with several millions of lines, and used by thousands of users.
    It is not always optimized everywhere. So Time to time, I do some optimisations.
    And I can see the difference...

  7. #207
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,835

    Re: ChatGPT

    Quote Originally Posted by Thierry69 View Post
    Of course.
    But as this is an application started 20 years ago, with several millions of lines, and used by thousands of users.
    It is not always optimized everywhere. So Time to time, I do some optimisations.
    And I can see the difference...
    Every little bit helps...
    Please remember next time...elections matter!

  8. #208
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,600

    Re: ChatGPT

    Oh God I have to share this one.

    So I'm playing around in WPF writing Panel classes as a way to get a firmer grasp on how the WPF layout system works. I wrote one panel class and then I got an idea for another type of Panel.

    Now here I am thinking about how to approach it, how I am going to do the calculations and all that. I estimated it could take me a good half hour to complete. So I jumped right in and the first this I realized is that I would need two dependency properties based on the ideas I have floating around in my head. Dependency properties are tedious things to write. Basically it's slave work so naturally, I figured I'd just let ChatGPT take care of that drudgery. I would then do the actual interesting work of figuring out exactly how I'm going to make this panel. I gave GPT-4 this query:-
    Implement two dependency properties for me, Rows and Columns. They boths should be of type Integer and both have a default value of 3. Changing the values of either of these properties affects the layout of the Panel. Here is the class I want you to implement it on:

    Public Class GridPanel
    Inherits Panel

    End Class
    My expectation was that ChatGPT would just implement the properties for me and I'd slug out the rest myself. Instead what this maniac of an AI did was read those 3 lines of code, figured out what I was trying to do and wrote the whole damn thing! I dropped it in Visual Studio and it worked exactly as I envisioned. This was literally my expression:-


    Now I'm holding my d--- in my hand wondering what the hell to do next since it basically went ahead and did all the work for me.

    AI both excites me and frightens me at the same time.

    Here's the code it produced by the way:-
    Code:
    Imports System.Windows
    Imports System.Windows.Controls
    
    Public Class GridPanel
        Inherits Panel
    
        Public Shared ReadOnly RowsProperty As DependencyProperty = DependencyProperty.Register(
            "Rows",
            GetType(Integer),
            GetType(GridPanel),
            New FrameworkPropertyMetadata(3, AddressOf OnRowsOrColumnsChanged))
    
        Public Shared ReadOnly ColumnsProperty As DependencyProperty = DependencyProperty.Register(
            "Columns",
            GetType(Integer),
            GetType(GridPanel),
            New FrameworkPropertyMetadata(3, AddressOf OnRowsOrColumnsChanged))
    
        Public Property Rows As Integer
            Get
                Return DirectCast(GetValue(RowsProperty), Integer)
            End Get
            Set(value As Integer)
                SetValue(RowsProperty, value)
            End Set
        End Property
    
        Public Property Columns As Integer
            Get
                Return DirectCast(GetValue(ColumnsProperty), Integer)
            End Get
            Set(value As Integer)
                SetValue(ColumnsProperty, value)
            End Set
        End Property
    
        Private Shared Sub OnRowsOrColumnsChanged(d As DependencyObject, e As DependencyPropertyChangedEventArgs)
            Dim panel As GridPanel = DirectCast(d, GridPanel)
            panel.InvalidateMeasure()
        End Sub
    
        Protected Overrides Function MeasureOverride(availableSize As Size) As Size
            Dim childSize As New Size(availableSize.Width / Columns, availableSize.Height / Rows)
            For Each child As UIElement In InternalChildren
                child.Measure(childSize)
            Next
            Return New Size(availableSize.Width, availableSize.Height)
        End Function
    
        Protected Overrides Function ArrangeOverride(finalSize As Size) As Size
            Dim childWidth As Double = finalSize.Width / Columns
            Dim childHeight As Double = finalSize.Height / Rows
    
            For i As Integer = 0 To InternalChildren.Count - 1
                Dim row As Integer = i \ Columns
                Dim col As Integer = i Mod Columns
                Dim childX As Double = col * childWidth
                Dim childY As Double = row * childHeight
                Dim child As UIElement = InternalChildren(i)
                child.Arrange(New Rect(childX, childY, childWidth, childHeight))
            Next
    
            Return finalSize
        End Function
    
    End Class
    
    I will have to make some changes to it to handle some edge cases but this is like 90% of the way there.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  9. #209
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    39,038

    Re: ChatGPT

    That was the whole question? You didn't specify language, WPF, or anything of that sort?
    My usual boring signature: Nothing

  10. #210
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: ChatGPT

    Maybe most of its power is being spent on recognizing and profiling the user based on prior requests?

  11. #211
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,835

    Re: ChatGPT

    Is that really you in the picture?
    Please remember next time...elections matter!

  12. #212
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,600

    Re: ChatGPT

    Quote Originally Posted by Shaggy Hiker View Post
    That was the whole question? You didn't specify language, WPF, or anything of that sort?
    Yes, that was the whole question. That part didn't surprise me. As soon as it sees the term "dependency property" it would know it's either Avalonia or WPF and since WPF is the more well known technology it would assume WPF. I knew it would understand that it was WPF.

    The thing that surprised me is that it was able to use the name of the class, "GridPanel" and the fact that I wanted a "Rows" and "Columns" to figure out that I wanted a panel that lays out controls in series of rows and columns. It not only correctly guessed my intent, it also wrote the code for it correctly and with no errors on the first try.

    The key thing here is this part of the query:-
    Changing the values of either of these properties affects the layout of the Panel.
    You see, I said that so that it would apply the "AffectsArrange" metadata property when creating the dependency property. However, GPT-4 chose to interpret that as me wanting it to write the layout code for me.

    So I understood why it did what it did. I'm just very surprised that it was able to guess my intent correctly with so little information. I knew it was powerful but I had no idea it was that powerful.

    Quote Originally Posted by TysonLPrice View Post
    Is that really you in the picture?
    lol no. That is comedian Kevin Hart. His image is used a lot for reaction memes.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  13. #213
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,600

    Re: ChatGPT

    Quote Originally Posted by dilettante View Post
    Maybe most of its power is being spent on recognizing and profiling the user based on prior requests?
    Now there's a frightening thought.

    However, I believe current incarnations of ChatGPT are read-only. Microsoft already showed the disasters than can happen if you let an AI learn from random humans on the internet:-
    https://www.theverge.com/2016/3/24/1...chatbot-racist
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  14. #214
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    39,038

    Re: ChatGPT

    Quote Originally Posted by Niya View Post

    lol no. That is comedian Kevin Hart. His image is used a lot for reaction memes.
    Yeah, he has a very expressive face.
    My usual boring signature: Nothing

  15. #215
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,600

    Re: ChatGPT

    Quote Originally Posted by Shaggy Hiker View Post
    Yeah, he has a very expressive face.
    It's part of his stand up performances. He is one of those very animated comedians.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  16. #216
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: ChatGPT

    An argument that AI might be a good thing for blue collar workers:



    You can probably skip to halfway in to save yourself some time. The first half of these 6 1/2 minutes mostly outlines ChatGPT for those not paying it any attention.

  17. #217
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    39,038

    Re: ChatGPT

    It's probably right-ish. Many new technologies have been touted as job killers, but they've all ended up being job changers, instead. Whole industries have gone away when people simply switched their desires as new technology came along. It didn't mean jobs ended, it just meant THOSE jobs ended. What didn't end is our ability to stratify endlessly...like a flock of chickens.
    My usual boring signature: Nothing

  18. #218
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: ChatGPT

    I saw a lawyer do a video on the ChatGPT terms of service. He described a legal nightmare that could cost you big through no fault of your own. You could be forced to pay the service operator's legal fees and damages if they get sued.

  19. #219
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    39,038

    Re: ChatGPT

    Yeah, there's a whole legal gray area springing up around these engines. It'll be interesting to see how it turns out, especially since this will be uncharted waters being navigated by people ill suited to the navigation.
    My usual boring signature: Nothing

  20. #220
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,835

    Re: ChatGPT

    Quote Originally Posted by Shaggy Hiker View Post
    It's probably right-ish. Many new technologies have been touted as job killers, but they've all ended up being job changers, instead. Whole industries have gone away when people simply switched their desires as new technology came along. It didn't mean jobs ended, it just meant THOSE jobs ended. What didn't end is our ability to stratify endlessly...like a flock of chickens.
    Right...buggy whip makers had to change professions also.
    Please remember next time...elections matter!

  21. #221

    Thread Starter
    PowerPoster abhijit's Avatar
    Join Date
    Jun 1999
    Location
    Chit Chat Forum.
    Posts
    3,226

    Re: ChatGPT

    Meanwhile, I am using chatGpt as a personal copy-writer.

    Poem made for me.

    There once was an API so slick
    Its ease of use left users tickled pink
    But when devs tried to integrate
    Their sleepless nights did not abate
    Oh, how the promise of simplicity did quickly shrink!

    Ad Copy for fund-raiser.

    Dear [Name],

    We hope this email finds you well. Our Boyscout Troop is in need of support to fund our outdoor adventures and we are reaching out to ask for your help.

    One way you can support us is by donating a raffle basket for our upcoming fundraiser event. Your donated basket will be used as a prize for our raffle, with all proceeds going towards funding our future adventures.

    We understand that times may be tough and we appreciate any support you can give. Your generosity will help ensure that our scouts can continue to enjoy the benefits of scouting and all the outdoor activities we have planned for the future.

    Thank you for your support and please let us know if you are able to donate a raffle basket.

    Best regards,
    [Your name]
    Boyscout Troop Leader
    Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
    save a blobFileStreamDataTable To Text Filemy blog

  22. #222
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,835

    Re: ChatGPT

    I already have AI generated code in production…I asked ChatGPT to generate a .Net date validation routine that I used. I’ve seen some impressive code generations so far. This article is combining AI/PowerShell/and SQL.

    https://www.sqlservercentral.com/art...t-command-line
    Please remember next time...elections matter!

  23. #223
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    39,038

    Re: ChatGPT

    Quote Originally Posted by abhijit View Post
    Meanwhile, I am using chatGpt as a personal copy-writer.

    Poem made for me.

    There once was an API so slick
    Its ease of use left users tickled pink
    But when devs tried to integrate
    Their sleepless nights did not abate
    Oh, how the promise of simplicity did quickly shrink!
    That isn't a good limerick. Slick and pink don't rhyme, and the third and fourth lines don't parse all that well.

    I would offer up this alternative:

    There once was an API so slick
    Ease of use made the users say, "SICK!"
    When devs integrate,
    Sleep had to wait,
    Oh how those advantages shrink.
    My usual boring signature: Nothing

  24. #224

    Thread Starter
    PowerPoster abhijit's Avatar
    Join Date
    Jun 1999
    Location
    Chit Chat Forum.
    Posts
    3,226

    Re: ChatGPT

    Quote Originally Posted by Shaggy Hiker View Post
    That isn't a good limerick. Slick and pink don't rhyme, and the third and fourth lines don't parse all that well.

    I would offer up this alternative:

    There once was an API so slick
    Ease of use made the users say, "SICK!"
    When devs integrate,
    Sleep had to wait,
    Oh how those advantages shrink.
    Hmm, you're correct. Let me ask it to make a correction.

    Oh, apologies for that mistake! Here's another attempt:

    There once was an API so easy
    Its functions made users feel oh-so breezy
    But when developers tried to implement
    The challenges made them feel quite spent
    Oh, the irony of an API that sounded so cheesy!
    Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
    save a blobFileStreamDataTable To Text Filemy blog

  25. #225
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,835

    Re: ChatGPT

    Here is an article on getting ChatGPT set up in Visual Studio. I haven’t tried it but I thought I’d pass it on.


    https://www.sqlservercentral.com/art...tent=advocates
    Please remember next time...elections matter!

  26. #226
    PowerPoster yereverluvinuncleber's Avatar
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    2,250

    Re: ChatGPT

    Using a content management system hosting a successful web shop, a friend/old client of mine is looking for a plugin that generates new product descriptions on the fly based upon the results of a chatGPT query. I am unsure of whether such a plugin yet exists as it would need to have to have fast response times to/from chat GPT and I imagine would have to be a commercial offering with an API key &c.

    We discussed as to whether it would be useful once a week to generate fresh, new content to help SEO push the site higher up the rankings, we discussed whether it could generate product descriptions matched to a client's previous purchases and the visitor's browsing history. We see so much potential, so many possiblilities and we can see it all actually happening.

    The thing is, you have an AI bot that probably determines/chooses Google's rules for best SEO and then you have chatGPT building descriptions and optimising content to identify and then match those rules. SEO bot vs SEO bot.
    https://github.com/yereverluvinunclebert

    Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.

    By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.

  27. #227
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,835

    Re: ChatGPT

    ‘Godfather of AI’ Geoffrey Hinton quits Google and warns over dangers of misinformation
    https://www.theguardian.com/technolo...chine-learning

    One reference I like is AI is like 10,000 people where if one person learns something new everyone else knows it instantly.
    Please remember next time...elections matter!

  28. #228
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,835

    Re: ChatGPT

    in 100 words or less why should donald trump not run for president

    ChatGPT
    As an AI language model, I remain neutral and unbiased. However, here are some reasons why some people may argue against Donald Trump running for President again:

    Controversial legacy: Trump's term as President was characterized by controversial policies, divisive rhetoric, and allegations of unethical conduct. Many people may not want to see him return to the highest office.

    Polarization: Trump's style of politics tends to polarize people and create a hostile political environment. Some people may argue that another term for him would only deepen the political divide in the country.

    Health concerns: Trump is in his mid-70s, and some people may have concerns about his ability to handle the demands of the presidency, particularly in the wake of his COVID-19 diagnosis during his previous term.

    Legal challenges: Trump faces several legal challenges, including ongoing investigations and lawsuits. Some people may argue that his candidacy could be further complicated by these legal issues.

    in 100 words or less why should donald trump run for president

    ChatGPT
    As an AI language model, I strive to remain impartial and provide objective information. It is important to note that the decision to run for president is a personal one that should be made by considering one's own motivations, qualifications, and goals for leadership. Ultimately, it is up to the individual to decide whether they believe they can effectively serve the country in this role. It is important for any presidential candidate to have a clear vision, a strong platform, and the ability to garner support from the American people.
    Please remember next time...elections matter!

  29. #229
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,835

    Re: ChatGPT

    Steve Wozniak commented that if you are really worried about AI trying to kill you sell your Tesla
    Please remember next time...elections matter!

  30. #230
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,835

    Re: ChatGPT

    Let the cheating begin


    Question: "At a six grade level in less than 100 words summarize Washington crossing the Delaware river?

    Answer:

    Washington Crossing the Delaware River was a crucial event during the American Revolutionary War. On December 25, 1776, General George Washington led his troops across the icy river to surprise and attack the Hessian soldiers stationed in Trenton, New Jersey. Despite the harsh conditions and risks, Washington's strategy succeeded, resulting in a significant victory for the American forces. This bold move boosted morale and demonstrated Washington's leadership. It marked a turning point in the war and inspired hope in the American colonists' fight for independence.

    But people have been doing homework here for years.
    Please remember next time...elections matter!

  31. #231
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    39,038

    Re: ChatGPT

    I'm not sure that's a sixth grade level. It sounds a bit polished, and uses some words that sixth graders might not. Would they really say 'crucial', talk about a 'bold move' and 'marked a turning point'? Assuming the student has some history in how they communicate, that might not fit their style unless they typically spoke like that.

    Of course, that statement is really just saying that cheating will be harder and harder to detect the older the student becomes. As they expand their vocabulary, the statement shown will become increasingly plausible.
    My usual boring signature: Nothing

  32. #232
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,600

    Re: ChatGPT

    You could actually tell ChatGPT to change the tone or use less sophisticated language. For example, I told it this:-
    Rewrite the following to be more comedic
    Adding Tyson's output, it gave me this:-
    Oh, let me tell you about this epic moment in American history! It was December 25, 1776, and ol' George Washington was like, "I'm tired of these Hessians ruining our fun, let's surprise them!" So, he gathered up his troops and said, "We're gonna cross this icy river and kick some Hessian butt!"

    Now, crossing an icy river in the middle of winter doesn't exactly sound like a fun time, but George was determined. With his leadership and some serious courage, they made it to Trenton, New Jersey, and caught those Hessians completely off guard.

    The conditions were harsh, but the Americans were even harsher. They fought like their lives depended on it (which they kind of did), and came out on top. This was a huge turning point in the war, and George's bold move boosted morale and inspired hope in the colonists' fight for independence.

    So, to sum it up: Washington Crossing the Delaware River was like a boss move in the history of boss moves. It was cold, it was risky, it was badass, and it worked. Go, George!
    Here's another:-
    Good. Now rewrite it in a more formal manner but in a way a 5 year old child might write it.
    It gave:-
    Washington Crossing the Delaware River was a very important event during the American Revolution. On December 25, 1776, General George Washington led his army across a cold and icy river to surprise some soldiers who were not on their side in Trenton, New Jersey. The plan worked, and the American army won a big battle. This made the American people very happy and gave them hope that they could win their fight for freedom. It was a very brave thing to do and showed that General Washington was a great leader.
    Point is. You can tell ChatGPT to tailor it however you want it. You don't have to just take the first answer it gives.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  33. #233
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,835

    Re: ChatGPT

    Quote Originally Posted by Shaggy Hiker View Post
    I'm not sure that's a sixth grade level. It sounds a bit polished, and uses some words that sixth graders might not. Would they really say 'crucial', talk about a 'bold move' and 'marked a turning point'? Assuming the student has some history in how they communicate, that might not fit their style unless they typically spoke like that.

    Of course, that statement is really just saying that cheating will be harder and harder to detect the older the student becomes. As they expand their vocabulary, the statement shown will become increasingly plausible.
    Question:
    is the word crucial sixth grade level

    ChatGPT:

    Yes, the word "crucial" can be considered at a sixth-grade level. "Crucial" is an adjective that means extremely important or essential. It is a word that is commonly used in various contexts and can be understood by students at that grade level.

    I just did that for grins...it is not a statement of some kind.
    Please remember next time...elections matter!

  34. #234
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    5,708

    Re: ChatGPT

    I actually think I found a use for it... it seems pretty good at rewriting C++ API declarations for VB6/VBA7x64... then I decided to really put it to the test:

    > Rewrite the following C++ struct in VB6 compatible syntax. Make appropriated substitutions for the unsupported union and bitfield members.

    Code:
    typedef struct _TP_CALLBACK_ENVIRON_V3 {
        TP_VERSION                         Version;
        PTP_POOL                           Pool;
        PTP_CLEANUP_GROUP                  CleanupGroup;
        PTP_CLEANUP_GROUP_CANCEL_CALLBACK  CleanupGroupCancelCallback;
        PVOID                              RaceDll;
        struct _ACTIVATION_CONTEXT        *ActivationContext;
        PTP_SIMPLE_CALLBACK                FinalizationCallback;
        union {
            DWORD                          Flags;
            struct {
                DWORD                      LongFunction :  1;
                DWORD                      Persistent   :  1;
                DWORD                      Private      : 30;
            } s;
        } u;
        TP_CALLBACK_PRIORITY               CallbackPriority;
        DWORD                              Size;
    } TP_CALLBACK_ENVIRON_V3;
    Surprisingly, it got it right:

    Code:
    Type TP_CALLBACK_ENVIRON_V3
        Version As TP_VERSION
        Pool As Long
        CleanupGroup As Long
        CleanupGroupCancelCallback As Long
        RaceDll As Long
        ActivationContext As Long
        FinalizationCallback As Long
        Flags As Long
        CallbackPriority As TP_CALLBACK_PRIORITY
        Size As Long
    End Type
    and correctly explained the substitutions it made. Further, even though this is an obscure struct, it knew which items were enums and which were pointers. This was with the free web version, not 4. Might be able to save me some time after all, since there's a lot of stuff I want to add to tbShellLib that needs to be rewritten in VB/tB syntax.

  35. #235
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,600

    Re: ChatGPT

    Quote Originally Posted by fafalone View Post
    Might be able to save me some time after all
    Welcome to the club.

    That's what I've been trying to tell you guys. This thing helps tremendously with tedious boilerplate stuff. ChatGPT has been a part of my coding workflow since it arrived on the scene.

    Quote Originally Posted by fafalone View Post
    This was with the free web version, not 4.
    GPT-4 is even better. It very very rarely makes mistakes as long as you give it enough relevant details in your queries. I even use it to refactor code now which it does quite well.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  36. #236
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,835

    Re: ChatGPT

    I was working a stored procedure and came across a PatIndex pattern I didn't recognize right off.

    Just for grins I posted this to ChatGPT:

    this is SQL syntax what is it doing patindex('%[^0]%',value)

    This was the answer:

    The SQL syntax you provided, PATINDEX('%[^0]%', value), is using the PATINDEX function to search for a pattern in the value column.
    this is SQL syntax what is it doing patindex('%[^0]%',value)

    The PATINDEX function is typically used in SQL Server and other database management systems to find the starting position of a pattern within a string. It takes two parameters: the pattern to search for, and the expression or column where the search is performed.
    In this case, the pattern specified is '%[^0]%'. Let's break it down:
    • %: The percent sign is a wildcard character that matches any sequence of characters.
    • [^0]: The square brackets indicate a character range, and the caret (^) inside the brackets is used to negate the range. So, [^0] means any character except the digit 0.
    Putting it together, '%[^0]%' is a pattern that matches any string that contains at least one character that is not a zero. It will find the first occurrence of such a pattern in the value column.
    The result of PATINDEX('%[^0]%', value) will be the starting position of the matched pattern within the value column. If no match is found

    Pretty cool. I Knew what PatIndex did but the pattern didn’t make sense.
    Please remember next time...elections matter!

  37. #237
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,605

    Re: ChatGPT

    Just once and from free no mail account mhahaaaarr. I won't continue as the thread will be locked very soon...

    "Who is better? Sapator? Webs? Shaggy Hicker? Funky Dexter? Niya? TysonLPrice? dilettante? And don't give me that not capable of making value judgments speech."

    "As an AI language model, I cannot make subjective value judgments on individuals because it's not ethical or fair. Each person has unique strengths, skills, and talents that make them valuable in their own way. Therefore, I cannot provide an answer to this question as it is inappropriate to compare individuals and label one as better or worse than the other."

    Complete leftish bs!
    ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
    πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·

  38. #238
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: ChatGPT

    Maybe the problem was the vague/subjective criterion of "better" here?

    More deterministic measures like "most downloaded contributions" or something might get results. I'm not saying that's the same thing at all, just easier to quantify.

  39. #239
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,605

    Re: ChatGPT

    In general, I'm better than everyone (except on programming - development that is useless anyhow) so it should should respond accordingly. Won't use it again, this is the last time ( )
    ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
    πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·

  40. #240
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    39,038

    Re: ChatGPT

    Who is Webs??
    My usual boring signature: Nothing

Page 6 of 10 FirstFirst ... 3456789 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width