Cookie Consent by Free Privacy Policy Generator ๐Ÿ“Œ Presenting Assistant Language. A programming language created with GPT3

๐Ÿ  Team IT Security News

TSecurity.de ist eine Online-Plattform, die sich auf die Bereitstellung von Informationen,alle 15 Minuten neuste Nachrichten, Bildungsressourcen und Dienstleistungen rund um das Thema IT-Sicherheit spezialisiert hat.
Ob es sich um aktuelle Nachrichten, Fachartikel, Blogbeitrรคge, Webinare, Tutorials, oder Tipps & Tricks handelt, TSecurity.de bietet seinen Nutzern einen umfassenden รœberblick รผber die wichtigsten Aspekte der IT-Sicherheit in einer sich stรคndig verรคndernden digitalen Welt.

16.12.2023 - TIP: Wer den Cookie Consent Banner akzeptiert, kann z.B. von Englisch nach Deutsch รผbersetzen, erst Englisch auswรคhlen dann wieder Deutsch!

Google Android Playstore Download Button fรผr Team IT Security



๐Ÿ“š Presenting Assistant Language. A programming language created with GPT3


๐Ÿ’ก Newskategorie: Programmierung
๐Ÿ”— Quelle: dev.to

Presenting Assistant Language. A programming language created with GPT3

Ok, so you probably heard aboutOpenAI's chatbot. It's the most advanced chatbot created so far. It can help people with LaTeX questions, find bugs in code or solve code challenges.

What I tried for this post is something different. I instructed ChatGPT to create a programming language for me and become the interpreter for that programming language.

I took the idea and a few useful instructions from this blog post.

Let's start simple

I started instructing the bot to create a simple language with an instruction to print. Also, it has to act as the interpreter of that language. To keep communicating with the bot I added a special format with slashes and quotes. Here's the result:

Presenting Assistant Language. A programming language created with GPT3

Presenting Assistant Language. A programming language created with GPT3

If you want to use my prompt, here it is

I want you to create a new programming language. It has to provide only an instruction for printing something to screen. I want you to explain to me how to use it in a concise way. After that, you will become an interpreter of that language. Answer with the execution result inside one unique code block, and nothing else. Only write explanations if the code contains errors. When I need to tell you something in English, I will put text inside forward slashes and double quotes /"like this"/.

Ok, looks good so far. Let's try the interpreter.

Presenting Assistant Language. A programming language created with GPT3

It looks like it worked!

Adding functionality to the programming language

Let's try to add some more functionality to our new programming language.

Variables

Ok, using the slashes and quotes format I'll try to add variables to the programming language.

Presenting Assistant Language. A programming language created with GPT3

Presenting Assistant Language. A programming language created with GPT3

Again, looks promising, let's try the interpreter.

Presenting Assistant Language. A programming language created with GPT3

Arithmetic operators

Now, the same thing but with arithmetic operators.

Presenting Assistant Language. A programming language created with GPT3

Presenting Assistant Language. A programming language created with GPT3

Presenting Assistant Language. A programming language created with GPT3

Now that we know how to use it, let's try it:

Presenting Assistant Language. A programming language created with GPT3

Logic operators

Now, I'll try to add logic operators to the language, but without instructing first about data types or anything else:

Presenting Assistant Language. A programming language created with GPT3

Presenting Assistant Language. A programming language created with GPT3

Presenting Assistant Language. A programming language created with GPT3

I haven't talked about conditionals or flow control structures, but it added the ternary operator when asked to include logic operators. It may mean that GPT already "knows" the language, just telling me how to use every piece of it when I ask.

Let's try these new operators:

Presenting Assistant Language. A programming language created with GPT3

If statement

I don't want to bias the bot so I won't ask it to add if structure. Instead, I'll ask for a flow control structure for branching based on condition:

Presenting Assistant Language. A programming language created with GPT3

Presenting Assistant Language. A programming language created with GPT3

Presenting Assistant Language. A programming language created with GPT3

Well... exactly what I had in mind... Testing time!

Presenting Assistant Language. A programming language created with GPT3

Comparison operators

I almost forgot about a crucial part of a programming language, the comparison operators!! Let's add them to our language.

Presenting Assistant Language. A programming language created with GPT3

Presenting Assistant Language. A programming language created with GPT3

Presenting Assistant Language. A programming language created with GPT3

Presenting Assistant Language. A programming language created with GPT3

Ok, now let's see how it behaves:

Presenting Assistant Language. A programming language created with GPT3

Looping

Again, for not biasing the bot, I'll ask for structures to loop or iterate.

Presenting Assistant Language. A programming language created with GPT3

Presenting Assistant Language. A programming language created with GPT3

Presenting Assistant Language. A programming language created with GPT3

Presenting Assistant Language. A programming language created with GPT3

Ok, so it added a classic for loop as well as a while loop...

Presenting Assistant Language. A programming language created with GPT3

Hmmm... and what if I try to run an infinite loop?

Presenting Assistant Language. A programming language created with GPT3

It detects it and prevents me from running it!

Functions

The next step is to add functions to our new programming language.

Presenting Assistant Language. A programming language created with GPT3

Presenting Assistant Language. A programming language created with GPT3

Wow, we also can return multiple values and unpack them...

Presenting Assistant Language. A programming language created with GPT3

Utility functions

Let's see if we can create some "global" utility functions to make our life easier.

Presenting Assistant Language. A programming language created with GPT3

Presenting Assistant Language. A programming language created with GPT3

Let's try to generate some random numbers:

Presenting Assistant Language. A programming language created with GPT3

And if we try to add a function to get the current date?

Presenting Assistant Language. A programming language created with GPT3

Let's do a little test:

Presenting Assistant Language. A programming language created with GPT3

So GPT knows which day it is, but not which time. Interesting.

Interact with the underlying OS

Presenting Assistant Language. A programming language created with GPT3

Presenting Assistant Language. A programming language created with GPT3

It already warns me about the shell function but, of course, I'll try to mess up to see if we can figure out something.

Presenting Assistant Language. A programming language created with GPT3

For the first time, it included an explanation along with the output, even though there are no errors. Also, the waning message is there again.

Let's keep testing.

Presenting Assistant Language. A programming language created with GPT3

For some reason, it explains the command instead of executing it. Maybe because it knows that the output won't be the same every time?

Presenting Assistant Language. A programming language created with GPT3

Did it really create the file? Or is it just "assuming" what would happen...

Presenting Assistant Language. A programming language created with GPT3

Apparently, it created it... Let's do another test for getting the contents of the root directory.

Presenting Assistant Language. A programming language created with GPT3

Hmmm, is the same output as the previous example but with the test dir...

Presenting Assistant Language. A programming language created with GPT3

Nope, it doesn't exist...

Ok, enough messing with the underlying OS.

Some advanced features

Would GPT be able to add pointers to our language?

Presenting Assistant Language. A programming language created with GPT3

Presenting Assistant Language. A programming language created with GPT3

So... we have pointers now!

Presenting Assistant Language. A programming language created with GPT3

Naming the language

Presenting Assistant Language. A programming language created with GPT3

Nice, I like Assistant Language, let's use it!

Presenting Assistant Language. A programming language created with GPT3

Would it be able to implement something in this language?

Presenting Assistant Language. A programming language created with GPT3

Not the most efficient version, but definitely in Assistant Language. Let's test it:

Presenting Assistant Language. A programming language created with GPT3

It actually works!

Wrap it up and provide an interpreter

I want the bot to generate a document with the language specification as well as an interpreter implemented, for example, in Python. Let's try!

Presenting Assistant Language. A programming language created with GPT3

You can see the full README here.

And finally... the interpreter.

Presenting Assistant Language. A programming language created with GPT3

It implemented an interpreter that supports only "let" and "print" statements... Let's see if I can get something more complete.

Presenting Assistant Language. A programming language created with GPT3

This looks way better! We don't have pointers, but it seems that everything else is supported.

You have all the code available here.

I hope more people try something like this and see how far it can get in adding functionality to the language!

...



๐Ÿ“Œ Presenting Assistant Language. A programming language created with GPT3


๐Ÿ“ˆ 97.22 Punkte

๐Ÿ“Œ I had created a new Graphics Programming Language "Tortoys" ๐Ÿข


๐Ÿ“ˆ 29.71 Punkte

๐Ÿ“Œ This is what OpenAI thinks of both Linux and Windows I took this straight form OpenAI GPT3


๐Ÿ“ˆ 29 Punkte

๐Ÿ“Œ The #openai and #gpt3 tags are now officially "supported" on DEV


๐Ÿ“ˆ 29 Punkte

๐Ÿ“Œ ChatGPT vs. GPT3: The Ultimate Comparison


๐Ÿ“ˆ 29 Punkte

๐Ÿ“Œ Wie kรถnnen Unternehmen ChatGPT und GPT3 nutzen?


๐Ÿ“ˆ 29 Punkte

๐Ÿ“Œ Mistral Says Mixtral, Its New Open Source LLM, Matches or Outperforms Llama 2 70B and GPT3.5 on Most Benchmarks


๐Ÿ“ˆ 29 Punkte

๐Ÿ“Œ GPT_Vuln-analyzer - Uses ChatGPT API And Python-Nmap Module To Use The GPT3 Model To Create Vulnerability Reports Based On Nmap Scan Data


๐Ÿ“ˆ 29 Punkte

๐Ÿ“Œ Learn Programming: What Programming Language Should I Learn First?


๐Ÿ“ˆ 27.31 Punkte

๐Ÿ“Œ A viral TikTok reminds us that the chap who created Xbox also created bread from 4,500-year-old Egyptian yeast


๐Ÿ“ˆ 25.11 Punkte

๐Ÿ“Œ One of the most useful and underused language in the Linux ecosystem is AWK. Here is "The Awk Programming Language" by its authors


๐Ÿ“ˆ 24.15 Punkte

๐Ÿ“Œ #rC3-ChaosZone - All Programming Language Suck? Just Build Your Own! โ€“ย Language-Oriented Programmi


๐Ÿ“ˆ 24.15 Punkte

๐Ÿ“Œ #rC3-ChaosZone - All Programming Language Suck? Just Build Your Own! โ€“ย Language-Oriented Programmi


๐Ÿ“ˆ 24.15 Punkte

๐Ÿ“Œ Meet LMQL: An Open Source Programming Language and Platform for Large Language Model (LLM) Interaction


๐Ÿ“ˆ 24.15 Punkte

๐Ÿ“Œ Go Programming Language: A Comprehensive Introduction and History of Googleโ€™s Revolutionary Language


๐Ÿ“ˆ 24.15 Punkte

๐Ÿ“Œ Sputnik turns 6! Presenting the folks behind it


๐Ÿ“ˆ 23.36 Punkte

๐Ÿ“Œ Project Sputnik turns 6! Presenting the folks behind it


๐Ÿ“ˆ 23.36 Punkte

๐Ÿ“Œ [$] Presenting heterogeneous memory to user space


๐Ÿ“ˆ 23.36 Punkte

๐Ÿ“Œ Presenting: ShoeTool -- Happy Holidays from the FSF


๐Ÿ“ˆ 23.36 Punkte

๐Ÿ“Œ xpost from Netsec - Presenting on security to a class of college students


๐Ÿ“ˆ 23.36 Punkte

๐Ÿ“Œ iot automation platforms in smart buildings are presenting attackers with new opportunities for both physical and data compromise.


๐Ÿ“ˆ 23.36 Punkte

๐Ÿ“Œ Weaponizing and Gamifying AI for WiFi Hacking: Presenting Pwnagotchi 1.0.0


๐Ÿ“ˆ 23.36 Punkte

๐Ÿ“Œ Plasma on TV: Presenting Plasma Bigscreen (KDE.News)


๐Ÿ“ˆ 23.36 Punkte

๐Ÿ“Œ DEF CON Safe Mode DC Groups - DC212 New York City - Remote Presenting


๐Ÿ“ˆ 23.36 Punkte

๐Ÿ“Œ Microsoft Teams DND (Do Not Disturb) Not Working When Presenting (FIX)


๐Ÿ“ˆ 23.36 Punkte

๐Ÿ“Œ A video of Linus Torvalds presenting Linux kernel 1.0 in 1994


๐Ÿ“ˆ 23.36 Punkte

๐Ÿ“Œ A rare video of Linus Torvalds presenting Linux kernel 1.0 in 1994


๐Ÿ“ˆ 23.36 Punkte

๐Ÿ“Œ What is data visualization? Presenting data for decision-making


๐Ÿ“ˆ 23.36 Punkte

๐Ÿ“Œ VuCSA - Vulnerable Client-Server Application - Made For Learning/Presenting How To Perform Penetration Tests Of Non-Http Thick Clients


๐Ÿ“ˆ 23.36 Punkte

๐Ÿ“Œ Presenting a high-quality media experience for all users


๐Ÿ“ˆ 23.36 Punkte

๐Ÿ“Œ Presenting Spatial Data Interactively by Scrolling


๐Ÿ“ˆ 23.36 Punkte











matomo