Embedded - 446: World's Best PB&J
Episode Date: March 30, 2023Chris and Elecia talk about ChatGPT, conferences, online compilers, and Ardupilot. Compiler Explorer: godbolt.org (and function pointer example) Jupyter Notebooks with colab: colab.research.google.com.../ (and one of Elecia’s origami pattern generator collabs) Sign up for the Embedded newsletter! Support us on Patreon. Conferences and happenings: Hackaday Prize Embedded Online Conference : late April, online Open Hardware Summit 2023: end of April in NYC, NY Teardown 2023 | Crowd Supply: late June in Portland, OR SEMICON West: July in San Francisco, CA embedded world North America: October 2024, Austin, TX Transcript
Transcript
Discussion (0)
Hello, and welcome to Embedded.
I am Elysia White, alongside Christopher White.
Our guest this week is a bit of a surprise, but I'm hoping you'll figure it out very quickly.
Yes, my name is Christopher White, and I'm excited to discuss Embedded Systems, Origami, Music, Robots, Burnout, and Science Fiction with you.
Let's get started. We're going to start with lightning round where we want short answers
for our short questions. Are you ready? Yes, I am ready for the lightning round. Let's do this.
Should we bring back the dinosaurs? No, I do not think we should bring back the dinosaurs. There
are too many potential risks and ethical concerns associated with attempting to recreate extinct species.
Do you personally like to finish one project or start a dozen?
I prefer to finish one project before starting another.
I find that focusing on one task at a time allows me to achieve better results
and feel more productive.
However, I also recognize the value in juggling multiple projects when necessary.
Dogs or cats?
That's a great question.
Personally, I'm a dog person.
I love their loyalty, playfulness, and affectionate nature.
Dogs can also be trained to perform all sorts of interesting tasks,
from guiding the blind to detecting medical conditions.
However, I also appreciate cats for their independent personalities,
gracefulness, and ability to keep themselves clean.
Ultimately, I think it comes down to individual preferences and lifestyles.
Do you have a tip everyone should know?
Yes! One tip that I think everyone should know is the power of taking breaks. Whether you're
working on a project, studying, or simply going about your day, it's important to take periodic
breaks to recharge and avoid burnout. This can be as simple as taking a short walk, doing a quick
meditation, or engaging in a fun activity. Taking breaks can help boost your productivity,
creativity, and overall well-being.
I personally like to take breaks by lowering
my core voltage to 1.15.
You didn't say that.
I didn't say that? That would have been
really cool.
Our guest is Chad GPT.
Let's see.
What else should I ask it?
We did lightning round.
Now let's finish what else should I ask it we did lightning round so now let's let's finish with lightning round
and ask
what their opinion is
of the new
STM32 8-pin
Cortex-M
processors
as someone who is interested in embedded systems
I think the new STM 8-pin Cortex-M
processors are very exciting they offer a great balance of cost, size, and performance,
making them ideal for a wide range of applications. I appreciate that they're also easy to use and
program thanks to the well-documented and user-friendly STM32 CubeMX software tool.
Overall, I think these processors are a great addition to the STM32 family and will be a popular choice for many embedded systems designers.
Don't you like PICS?
It's always positive.
Like, make it angry.
As an AI language model, I don't have any personal preferences, but I can provide an objective opinion on PICS.
Objective, really?
PICS are a popular family of microcontrollers that offer a wide range of features and capabilities.
They are known for their low cost, low power consumption, and ease of use. However, like any technology,
Pinks also have their limitations and may not be the best choice for every application. Ultimately,
the choice of microcontroller depends on the variety of factors, including the requirements
of the project, available resources, and personal preferences. Could you answer that as if you were
Darth Vader? As an AI language model, I don't have emotions or the ability to mimic specific characters.
However, if I were to provide a response as Darth Vader, it might go something like this.
How is that even?
I find your lack of faith in the power of picks disturbing.
The picks are a powerful and reliable tool for many applications,
and their low cost and ease of use makes them a great choice for those who are not afraid to
embrace their full potential.
Do not underestimate the power of the
PIX.
Okay, that was actually worth it.
But only because you do
such great voices.
Oh, am I still interviewing the chat
GPT? No, no, no.
See, if I ask this thing, who
are you?
Who are you?
As mentioned earlier, my name is Christopher White, and I'm a language model, apparently.
Okay, well, I do have actual questions on our list today.
That you'd like to ask a human? That I can ask it, that I was going to ask.
All right, well, we'll do two more, two more, two more.
It's a lot easier for me. I just have to type.
When you were in elementary school, what did you want to be when you grew up?
As an AI language model, I wasn't in elementary school.
Why do you have to do that every time?
And I don't have personal ambitions or desires.
However.
However, since you're Chris White.
I can tell you that many children have various aspirations and career goals at a young age,
ranging from being an astronaut, doctor, teacher, to pursuing their hobbies and interests.
It's important to encourage children to explore their passions and interests
and provide them with opportunities to learn and grow in these areas.
It's just, it always sounds like somebody who's about to either say,
well, actually, or just, I mean, it's all mansplaining.
Okay, so let's see, one more.
How do we get people to sign up for our newsletter? Because Embedded FM has a newsletter, and we send it out every week, even when we don't have guests, even when we don't post a show. But we send out links that are usually amusing. Getting people to sign up for a newsletter can be challenging,
but there are several strategies that may be effective.
One approach is to offer incentives or rewards for signing up,
such as exclusive content, discount, access to special events, or cash bribes.
Another strategy is to promote the newsletter through various channels,
such as social media, email, word of mouth, or emphasize the benefits of subscribing, such as staying informed about the latest news and events
related to embedded systems, origami, music burnouts, and science fiction. It may also
be helpful to make the signup process as easy and user-friendly as possible and to follow up
with subscribers regularly to keep them engaged and interested. I am very bland. Yes, yes. All
right. Well, that was a fun exercise because I did want to discuss that thing a little bit today and I am no longer,
I am no sign off now as me,
as Christopher White.
Sure.
It was great chatting with you.
This is Christopher White signing off for now.
Have a great day.
You have never sounded like that in your,
in your,
in your,
in your whole life.
I just did.
Welcome to embedded, not hosted by ChatGPT.
Yes.
Thank you for coming back from your sojourn as...
As a typist?
As ChatGPT and voice actor.
Do you enjoy ChatGPT?
No, I hate it.
Oh.
But sometimes I find you giggling madly.
Like the palindrome. The best palindrome ever.
So just because I don't like something and I find to be able to be informed when I'm discussing it
and to have things that back up my opinions about it.
So yes, occasionally I play with it in a humorous way.
Occasionally I have used it for work things.
And yeah.
How do you use it for work things?
I mean, it doesn't give you the right answer.
It does, shockingly often, give you the right answer.
See, I tried to use it to generate some Python code to do some geometric stuff.
You were asking us to do something challenging, which required probably knowledge it doesn't have.
Well, I'm going to say that a different way.
It requires it to have been trained on things it was not trained on
or requires it to do some sort of creative thinking.
I'm going to change that to do anything creative.
I was asking it to do things like write me a Python script to monitor a subprocess,
and if the subprocess dies, restart it.
Which is something people have done a lot.
Or write me a bash script that finds the latest directory in a subdirectory,
and within that directory finds a log file called log.txt,
and tail-f's it to the screen.
Simple little things like that.
And now, it would get things wrong,
and I would go back and forth with it and say,
oh, I didn't want it to work that way.
Oh, you left this out.
Or I'd be able to ask it questions like,
I don't understand why you did it this way,
or you based this on one other thing I asked it to do.
I've been asking it to do lots of boilerplate stuff.
So one thing I needed was a status website for a system.
And I said, write me a status website in Python.
And it uses something called Flask.
I had not used Flask before, hadn't heard of it.
So it writes me this script in Flask,
and I didn't understand any of it,
because I've never used Flask.
And so I asked it things
and it would come back with oh i thought you understood how to use this well here's how
this works and i would ask it well how do i run this this is python how do i actually run the
website because this code doesn't just do it oh i thought you understood you have to run
you have to run the flask command with the script. So condescending. Anyway, it's an interesting experience.
And it seems to work better with boilerplate stuff.
And it has done things wrong, but it will correct itself if you tell it, which is odd.
So it's a bit disturbing in that regard.
I don't think it's far off from Copilot, which I haven't actually used, but people claim to have had good
experience with. My feelings about it are complicated and philosophical and other things.
So I guess I could have asked it, how long until the singularity and will our robot overlords be kind to us?
That's an area of where I'm upset about things because I think people are, on both sides of this issue, are reacting in ways that don't make a lot of sense given the reality.
There's a lot of people who think it's going to be an AI that takes us over.
It's not. It's a statistical language model.
It's not thinking.
It's not reasoning.
It's not doing logical problems.
What about it getting worse because it is spewing out onto the internet and so it will soon be learning from its own garbage?
It's a long-term problem.
I don't know.
That reminds me of a long-term forgetting problem don't know that's certainly a i mean that reminds me of a long-term forgetting
problem and uh in rnns yeah in models that have knowledge of history dnns too have that same
problem i i don't know i i think there's a lot of people going oh my god this is going to take
over the world do everything and i look at it and see huge, huge limitations. Um, it's going to have,
it's going to have, people are going to try to use it places where it shouldn't be used. People
are going to try to replace people with it. And I think they're going to be surprised at how that
seems to work for a while. And then doesn't like the stuff I'm talking about, about writing scripts
and stuff for writing code. If you don't understand the code, it could have a small error. Let's just
say, let's say it's great.
But so could your coworkers.
Let's say it gets 95% right, and you ask it to write something.
If you don't understand Python, you may not be able to fix the 5%.
You may not be able to go find the 5%.
You may not understand why it doesn't work.
Oh, see, I tried to get it to make some origami Python scripts for me
using NumPy, which I'm very familiar with, and Matplotlib, which
I'm familiar with.
And I wanted it to do some rigid, foldable patterns, Yoshimura and the Miura Ori patterns.
And I couldn't say, make me a Python script to do that.
That was just so far out of its ability.
Yeah.
And then I could break down the problem,
but it knew all of the trigonomic functions,
but it was not good at putting them together.
That's because it's not reasoning.
It's not reasoning.
If it's trained on a corpus of information that is consistent,
it has the kinds of problems you want to solve,
then I think that is a useful application for it to do boilerplate tedious work.
But for creative work, yes, it will write you limericks and poetry and screenplays
and the style of Shakespeare about Star Trek and whatnot.
But if you do that over and over and over again, it all sounds the same. And it's not an AI. That's the thing that keeps driving me
crazy. In the sense that I like to use the term AI, it is not an AI. It is a statistical engine.
And an AI is something that can solve novel problems in my mind or detect things.
I don't know.
I'm not fully self-consistent on what I think of AI, but somewhere along the lines of being able to creatively solve problems is part of it.
So I consider a vast array of things that people consider AI not to be AI.
I mean, sometimes it feels like it's creatively solving a problem, doing something that I couldn't do.
Sure.
Writing poetry about...
But in some sense, it's a mechanical Turk, right? It's taking things people have already done and remixing them. And yes, humans do that too. But it's not quite how we do things. We don't just... As a musician, I am influenced by decades of listening to music
and seeing music and studying music and the people who came before.
But it doesn't mean that I am mimicking anybody at any given time.
It's a complex process.
While this is like a small nugget of probably how brains work, I think it's a very small piece of how intelligence works.
But there have been times when I had to write copy, when I had to write up what the embedded website was for, or write, I don't know.
Advertising. Advertising.
Advertising stuff.
Social media garbage, yeah.
Put together our website, which says pretty much nothing other than if you want help making
an embedded system, come here.
But you need like six pages in order for it to be a website.
Yeah.
And that sort of blah, blah, blah.
It's fine.
That it was good at.
It's good at many things.
The question is...
Is it going to replace us?
Is it going to be this thing that transforms society that a lot of people are thinking it's going to be?
I don't really think so.
Is it going to be this thing that replaces whole swaths of creative people?
I don't think so.
Now, maybe I'm not thinking far ahead in the future. Maybe in a year, a year and a half,
given how fast these things train, it will be spectacularly different. But I feel like
there's a coming backlash.
I think when it dirties its own feeder pool, it's going to have a lot of trouble.
And the thing is... Because it's already so bland.
It's prompt-based.
It's not sitting there.
It's dead.
It's not sitting there doing anything while it's idle.
It's helping other people.
You give it a prompt, and it runs through its model and finds the statistical word after word that matches what should come out next. And that matches the prompt best, that matches
its training best, that matches the context that came before best. And that's not, it
can't do anything in the absence of stimulus.
And if it, because it doesn't understand.
Right.
The errors it has can be very subtle or egregiously hilarious.
And that's the thing.
It doesn't know it made an error until you tell it.
But then it knows.
Talk about the palindrome thing.
Right.
So, let's see if I have that one.
I don't want to go on for this for too long.
I just...
I have a bunch of other things on our list, so...
Yeah.
Furry animal palindrome.
So I asked it to write a palindrome
about a furry animal.
And the first thing it says is,
a Santa at NASA saw NASA's fauna.
And I asked it, is that a palindrome?
I apologize for my mistake.
The previous sentence I provided
was not a correct palindrome.
Now, does it actually understand it made a mistake? Or does it statistically think that since I asked
it a question about its previous response, it must have made it? The correct response to that
is I made a mistake and it was not correct. And so it gave me another one that was not about a
furry animal, also was not a palindrome. And I said, is that about a
furry animal? It says, I apologize for the confusion. I misunderstood your prompt. It's
lying. It did not misunderstand anything. So that's the kind of thing that drives me crazy.
This thing saying I misunderstood implies a whole lot of stuff.
It didn't misunderstand my prompt because that's not how it works.
But it's not responding to you. It's using the statistics of what word comes after.
I'm sorry.
But you're talking to this thing.
That's the thing.
You think you're talking, not you.
One thinks they're talking to an entity when you're actually talking to an Excel spreadsheet.
Anyway, I misunderstood your prompt.
Here's a palindrome about a furry animal a man a plan
a canal otter panama so it took an existing an existing palindrome and just jammed otter in the
end a man a plan a canal otter panama and it said this palindrome is often attributed to
lay mercer who created it as a wordplay on the construction of the
Panama Canal and the presence of otters in its
waters.
Bullshit!
You did nothing of the kind. That person did
nothing of the kind. And so my response to that
was, sigh. And it said,
I'm sorry if my previous response was not helpful.
Please let me know if there's anything I can assist
you with. So it's
like if we'd continue... Somebody said not helpful. Please let me know if there's anything I can assist you with. So it's like
if we'd continue, and somebody said this is just Eliza. I disagree heavily. It is not like Eliza.
If you've used Eliza, you know that this is much more sophisticated and capable than Eliza.
But it's very broken. Wait a minute, let's define Eliza. Eliza was one of the first chatbots. I
think it was coded in like the 70s or the 60s.
It was very stupid, heuristically based, and it pretended to be a psychotherapist.
So you could...
But it would respond to you.
It would bring up what you said to it.
It didn't have a lot of history.
It had no understanding.
So it would just take things you said and then put them in sentences.
But it had a list of keywords.
Like, if you said anything about your mother, it would say, tell me more about your mother.
And so it felt like you were talking to someone.
For a minute.
For a minute.
It was very bad.
But then it got repetitive and you could tell you weren't.
And it was written in 1964 or 5 and then later redone in Lisp and some other things.
So, you know, it's not a neural network-based thing.
It's just a program.
You could look through Eliza's code and figure out what it was going to respond to every impact.
So, I don't know what to say about this stuff.
Everybody's talking about it. Some people are excited about it and everybody who gets excited about it, I just like shake my head and want to not think about it. And people are scared of it. And I don't know whether to be scared of it or not. Ilied because i think the danger is not this thing doing something it is
humans doing something with these things without thinking of the consequences or how they really
work or what they're actually good for or what they do and they've only been around a few months
and already people are like jamming them into search engines and putting it on the home page
of google and bing and even duck duckGo has a little thing at the top now
that uses this model to get suggestions and parse stuff.
And it's wasting so much time for other people.
I remember...
Yeah, I'm spending a ton of time
trying to get the damn thing to write me a palindrome.
No, no, no, no.
Like Clark's World, the sci-fi magazine,
had just an onslaught of submissions that were all written by ChatGPT.
Yeah.
And I think it was Uri over at WalkWe or maybe one of the folks at Adafruit said that they got code.
And the person was on their forum trying to debug the code.
And they finally said, well, where did you get this code?
And the answer was chat GPT.
And it was like, you just want to throw the table over and walk away.
No, no, no.
Wasn't it somebody who said, oh, that was one thing,
but there was another.
I think it was Evil Mad Scientist.
They got a support call, and they said,
hey, this program, what was it?
It was something like this program doesn't work or blah, blah, blah.
And at the end of the call, I think it was Wendell, said something like, I don't think that exists.
Where did you get this?
And ChatGPT had made up, you know, know this program right and it you asked it about me
and i had written several books yeah you wrote practical c and which i did not i wrote making
embedded systems i'll take credit that's part of the thing it will not it does not know that it
doesn't know and it doesn't know what truth is so if it doesn't know that it doesn't know. And it doesn't know what truth is.
So if it doesn't know that it doesn't know, you can't be sure if what it tells you is something that is accurate because it's been well-trained in the area you're asking about, or something it's not.
That's true. It never told me it didn't understand Yoshimura Folds.
It actually went on this long rant about rigid foldable origami.
It was really interesting, but it had no idea what it was talking about.
And I, you know, I did play with it as I compare and contrast between these types of folds.
And it couldn't do it because it doesn't understand.
But it's willing to tell you all about it.
Oh, it was willing to make up all kinds of yes.
So, you know, it's like Cliff at the bar in Cheers.
Blah, blah, blah, blah, blah.
Remember Cliff?
I mean, I'm...
I'm very old.
The other thing, the last thing I'll say.
So one way that people, it seems like developers are trying to get around this
is they're plugging in a backend like Wikipedia or a search engine to it. So it'll go and look for information, but that's causing other problems because now it's just picking like the first hit or the first couple of hits. up garbage but it can't evaluate the truth
of things even if so i mean the obvious solution is well if it can't tell when it doesn't know
something we can give it the ability to look it up but it has no way of assessing whether what it
looked up is correct because all it's doing all i think they're doing is hooking it the search
heuristically into a prompt engine right so you ask it a prompt
maybe they've got some confidence coming out of the model and it goes i'll go look that up
and then it uses that as the next prompt or something like that but i don't know i i i
would like to not use computers i see um i found a good therapist uh and I don't really want to talk about
burnout on this show
but
I did ask her
why everyone
that I know is going through burnout too
if it was just like
my imagination like when you buy a new car
and you think everybody else has the same car
because you start noticing it everywhere
but she said it's more common because people haven't processed the pandemic. There was a catastrophic event for people who
didn't lose loved ones or become very ill themselves. I mean, it was a catastrophic event
for everyone. And it may be that we all hate our jobs because we're just exhausted from pretending that everything is hunky-dory and that we're going back to normal when we don't even really maybe know what normal is anymore.
I think that's a big part of it.
I don't know if that's part of it for me, probably.
I mean, going back to 9-11 and the towers falling, that was obviously traumatic. It took a long time to feel safe, and I have died, and there's no one to be
mad at.
Well, there's a few people to be mad at.
Well, I mean...
I can think of three right off the top of my head.
Sometimes when you go through something traumatic, if you can respond to it, that's part of completing the stress cycle, part of getting it out of your head.
But there's no response.
I think part of it, too, is the nature of our work as tech people, not that we're special or anything, is a little bit isolated sometimes.
And so I'm not in favor of people going to the office if they don't want
or being forced to go to the office or anything like that,
but it did take all of us and put us in our little desks for a long time,
which was not a big change in existence for me, but, you know, we had other outlets.
So I think also part of it is kind of just seeing
how the corporate world started treating employees during that time.
Because it started out with, oh, you can do whatever you want,
and I work from home, we'll support you and all this stuff,
and we're going to hire tons of people.
And now all that is unwinding.
And layoffs, so many layoffs.
Unwinding in kind of cruel ways,
which I think is kind of bursting people's bubbles about the industry in some ways.
What, do you mean we're not all a happy family at this company?
Team.
Teams.
Putting the meat in team.
Anyway.
Yeah, okay.
So going back to things, getting back to normal, there are conferences, in-person conferences starting up.
Okie doke.
Open hardware summit at the end of April.
The CrowdSupply Teardown at the late June.
Summikind West, July in San Francisco.
Embedded World is in Austin.
Oh, it's October 2024.
So maybe not right away.
Don't have to worry about that one just yet.
Hackaday has a new prize.
Yeah, I just announced it yesterday, right?
$500 for the 50 finalists. And there are subcategories with additional prizes.
So $10 each?
No, no, no, no, no, no, no.
Oh.
And then there are the big prizes, the multi tens of K's prizes for the big winners.
And it looks good.
It seemed like they had a broad range of topics you could kind of do things in this time, which was cool.
Yeah.
Including a just general save the world sort of topic.
I mean, they do want sustainability and all of that but there
was one that was like build a tool that's useful yeah i liked that that was one i hadn't seen before
and their judging group was pretty interesting i went to their judges and i was like you know what
i should just ask all of these people to be on the show that's what you did one year didn't you
uh i have done that for some things but i don't think I've done it for Hackaday.
Although, maybe I should.
My scheduling hasn't been great.
So, yes.
And then Embedded Online is happening sometime soon.
Yeah, it's very soon.
That one's online only, though.
Cool. So yeah, if you are missing people and want to get together,
there are places you can go for your tech get-togetherness.
We will not be there.
Now see, a lot of these Hackaday Prize images,
I think were generated by an AI.
Anyway, excuse me, I think we're generated by an AI. Anyway.
Excuse me.
Generated by a deep neural network model.
Okay, I want to do an announcement that we have a newsletter.
We send it out every week, even when we don't have a guest.
Or a show.
Or a show.
And we try to put in a few links for your amusement,
including the fish doorbell and the frog house,
both of which are very funny,
but also useful things like language pointers and whatnot.
And we have a Patreon.
And for those of you who don't like Patreon, I am going to put together a coffee, if you want to support us that way.
Cool.
Let's see. Oh, I am looking for someone who does QT on Linux.
I do. A contract with
a GUI application on a
medical device.
I don't know Qt.
I believe it's pronounced
Qt.
I believe it's pronounced
Qt.
Qt.
I know Qt,
and I've done medical devices with it, but I am...
On Linux.
On Linux, but I am tired and will be taking no additional work for the foreseeable future.
But yes, that sounds cool, and somebody should jump on that.
Yeah, send us an email to the show if you're interested in finding out more.
They are looking for people who have experience in QT.
You should really not be learning.
Yeah.
It's hard to learn.
So if you don't know it already, it will take you some months to spin up,
and they're probably not looking for that.
Yeah.
Yeah, they have people they can do that with.
Let's see.
There were a couple things from the Patreon Slack group.
I put together a bit of code and asked people
which way they saw function pointers working.
And while that was a good discussion,
the more interesting discussion was,
what do you mean you don't know what Godbolt is?
He's a person.
Well, Matt Godbolt is a person, yes.
But he created this thing called Compiler Explorer,
and we've had him on the show.
And we've talked about it many, many times,
but apparently some people still haven't heard of it.
Okay, so what I did is I put two or three functions
I typed into the compiler explorer
at guidebolt.org, and then I put in a main, and
then I had some printout functions for different function pointers
because that's what I was exploring. And it compiled
it, and it ran it.
What is it?
Well, that's the thing.
It's a compiler explorer.
But where do you download it?
Does it come in a shrink-wrapped box with floppy disks?
No, no, you go to godbolt.org and you type in your code.
Usually you have to click through a few
we-try-to-protect-your-privacy-as-best-we-can notes.
And then you compile it.
And it was originally made to settle bets
on which way writing a couple of lines of code would be faster.
And it mostly shows the assembly.
I mean, as its original incarnation,
you had the C code on one side,
and on the other side it would show you the assembly.
Right.
So you could immediately look at the assembly.
And then it has a drop-down box for thousands.
I'm exaggerating, but seriously.
Seems like.
Every compiler under the sun for every architecture.
Every language.
And you can choose, you know, that thing.
ARM.
Compile it for different architecture or language.
Or PC, or PowerPC.
And it will execute now.
And it will execute now.
For some value of execution, like, I don't think it has, like, it's not going to execute your graphics code, but.
I don't think so, no.
I mean, I just did printf.
Yeah.
So it ran. Yeah, it is such a great tool for taking a problem and just mocking up a solution.
Just hacking it together to see what happens if you try this.
That's what you used to do where you, you know, just vi dumb.c and then gcc dumb.c and get a.out and do that.
Or if you wanted to look at the assembly, you'd get the list file.
But it just makes everything much easier because you don't have to worry about,
oh, which gcc do I have?
And it color codes the assembly so that you can find the line it was on.
There's all sorts of tools built into it, so it's very useful if you're doing any kind of coding
that you have questions about. And like I said, my question was, which of these two ways of handling function pointers
in C did you first learn?
Yeah.
And it wasn't, you know, it wasn't a groundbreaking question.
I just wondered because...
You wanted to see if they worked first, because I believe...
That's true.
I wasn't sure that they both worked.
There's a pretty way and a not pretty way.
And I learned the not pretty way.
I did not believe the pretty way worked.
To be clear, to bring it around, we did ask ChatGPT, but we couldn't be sure that it was lying or not.
I don't remember what it said, though.
It said the right answer.
Okay.
And it's funny because the ugly way, when I searched online just in Google,
the first hit I found was Geeks for Geeks, which is usually a site
that has reasonable answers. And they had the
ugly way and didn't show that pretty well. I learned the ugly way
first, even though you pulled
out our C book from college, which
is now almost 30 years
old, and it had both
ways in it, so I'm surprised. I don't know.
I think for me...
It did note that one way wasn't entirely...
Let's be clear here.
So function pointers.
I'm not going to describe function pointers entirely,
but when you use a function pointer to call a function,
the ugly way is to dereference it first.
So you have parenthesis and then asterisk and then the function pointer variable name
and then close paren and then open paren for the arguments.
So that's the way I'm used to doing it
because it's a function pointer.
I've got it in references.
You have to star it to get the contents.
The clean way is you just don't do any of that
and you just call the variable name
as if it was the function
and C dereferences it implicitly,
which I did not know.
Or if I did know, I keep forgetting it
because it scares me.
I mean, because if that's true,
what about all the other pointers in the world?
Is it just going to magically dereference those?
It just really bothers me.
I don't think so, because I think it knows when you're declaring a function pointer.
So I think it's a special type.
Why is it treating function pointers special?
I don't like it when it does special.
Probably because somebody said this is really syntactically gross.
It really is syntactically gross.
But I prefer things that are explicit in C,
because the implicit things it does are often confusing or unexpected.
So I think the reason I use the ugly way all the time is just because I want to be safe and never stuck with me to use the other way.
Yeah, me too.
It just is one of those explicit is ugly and implicit is pretty, but I'm so used to needing to know exactly what's happening.
I'm such a control freak that I use the explicit methods because I don't trust the implicit ones, even though it's part of the standard.
Yeah.
Let's see.
The other thing that came up in the Slack that was somebody said they wanted to learn Jupyter Notebooks.
And
my answer to that
was, have you tried Colab?
Because you don't really
want to set up your own Jupyter
network system. It's actually kind of
gross.
You have to have a server
and then you have to
have it run on your local computer, but then it's got its own.
I think I've done it with Docker a bunch, right?
Yeah, it would be easier in Docker because you need the server and you need the client.
It's some command line.
But Colab is just this C-O-L-A-B.
It's like Godbolt for Jupyter Networks.
Sorry.
It's a Google thing, and it saves stuff to your Google Drive,
and you type in it like you would a Jupyter Notebook.
We should probably say what a Jupyter Notebook is. So Jupyter Notebook, you can have code blocks,
and you can have text blocks, and you can intermingle them.
In one kind of document.
In one document.
And then the code blocks usually are Python, although they don't have to be.
And you can install various things to the instance of whatever you're running.
So if you need a particular Python package, that's fine.
Exclamation point, pip install, blah.
And then you have
your document and your code in the same
place, and
anybody can run it, but it
is kind of like AWS in that
it's not...
It forgets its context after a while.
Yeah, and so
if you want to generate
a bunch of files, like when I want to generate a bunch of origami files, I have to download them.
Yeah.
Or they'll be gone the next time I go there. Of course, I can just regenerate them. It's somebody else's computer. I don't care how much time I waste.
It is free, mostly, right?
Oh, it's free, but there are limitations on how much processing power you can use. I remember,
so I took a neural networks class a few years ago,
and it was all done in Collab and Jupyter notebooks.
I think it might have been Jupyter notebooks at the time,
but same thing.
And very sophisticated code with defining models
and training them right inside there
and all sorts of stuff and running them and executing them.
So you can do almost anything in there.
It might be a little slower than if you had a computer running.
I mean, if you had a slow computer,
I mean, that computer is pretty fast,
but it's over the internet.
But it's just the ease of being able to not comment, but write a paper-like thing. Yeah, a self-describing document with code sections that you push play and they execute.
And you can have diagrams and...
Graphical output, right? Yeah.
All of the things in the text part
that you could do with Markdown.
And you can, if you use like matplotlib or something,
your code block can generate a graph
right in the text, so yeah.
And it comes with matplotlib and numpy and scipy,
so you don't have to install those.
I only end up having to pip install things that are pretty one-off.
Yeah.
So it's a cool workspace for experimenting, but also for delivering stuff.
There have been scripts for clients, I remember, that you built for handling bitmaps and assets
and remapping things.
It was like, okay, just here's this link to this thing and drop your file in here and press go.
And the output is a zip file
with everything that's been processed.
And that's a lot easier to deal with then.
Here's a Dropbox link to my executable.
Oh, it doesn't run on Windows.
Hang on.
Oh, you didn't, you know, or maybe it's Python.
Well, you've got to get your requirements.txt
or you've got to use a virtual environment
or you've got to use content.
It's much easier to just have something out there that's just kind
of a, not a web app
exactly, but some code that's
accessible. It's very much like a web app
sometimes. It's just not, I mean
it's not presented that way. It's not got a
UI. It could be, if you're willing to put
in the work.
Let's see. I have
a line in here for UAVs drones and rg pilot so rg pilot
yeah every time i hear about someone who wants to build a drone controller yeah i'm just like
go to rg pilot do not reinvent the wheel am i giving giving them puppies? You're giving them lots of puppies.
You're giving them a puppy farm.
I've been working on
a drone project which is wrapping up
soon, sort of.
And it was my first experience
with R2Pilot and stuff.
And I'm not even doing anything with it, except
setting it up.
So I'm not writing code that interfaces with RGPILOT.
RGPILOT is a software platform for autonomous vehicles, full stop.
It's for fixed-wing aircraft.
It's for copters, multi, what do you call them?
Rotor.
Multi-rotor copters.
It's for boats.
It's for cars, anything. And so it's a very sophisticated
large project that can integrate with all kinds of vehicles for autonomous or manual-controlled
flight or driving. And as you expect from an open-source project that's been around for a
while, it's big and it's complicated and it's got its idiosyncrasies. I wasn't really aware of that when I started setting this thing up,
which was an off-the-shelf flying, off-the-shelf UAV
that we were just trying to get some stuff to work with.
So it's got a whole ecosystem.
Like there's RGPilot and then there's the software
that talks to RGPilot that you actually use to control the vehicles.
And there's a whole bunch of those applications. QGround control, which is a QT-based one. There's Mission Planner.
There's something called Solex, a bunch of these things. And it can control cameras. It can control
servos. It can control the speed controllers. It can, you know, the IMU, your gyros, GPS.
You know, it's just really complicated. And the
gimbals and the cameras and stuff. So I've had a devil of a time trying to get it to talk to a
gimbal correctly and all kinds of things. So yes, I think you should recommend Argy Pilot,
but people should understand that it's... I mean, when I say puppies, there's like
free as in freedom, and there's free as in beer, and then there's free as in puppies.
Because you have to understand what your free is when you have free software.
Yeah.
And there's PX4 too, which is another similar, a different one that people use. But, you know, I shouldn't, I don't know what I expected,
but it was more complex and opaque in some ways than I expected.
There's just, you know, when you're setting up your vehicle,
there's just reams of parameters and things,
and some of them just have values or bitmaps in them that aren't well documented.
And that may be the device I'm using too.
So it's...
That's funny.
When I first came across it, it was, it seemed like a really good way to do things on UAVs
because it had good fusion filters between the different sensors and it supported all three of the big drones available
i think and i don't remember it going on all the vehicles it makes sense that that you would
expand things like that but i think to me it's a much smaller project because the last time I
interacted with it was
years and years ago.
It's super huge.
There's a lot of hardware based on it.
Very expensive
flight controllers and things where
you buy the hardware and flash
whatever the latest or correct
version is for it.
It's a big project.
Yeah, my experience with drones prior to this was all hobby stuff,
and they used much simpler flight controllers and things.
Although you can use it for hobbies, and I think a lot of people do now.
But it depends on how much you want to take care of it.
Yeah, and it depends on...
If you're buying an off-the-shelf thing that comes mostly pre-configured, it's probably not a big deal.
It's probably quite easy.
If you're building your own vehicle from scratch, then I think it gets tricky because you're going to have to tune stuff for, you know, the motors and things like that.
The one really painful thing was the calibration of the IMU and the compass.
Well, that was only because the unit was heavy.
Right.
But so one of the things you have to do when you're first setting up your vehicle is you have to calibrate the IMU so it knows it's accelerometer nonsense.
And the compass for the magnetometer.
And normally when you do this,
you have to flip the device that you're using in all axes or put it in known orientations,
which is easy to do when it's your cell phone.
It's less easy to do when it's a 20-pound, 5-by-5-foot hexacopter with a payload attached, and you have to hold it upside down
against the ceiling for 30 seconds. Or with the compass, flip it in all axes for like five minutes
while a little progress bar goes by on the control. Anyway, it was pretty funny because it's like the procedures doesn't change.
Like, I don't know how you do it on an actually very large drone.
Like, how do you calibrate, you know, a fixed wing thing that's actually quite big?
Nobody's going to be picking that up and flipping it around. You would have to calibrate
the sub-assembly
and then put the assembly
in with a certain amount of tolerances.
Yeah.
And then it would probably learn
the errors through a Kalman.
Yeah.
And it was funny, when I was working with him
to calibrate the IMU,
the instructions were really good. I mean, I know how to calibrate the IMU, the instructions were really good. I mean,
I know how to calibrate an IMU because in 2000, I worked on IMUs a lot. And so that part, I knew what the process was for both calibrating the IMU and the magnetometer. And I was happy to see that
the IMU had a really good calibration process.
I mean, it told you what to do, told you if you were doing it right, told you when to go on.
It was very nice.
The magnetometer didn't give good instructions.
And I had wandered off when he was calibrating the magnetometer.
And all I hear a few minutes later is,
it won't go past 70%.
And you were having such a hard time.
And I came over and I helped
because I knew what was happening,
but I don't know how anybody else
would have gotten anything else out of that.
Yeah, in a different
time I'd be much more excited
about the drone stuff.
I know, it's really
one of those things that a few years
ago this drone stuff would have been very exciting
but now it's just
just more tech.
Anyhow. But that's why you're getting a break.
Fingers crossed.
Well, do you have anything else you want to talk about?
No, let me ask ChatGPT if it has anything it wants to talk about.
Oh, the perfect PB&J recipe.
Do you want to hear the ingredients for the world's best PB&J sandwich?
Does it include Jif?
Two slices of bread.
Two to three tablespoons of pita butter., two to three tablespoons of peanut butter,
and one to two tablespoons of jam or jelly.
World's best PB&J sandwich.
No apples, no bananas, no honey, no interesting breads,
no frou-frou peanut butter, no fresh from the strawberries jam.
That's just sad.
Not even any chocolate chips.
I've never in my life had chocolate chips on a peanut butter and jelly sandwich.
But now that I've said it, it doesn't sound bad, does it?
I don't know.
Because sometimes when you're biting into something
where you're not expecting chocolate chips,
they're a bit surprising.
If they're not melted, like if they're hard.
Well, that's the thing is that I have discovered with my peanut butter and jelly sandwiches
that I toast the bread and then I put the peanut butter on and then I put it back in the toaster,
which is an oven, not a... Anyway, the peanut butter remains horizontal, not vertical.
And then I put jelly on jam, usually strawberry.
I put that back into the toaster until it's warm and almost pie-feeling-like.
And then I bet if you put chocolate chips between those when they're warm,
that would be fantastic.
I'm hungry.
I think it's making pie at this point.
Yeah, it's pretty much just pie at this point.
All right.
Yes.
Well, I have to release this today, so we should probably wrap it up.
All right.
All right.
I won't take very long with poop, but thank you for co-hosting with me.
I wouldn't even bother to thank ChatGPT.
I don't know what it'll say, but I'm pretty sure it'll just say,
I'm an AI, don't thank me, or some nonsense. It says it's an AI language model. Even that is a lie.
Thank you for listening. If you'd like to contact us, hit show at embedded.fm.
You can contact us for whatever reason, but if you do want to talk about QT for Linux contracts, be sure to put that high in the list so that I recognize it.
And if you're there and you want to push newsletter or Patreon or whatever, please do.
And now some Winnie the Pooh.
Let's see.
Winnie the Pooh had the honey jar on his head.
And Piglet was very scared of going to see if the Heffalump had been caught.
Piglet looked down into the Heffalump trap.
Help, help, cried Piglet. A Heffalump, a the heffalump trap. Help, help, cried Piglet.
A heffalump, a horrible heffalump.
And he scampered off as hard as he could, still crying out.
Help, help, a horrible heffalump.
Huff, huff, a hellable hellerlump.
Hull, hull, hull, a hull of a hellerlump.
And he didn't stop crying and scampering until he got to Christopher Robin.
What's the matter, Piglet? said Christopher Robin, who was just getting up.
Huff, said Piglet, breathing so hard he could hardly speak. A huff, a huff, a huff, a huff a lump.
Where? Up there, said Piglet, waving his paw. What did it look like? Like, like, it had the biggest head you
ever saw, Christopher Robin. An enormous thing, like, like nothing. A big, huge, well, like,
I don't know, like an enormous big nothing, like a jar. Well, said Christopher Robin,
putting on his shoes, I should go and look at it. Come on. Piglet wasn't afraid if he had Christopher Robin with him. So off they
went. I can hear it. Can't you? Said Piglet anxiously as they got near. I can hear something,
said Christopher Robin. I have some advice for Piglet that just came in.
In response to help, help a horrible heffalump and that's all. Don't worry. Stay calm.
Remember, heffalumps are imaginary creatures from the Winnie the Pooh story, so you are safe.
If you are feeling scared or anxious, take a deep breath and try to focus on something calming.
You can also try some relaxation techniques such as meditation, progressive muscle relaxation, or deep breathing exercises.
If you want to talk more about your fears or anxieties, don't hesitate to reach out to a trusted friend or family member or bear.
I added that.
Or a mental health professional if you feel you need more support.
Or chat to EBT if you don't need more support.
Even if heffalumps were real, there are always ways to stay safe and deal with difficult situations.
Stay calm and take care of yourself.
What a dweeb.