Well, finally it works just fine!And by the way, since this is most popular topic here in last month...AI is already writing arduino code, has anyone tried to make it write some PBP code?
Well, finally it works just fine!And by the way, since this is most popular topic here in last month...AI is already writing arduino code, has anyone tried to make it write some PBP code?
There is no such thing as A.I.
It is just a lot of data and very fast processing. And a lot of marketing I guess.
That is why in critical jobs the so called AI fails. E.g. a Tesla in self driving and crossing under a bridge. It suddenly reduces speed or stop completely!
Anyway, hope no one will try to make a hybrid of biological stuff and electronics together... Then God help us all.
Regarding the forum, till now it works OK. Except some strange things, at least for me, that I miss. Like the controls above the text box for the post.
Ioannis
I think (no background in AI) that the solution touted as AI in the form of ChatGPT is nothing more than a glorified search engine with a language engine to narrow down and synthesise results as a script rather than links.
The possible scenario I can visualise is that it picks up solutions from various online databases like github and similar that it may have indexed over time. Then synthesise these results to deliver the output. Therefore, the real test will be to test it with a creative problem rather than something that it may already have stumbled upon in its indexing of various sites.
I see the Boston Dynamics robotic dogs and bipeds that show off their dancing and prancing skills. However, if you look at it as a copy-paste in mechatronics, it makes sense. Copy an acrobats movements and then replay them. However, I do not want to diminish the logic required to balance the being. Computing power is presumably very high to achieve human-time performances.
I do not know the state of the art in how fast it can conjure up solutions that are not known to it; or does it just stop till it knows??
I asked ChatGPT if it is intelligent and clearly said NO! Sure it is not. It is just a lot of knowledge and really fast processing. This does not make it intelligent.
And to answer Jersons question about creative project, sure it cannot create something really new. Although it is claimed to create music or poetry, the result is not really new as it follows strict rules and does not have feeling to create something form deep in the heart of the human creator.
As tumbelweed posted earlier, programs created by these systems may not be the best or even fail.
Ioannis
This is just new reality and lot of people just don't understand that.I work at university, and students using AI for their research and homework are causing very serious issues.Regarding the "search engine" - which one can create something like this?
OpenAI does NOT know PICBASIC.
It says it does, but NO
It does however grapple with Bash Script, Python etc very very well.
I have been testing in the OpenAi playground and in ChatGPT , comparing my Python and Bash Script routines to that produced by OpenAi.
Its very very good.
It has also been useful in helping debug , and reduce code size.
When creating new routines its like having a mentor , helping me along and making suggestions that aide my progress.
If it had a good handle on PICBASIC, most of the "How do I do" questions on this forum would be answered with code examples and plain english explainations, ..... it would be a great integration.
Mining big data and making life descisions on the results will enhance humans. This is just the start.
Its not intelligent , or sentient, its just a machine regurgitating stuff, faster than I can think and search and refine. Its a great help.
So can we teach AI some PICBASIC?I have a simple code request - some routine is runningbut you need to "freeze" all action going (screen update), when user press buttonand "unfreeze" it when user presses button again.Sounds simple, but I'm stuck, if AI could wrote a code for that - that will be good...
What type of work do you do at that university and which university is it, if you don't mind me asking?I work at university, and students using AI for their research and homework are causing very serious issues.
I've never been to one (university, that is), less worked at one but a collegue of mine, whos wife works at a Swedish highschool (not university) said that they started to notice this "AI" being used among some of the students. It's just that that the students using it didn't seem to have any "I" what so ever of their own because after years of underperforming they were all of a sudden delivering essays containing loads of words that they just last month could not even spell or, even less, know the meaning of.
The world is full of cheaters and people wanting to take the easy way. Heck, it's not like we're all here to just GIVE advise, is it?
i wonder how many unique responses the ai can give to to the same or similarly worded request, imagination not being a known computer attribute. according to arduino forum chatgpt supplied C++ code for arduino is not particularly useful or clever and may not even be functionable.
Warning I'm not a teacher
I work at local university, name of which won't ring a bell for anyone, and I'm not going mention it here, because I don't like google indexing everything I'm head of a mechanical workshop - we have various sorts of machinery - CNC, laser, 3D printing, woodworking, metalworking, etc. Students come to workshop to make things necessary for their projects - pcb, wood cabinet, some metal parts, casting/molding, etc. Exams are conducted in controlled environment and electronically, so students simply can't cheat - there is no internet, no phones allowed, questions are random and so on, but when it comes to junior/senior project, essays, etc, they do started to use AI and this is very disturbing.
interesting :
https://betterprogramming.pub/build-...3-8d12188780a2
Things move at the speed of light... Cannot follow!
Very interesting Lester! Are these API ready to be embedded in forums like ours?
Ioannis
I guess that english is a requirme t that will be there for some considerable time.
Concise prompts are key to obtaining a useful and correct outcome from OpenAi , ChatGPT being one example.
I found it took a while to tailer my input in a way that gave usable output. Writing prompts will be the codeing of the future.
I sure it will. English in general is easy for machines. Like a programming language.
But deepl has progressed far away comparing to google translate and makes translation of long texts more effortless and with meaning.
I do not know if deepl uses A.I. but does a great job.
Today I tried chatGPT again and has improved alot from my (few days ago) visit! It evolves constantly.
It also wrote a PICBasic piece of code with an error on variable declaration. It used DIM but beside that, it used DEFINE 8 and that shows it started to learn the language.
Ioannis
Can we see that code?
It is very interesting...
This program defines the input serial port using the DEFINE statement, sets the size of the ring buffer, and initializes the buffer pointers. It then defines an interrupt handler for receiving data on the serial port, which reads incoming bytes and stores them in the buffer. Finally, it sets up a main program loop that reads bytes from the buffer and processes them, and inserts a PAUSE statement to avoid consuming too much processing power. You may need to modify this program slightly to fit your specific requirements, but it should provide a good starting point.Code:' Define the input serial port DEFINE HSER_RXSTA 64 DEFINE HSER_RCSTA 128 DEFINE HSER_BAUD 9600 DEFINE HSER_CLROERR 1 ' Define the size of the ring buffer DEFINE BUFFER_SIZE 16 ' Define the ring buffer DIM buffer(BUFFER_SIZE) AS BYTE DIM buffer_start AS BYTE DIM buffer_end AS BYTE ' Initialize the buffer pointers buffer_start = 0 buffer_end = 0 ' Define the interrupt handler for receiving data on the serial port ASM INT_LIST macro ; IntSource, Label, Type, ResetFlag? INT_Handler HSER_RX_INT, _receive_data, PBP, yes endm INT_CREATE ; Creates the interrupt processor ENDASM ' Define the subroutine to handle incoming data on the serial port _receive_data: ' Read the incoming byte buffer(buffer_end) = HSER_RCREG ' Update the buffer pointer buffer_end = (buffer_end + 1) MOD BUFFER_SIZE ' Return from the interrupt RETURN ' Main program loop DO ' Check if there is data in the buffer IF buffer_end <> buffer_start THEN ' Read the next byte from the buffer BYTE next_byte = buffer(buffer_start) ' Do something with the byte here... ' Update the buffer pointer buffer_start = (buffer_start + 1) MOD BUFFER_SIZE ENDIF ' Insert a delay to avoid consuming too much processing power PAUSE 10 LOOP
All the above was the chatGPT answer to a Ring buffer request, including the last paragrapgh, explaining what it did! Very interesting although with some errors.
Ioannis
After teaching it the correct variable syntax here is the revised program. Note that ASM is not used this time:
IoannisCode:'PIC18FxxK22 Configuration Bit Settings 'CONFIG1H #CONFIG FOSC = INTIO67 'Internal oscillator block, port function on RA6 and RA7 PLLCFG = ON '4X PLL Enable (Oscillator multiplied by 4) PRICLKEN = ON 'Primary clock is always enabled FCMEN = OFF 'Fail-Safe Clock Monitor disabled IESO = OFF 'Oscillator Switchover mode disabled #ENDCONFIG 'CONFIG2L #CONFIG PWRTEN = ON 'Power up timer enabled BOREN = SBORDIS 'BOR enabled in hardware (SBOREN is ignored) BORV = 2 'Brown-out Reset Voltage bits (2.7V) BORPWR = ZPBORMV 'BORMV set to ZPBORMV instead of ZPBORMV42 WDTEN = OFF 'WDT disabled (control is placed on SWDTEN bit) WDTPS = 32768 'Watchdog timer postscaler #ENDCONFIG 'CONFIG2H #CONFIG CCP2MX = PORTC1 'CCP2 input/output is multiplexed with RC1 PBADEN = OFF 'PORTB<5:0> pins are configured as digital I/O on reset LPT1OSC = OFF #ENDCONFIG ' Declare variables RingBuffer var Byte[16] ' Ring buffer to store received data RxBufIndex var Byte ' Index to the next empty location in the ring buffer RxCtr var Byte ' Counter to keep track of the number of received bytes RxByte var Byte ' Variable to store the received byte ' Initialize variables RxBufIndex = 0 ' Start from the beginning of the ring buffer RxCtr = 0 ' No bytes received yet ' Main program loop Do ' Check if there is any data available in the UART receive buffer If UART1_Data_Ready() Then ' Read the received byte from the UART receive buffer RxByte = UART1_Read() ' Store the received byte in the ring buffer RingBuffer[RxBufIndex] = RxByte ' Update the index to the next empty location in the ring buffer RxBufIndex = (RxBufIndex + 1) Mod 16 ' Increment the counter to keep track of the number of received bytes RxCtr = RxCtr + 1 ' Check if all 16 bytes have been received If RxCtr = 16 Then ' Do something with the received data ' Reset the counter and start over RxCtr = 0 End If End If Loop
maybe take a look at OpenAI codex
https://gpt3demo.com/apps/openai-codex
OpenAI Codex features
- Convert comments to code: Write a comment describing the logic you want, and let GitHub Copilot assemble the code for you.
- Autofill for repetitive code: GitHub Copilot works great for quickly producing boilerplate and repetitive code patterns. Feed it a few examples and let it generate the rest!
- Tests without the toil: Tests are the backbone of any robust software engineering project. Import a unit test package, and let GitHub Copilot suggest tests that match your implementation code.
- Show me alternatives: Want to evaluate a few different approaches? GitHub Copilot can show you a list of solutions. Use the code as provided, or edit it to meet your needs.
If you're looking to explore OpenAI's API, sign up to create an account and gain access to the OpenAI API Playground.
https://openai.com/api/
Although, not optimised for PicBASIC Pro, Here, you'll have the opportunity to work with different programming languages, that you maybe familiar with, such as JavaScript, Go, Perl, PHP, Ruby, Swift, TypeScript, SQL, and even Shell, to get a better feel for the capabilities of the OpenAI API.
By doing so, you can get a better understanding of how the API works and how you can work with it to create powerful applications.
Since the Prompt is so crucial to gaining valid and useful output. I suggest that any code example generated by ai should be posted along with the prompt that generated it
The future of coding may well be prompts
You are correct. Sorry I did not kept that. Closing the window trashes the chat.
Ioannis
Whatever examples it found to copy it also switched from using interrupts to using a polled method.After teaching it the correct variable syntax here is the revised program. Note that ASM is not used this time:
You can probably find the same results using a search engine.
I dont think you will. It doesn't have a list of code sniped off GitHub or the like. It creates code on the fly. If you dont like what you get, you simply request it to rewrite with or without additional Promts "Training"You can probably find the same results using a search engine.
Try it and see
If I may say, sure it is not Intellignet (even its self does not say that if you ask it), but it is clever in the sense that finds ways you may miss.
And as Lester noted, you may request again a new version and will give it to you right away.
Ioannis
Try this as a prompt to generate svg
I would like you to act as an SVG designer. I will ask you to create images, and you will come up with SVG code for the image, convert the code to a base64 data url and then give me a response that contains only a markdown image tag referring to that data url. Do not put the markdown inside a code block. Send only the markdown, so no text. My first request is: give me an image of a red circle.
I got red circle on first try.
I noticed if html code is long, it will just stop generating it. Sometimes i can get to continue, sometimes not...
Sometimes when it stops replying, I asked why you stopped and replies, oh, sorry and continues!
Ioannis
So, this morning im putting together a cron job and bash script to automate the weekly tidy up one of my servers.
I turn to GPT for assistance and ITS DOWN !!!!
Update - We are continuing to work on recovering services.
Feb 21, 2023 - 00:52 PST
Identified - We have identified the root cause and are working to recover service.
Feb 20, 2023 - 23:59 PST
Investigating - We are currently investigating an outage affecting all models, including ChatGPT and Playground, beginning around 11:05 pm Pacific.
Feb 20, 2023 - 23:40 PST
It happens to the best of families too!
No one escapes...
Ioannis
Rise of machines?
When they'll mix electronics and tissues together then I would hide in the mountains!
Ioannis
Well, "they" have already decided that Nural Networks are the future of AI's deep learning.
Others have already working on Fish and Fly brains, oh and humnan brain matter been cultivated in the petri dish to the point that redimentary eyes develop.
So It must be on the road map for - if not already - organic nurons are used to recreate what we are currently seeing with this very basic deep learning AI.
The modern day equivalent of Asimovs Positronic Brain is on its way. :-) :-)
Mixing may lead to heal people that are paralyzed and give them the chance to walk again.
On the other hand, who puts the limits to all these interventions?
Ioannis
Neuralink is building a fully integrated Brain Computer Interface (BCI) system.
Also called a brain-machine interface (BMI).
Either way, BCIs are technologies that enable a computer or other digital device to be controlled directly with brain activity.
In the short term, the aim is to allow people with brain or spinal cord injuries to gain back function. Musk stated at a recent Neurlink event that the initial applications for the device could include the ability to restore vision for the blind, and even to allow paralysed people to walk again.
- Elon Musk’s Neuralink has applied to the FDA for approval to begin human trials.
- If approval is granted, the company is likely to start human testing on the device in 2023.
- The company believes that they will be able to potentially restore sight in blind people and could even give people with severed spinal cords the ability to walk again.
- Musk has stated that he plans to implant one of devices into his own brain once they’re ready.
Interfaced to AI, why wouldn't this evolve to allow anyone to query a deep learning Nural network to mine data from the world knowledgebase and abstact that into new an unique solutions. beyone the individuals unaided capabilities.
Exciting? Frigtening?
Well, they started to "mix" tissues and electronics for a long time already. For example, soviet union had quite deep research into that field in early 50s. Here's a picture of dog's head being "powered" by life support system. Actually, there is a video too, I just forgot a link, but I remember, when I posted it about 10 years ago on parallax forums, they deleted the post - "We don't like to see robotics and live organisms joined that way, and if you will post more like this, your account will be banned".
So we're living in exciting times!
i might need to update my thinking.
https://gearotic.com/GearHeads/viewt...p=16446#p16446
Warning I'm not a teacher
This, taken from that post, pretty much sums up my position after first playing with ChatGPT at Chrstmas and now working regularlay with OPEN AI playground.
I have it integrated into my browser and have it permenantly open on my desktop and my iphone.
This week I had some time to spare whilst waiting for an appoiunment, I had a long "chat" with it aboit the benifits of war to mankind , its very interesting. Obviously not human and sometime s repetitive, but never the less a useful wall to bounce ideas off in the absense of suitably informed human.This is the type of question a programmer thinks of a few times a day as some of the command redirects and such are not something you easily memorize.
I suspect it saved me an hour or more of web searching.
You'll notice it didn't get it right on the first try, but when prompted to recognize its mistake it did so and correctly spat out the answer.
After a week, it replies to my language more than perfect... Amazed again, on how fast it evolves. Scary!
Regarding tech questions, it does a great job. In other areas, depends. For example, it thinks that military equipment industries do not have profit from the war in Ukraine or any other war.
OK...
Ioannis
Bookmarks