Lynn Bradshaw via plug on 9 Oct 2023 12:55:59 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Places to learn Linux and C around Philadelphia?


Haven't sounded off here lately but since both systems programming has been on my brain recently and AI for much longer I thought I'd give my two cents.

ChatGPT is in many respects impressive but it only takes a little effort to break it. Here's me making various ridiculous demands of ChatGPT. The first one is requesting the value of the famously thorny mathematical Ackermann function, which blows up faster than exponential, with humorous values for its two parameters (they're just integers so it's not too NSFW):

https://i.imgur.com/b1sncJF.png

The humor was lost apparently.

Here's requesting that ChatGPT suggest a statistical model for the so-called "Ballmer peak" effect which claims an ideal BAC for programming; it was not able to give a terribly specific suggestion other than using regression along with a few other expected procedures and caveats, though it did in all fairness recognize some humor:

https://i.imgur.com/okpOr1I.png

Here I'm actually pretty sure ChatGPT pulled through, so kudos, given how I remember strings being treated as a bit more "first-class" than in regular C in the late TempleOS creator Terry A. Davis's HolyC language (it's just FizzBuzz):

https://i.imgur.com/I4W39EL.png

But lastly I tried to get ChatGPT to print out the Warhammer 40K fandom's "Credo Omnissiah" in the early programming language Plankalkül:

https://i.imgur.com/J6v5sCW.png

I didn't want it in German, just because Plankalkül came from Germany. For reference, here's what a "hello world" program (auf Englisch) might look like:

https://history-computer.com/plankalkul-guide/

The choice of "Allesrechner" ("All-reckoner") was somewhat interesting but as far as I can see from native German speakers they just seem to prefer "Maschinengott" ("Machine God"). Either way I didn't want the output received.

The point is you can ask ChatGPT to do all kinds of ridiculous things like implement an MNIST digit classifier in QBASIC and get a blocked out list of subroutines mercifully filled with just comments on what to do later and probably that's not a super realistic use case but there are much more serious matters involving large language models, like this one, with GitHub Copilot (think ChatGPT but strictly for code) incorporating GPL code into closed-source products:

https://news.ycombinator.com/item?id=35657982

OK but now that I'm done ranting about AI I wanted to get back to C. I saw K&R referenced and I can't say it's just some terrible recommendation, obviously. However, I was reminded of being in the hospital recently, with a physical copy of the famous Smalltalk "Blue Book" because of no phone, and I thought to myself "there's a good deal here that very probably wouldn't apply to most any current Smalltalk implementation" (primarily had in mind Pharo but I can't imagine VisualWorks for example would be much different) and the same thing goes for C. After all, the current C standard was only published in 2018, and the next is slated for 2024. You can find books like "Modern C" that will bring you up to speed on events that happened after a seminal text like K&R:

https://www.amazon.com/Modern-C-Jens-Gustedt/dp/1617295817

It's not mentioned AFAICT in the suggested books on the Amazon page but I'm also gonna kinda contradict myself a little bit and call to mind a book from the mid-90s that I remember from being a teenager a fair bit later than that, "Expert C Programming: Deep C Secrets" and I only mention it because it contains some of the most lucid descriptions of C pointers I can ever remember.

https://www.amazon.com/Expert-Programming-Peter-van-Linden/dp/0131774298/

That 90s stuff probably hasn't changed a lot in recent C standards...

On Sun, Oct 8, 2023 at 10:59 PM Syeed Ali via plug <plug@lists.phillylinux.org> wrote:
On Sun, 8 Oct 2023 12:26:53 -0400
"Rich Mingin \(PLUG\) via plug" <plug@lists.phillylinux.org> wrote:

> I won’t rant about AI, but please keep in mind when asking it to
> teach you things; it does not fact check, and it will tell you
> untrue/incorrect things if it thinks that’s what you want/need to
> hear. Check everything on your own.

Also be wary about copy-pasting random code it provides.  :)
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug