OpenAi is Great But Does It Know How To Code a Dapp On Hive? Of Course It Does...

in LeoFinancelast year (edited)

I would go as far as making a bet that it provides better explanations and contains more knowledge about Hive than 90% of Hive users which would include me as well ofc... I'll try to make this short as possible so let's dive right into it.

606131a8c5a14576bfa39206f8c6596e.jpg

How Good Is It?

If you haven't seen me around these days it was because I was miles deep into the AI rabbit hole. GPT3 is so good that it can't even be put into words but the good part is that you won't be losing your job.

You can write code if you have no coding experience but if you don't know the entire structure including the backend of a complex website you have very slim chances of creating one using AI. BUT, if you spend some time asking it to teach you all of these things...

It also won't write your content for you, that just doesn't work. The tone is very robot-like and a lot of times it will use the same phrases over and over again. BUT, just like with coding, if you start giving it some inputs that require it to change the tone, structure, level of detail... It can create a kickass article but you will probably need to type in more words than what you would spend on writing it.

All in all, it is a great assistant. If you could hire someone that can do the same things as OpenAI you would do it in an instant. All of the small things that you don't like doing can just be outsourced to the AI. It's so good you can just copy and paste article revision requests from your clients and it will do an amazing job at applying exactly what they asked for. Don't just take my word for it, give it a try while it is free and see for yourself.

What we are really here for is Hive. And boy are you in for a treat...

Ai on Hive?

The following is a transcript of my conversation with the AI about Hive. At first, it was acting like it can't access the internet and knows nothing about Hive but if you know how to lead it in the right direction it starts doing some magical stuff. I'll cut out that part to make the transcript as short as possible.

Input: Is Hive dpos?

Output: Hive is a blockchain and cryptocurrency that was created as a fork of the Steem blockchain. Hive uses a variant of the Delegated proof of stake (DPoS) consensus mechanism to achieve distributed consensus and secure its network. In Hive's DPoS system, token holders can vote for "witnesses" who are responsible for maintaining the blockchain and producing new blocks. The top 20 witnesses by vote are chosen to produce blocks and earn rewards. This allows Hive to achieve high transaction speeds and low fees, while also giving token holders a say in the direction of the network.

Input: Why was there a fork from Steemit?

Output: In March 2020, the Steemit blockchain underwent a contentious hard fork due to a disagreement between the Steemit team and the Steem community over the direction of the project. The hard fork resulted in the creation of two separate blockchain and cryptocurrency networks: Steem and Hive.

The specific details of the disagreement are complex and varied, but at a high level, the Steemit team and the Steem community had differing opinions on how to best govern the Steemit platform and its associated cryptocurrency. The Steemit team wanted to centralize control over the platform, while the Steem community wanted to maintain a decentralized approach. Ultimately, the hard fork was seen as a way to allow each side to pursue its own vision for the future of the project.

Input: Was Justing Sun involved in this?

Output: It is not clear whether Justin Sun, the founder of the TRON Foundation and CEO of BitTorrent, was directly involved in the hard fork of the Steemit blockchain. In the months leading up to the hard fork, however, Sun and the TRON Foundation did play a significant role in the broader controversy surrounding Steemit.

In February 2020, Sun and the TRON Foundation acquired a controlling stake in Steemit Inc., the company behind the Steemit platform. This sparked backlash from some members of the Steem community, who were concerned about the potential centralization of the Steemit platform and the possible impact on its decentralized nature.

In the weeks leading up to the hard fork, Sun and the TRON Foundation took actions that were seen as attempts to consolidate their control over the Steemit platform, which further fueled the disagreement and ultimately led to the hard fork. It is not clear, however, whether Sun was directly involved in the decision to fork the Steemit blockchain.

Input: Is Hive only used for blogging?

Output: Hive is a blockchain and cryptocurrency that was created as a fork of the Steemit blockchain. While Steemit was initially created as a blogging and social media platform, Hive is not exclusively used for blogging and has a broader range of potential use cases.

Hive is a decentralized platform that allows users to create and curate content, earn rewards, and interact with one another. In this sense, Hive is similar to Steemit and other social media platforms, and it can be used for blogging and other forms of online publishing. However, Hive is also a blockchain platform with a built-in programming language, which allows developers to create decentralized applications (dApps) on top of the Hive network. This opens up a wide range of potential use cases beyond just blogging, including games, marketplaces, and other types of applications.

Input: What language is used to develop dapps on Hive?

Output: Hive is a blockchain platform that uses a programming language called HiveSQL to allow developers to create decentralized applications (dApps) on top of the Hive network. HiveSQL is a variant of the SQL (Structured Query Language) language, which is a widely-used and well-known programming language for working with databases. HiveSQL is designed to be easy to use and understand for developers who are familiar with SQL, and it allows developers to create and interact with data stored on the Hive blockchain in a similar way to how SQL is used with traditional databases.

In addition to HiveSQL, Hive also supports other programming languages and tools that can be used to develop dApps. For example, developers can use the Hive API to interact with the Hive blockchain from other programming languages, and they can use the Hive Keychain to manage their keys and sign transactions securely. This allows for a high degree of flexibility and creativity when it comes to developing dApps on the Hive platform.

Are you ready for it?

Input: Write a sample of this HiveSQL code

Output: HiveCode.jpg

Input: If I wanted to deploy this code on the Hive blockchain how would I do it?

Output: To deploy this code on the Hive blockchain, you would first need to set up a Hive account and obtain some Hive tokens, which are used to pay for transaction fees on the Hive network. You can then use a Hive wallet or other Hive-compatible tool to access your account and interact with the Hive blockchain.

Once you have set up your Hive account, you can use the HiveSQL language to write and deploy your code on the Hive blockchain. HiveSQL is a programming language that is specifically designed for working with the Hive blockchain, and it provides a set of commands and functions that allow you to create and interact with data stored on the Hive blockchain.

To deploy the code example provided earlier, you would first need to create a HiveSQL script that contains the code. You could then use the hive command in your Hive wallet or other tool to execute the script and deploy it on the Hive blockchain. This would create the "users" table on the Hive blockchain, insert the data into the table, and query the table to show the data that was inserted.

Note that this is just a very basic example, and there are many other ways in which you can use HiveSQL and the Hive blockchain to create and deploy more complex and sophisticated applications. You can learn more about HiveSQL and how to use it by reading the HiveSQL documentation and exploring the Hive community forums and resources.

At this point, I had to push things further and they just got crazier by the minute. Btw if you know if this code works or not please let me know in the comments below!

Code1.jpg

Code2.jpg

This code creates a table called "swaps" that will be used to track swap transactions, and it defines a function called "swap_hive_hbd" that can be used to perform the actual swap. The function takes the user's ID and the amount of Hive that they want to swap as input, and it uses the current HBD/Hive exchange rate to calculate the amount of HBD that the user will receive in the swap. The function then updates the user's account to reflect the swap, and it inserts a record into the "swaps" table to track the transaction.

To use this function, you would call it with the appropriate user ID and Hive amount as arguments. For example, you could call swap_hive_hbd(123, 10) to perform a swap for user 123 where 10 Hive are swapped for HBD. The function would then return the amount of HBD that was received in the swap, or 0 if the user does not have enough Hive to perform the swap.

DiveCode2.jpg

After a few tweaks, I told it to clean up the page a bit and add a button that would connect your keychain wallet. Of course, it knew exactly what Keychain is.

swap codd.jpg

Put all that together and you get this.

Swap HTML.jpg

I could go on and on with changing the colors, background, adding images, and anything else that comes to mind but the main point is this - If you can think it the AI can do it and it will keep explaining it to you while doing it. You will never need an online course again because this is like a 100x improvement.

My Mind Is Still Blown

I'm still overwhelmed by the notion that there is virtually no limit to this thing. People are too scared that this will take their jobs but they don't realize that their job is done and a new one begins. All of the content you ever created went into training this thing and now it is paying dividends.

Why write articles when you can write code?

Why rant about a dapp when you can make a better one and let the AI do the explaining why that other one sucks?

Why criticize anything when you can just make a better version of it?

The best way to describe GPT3 is in the form of a machine that can mold your ideas into different shapes and forms on demand. Anything that can be expressed in textual form can now be modified in any way you want and for GPT4 they announced text-to-video features if I'm not mistaken. With this thing you can rewrite movies and create your own versions in a matter of hours.

Just think of the possibilities...

Final comments:

The OpenAI chat bot is free but is outdated. It goes back to 2021 and has no recent data so if any changes happened during that time regarding code or some real-world events it will not know. However, the up-to-date version is also free if you create an account with OpenAi. It requires an Email and Phone number. This gives you access to Dalle2, the image generator and $18 of free credits on the up-to-date AI bot.

For the conversation above I used the free version.

Btw, if you don't mind giving away your phone number and personal data (if you share any in the conversation with the bots) I added a link above but here it is again in case you need it.

Posted Using LeoFinance Beta

Sort:  

Hivesql is not a language.

It is a projecto from @arcange that translates all Hive block to a database and this way Anyone with SQL skills cann access it and do some queria

Posted Using LeoFinance Beta

Well, that's a bummer. Does anything that the AI wrote make any sense then? The front-end stuff seemed OK but I had no way to test the supposed HiveSQL code...

Posted Using LeoFinance Beta

I really think that supposed Dapp using Hivesql will not work since is only writing things ina database without talk with blockchain.

That can be an example if you want a transaction copy in a centralized database but it is missing code to connect and talk with blockchain

Dear @jerrythefarmer,
May I ask you to review and support the new HiveSQL Proposal so we can keep it free to use for the community?
You can do it on Peakd, ecency,

Hive.blog / https://wallet.hive.blog/proposals
or using HiveSigner

Thank you!

Oh my goodness, I had read about it creating songs and such. But code…

It does make sense though, as code is text and there is plenty of opensource code to find on the internet

Just a couple days ago I heard in an interview with Raoul Pal and E. Mostaq, Link below, that they have created an AI app that works without internet and teaches illiterate kids in a Malawi refugee camp to read and calculate in 13 month’s without a teacher.

The AI learns from the kids and the kids from the AI.

They were now given the tender to teach all children in Malawi…

Think of the changes coming to education… and what the impact is for a country like Malawi when all of a sudden illiteracy is gone. What economic growth can we expect to see in Africa when these kinds of tools become available on a big scale in the next few years?

I think the western countries will be skeptical, will want to protect jobs and therefore miss the first wave. I think some 3rd world countries will see explosive growth.

We surely are at a tipping point. It's great to know it's already been put to good use. After using it for a few days it does seem that it would produce the best results if you ask it questions just like a child would. And considering how curious they can be at that age this speeds things up immensely.

I think the western countries will be skeptical, will want to protect jobs and therefore miss the first wave. I think some 3rd world countries will see explosive growth.

I had the same thought but it seems that whoever ends up being more curious and creative will lead the charge in innovation. Hard to predict the results in such an environment.

Posted Using LeoFinance Beta

That’s very true indeed. And it will be very important to be curious and innovative when this technology starts to get mainstream

Did you check if the code works? I think it looks nice but I am not sure if it would work. I saw a post from edicted and it looks like some of the stuff it put out didn't work.

Posted Using LeoFinance Beta

Some say that it does some that it doesn't. I still have no idea how I would check that but I am planning to give it one more go over the weekend and try to come up with something super simple that would actually work.

Posted Using LeoFinance Beta

this is so sick dude

Posted Using LeoFinance Beta

Insanity is the only term I can think of for this thing.

Posted Using LeoFinance Beta

did we just become Hive devs? lol

Posted Using LeoFinance Beta

I'll let you know next week. Planning to try and put something together over the weekend. People are overloading the AI all the time. It takes a few mins for almost every output so gonna wait it out a bit.

If I can get something super simple to work we are good to go.

Posted Using LeoFinance Beta

can't wait to see!

Posted Using LeoFinance Beta

Beyond impressive. And now imagine Google said that their LAmba bot is way more developed than the GPT3 one! But they are hiding it from the public, because it would interfere too much with their business model!
You have to read this interview: https://www.wired.com/story/blake-lemoine-google-lamda-ai-bigotry/

GPT3 got some significant downgrades since launch but it's still very impressive. I tried creating a functional swap over the weekend using only GPT3 but it was unable to perform even half the tasks it could when I was writing this article...

Will check out the interview for sure. Can't wait to see what Google has in store. These things will only get crazier with time.

Posted Using LeoFinance Beta

The real no-code tool xD

Posted Using LeoFinance Beta

And they say the next version is coming out by February. 2023 gonna be insane.

Posted Using LeoFinance Beta

Okay. I am ready for it. Bring it on ser. xD

Posted Using LeoFinance Beta


The rewards earned on this comment will go directly to the people sharing the post on Twitter as long as they are registered with @poshtoken. Sign up at https://hiveposh.com.

Thanks for your contribution to the STEMsocial community. Feel free to join us on discord to get to know the rest of us!

Please consider delegating to the @stemsocial account (85% of the curation rewards are returned).

You may also include @stemsocial as a beneficiary of the rewards of this post to get a stronger support. 
 

Dear @jerrythefarmer,
Your support for the current HiveBuzz proposal (#199) is much appreciated but the proposal will expire soon!
May we ask you to review and support the new proposal so our team can continue its work?
You can support the new proposal (#248) on Peakd, Ecency,

Hive.blog / https://wallet.hive.blog/proposals
or using HiveSigner.

Thank you!