Can't get started / Why should I?

Maybe this is why the coin tanked. It sounds like a cool idea, the website talks about the front-end full-stack arm-and-a-leg fees type lechery that exists on the web right now, but can’t link to a tutorial about how to use this thing if you’re a beginner. Most people are not blockchain developers. The appeal to internet computer diminished abruptly upon discovering that I would need to learn more programing languages and interfaces to just put my .html files on the internet computer. Furthermore, why the KYC? Do I need tokens to put stuff online? Does my identity have to be linked to those tokens?

Struggling to understand the whole thing. Please make developing and learning easier for shitwits like myself. Thank you.

1 Like

Hey there, Guest!

I’m on the Developer Experience team, and you’re exactly the sort of user that I feel most responsible for. Some great new docs are on the way, but let me try to get you what you need to get started.

Serving my html files
Our official docs for this are here: Introducing a new approach to handling HTTP requests and serving assets :: Internet Computer
I’ve also written a blog post on getting started from a frontend perspective that I personally think is pretty good: https://kyle-peacock.com/blog/dfinity/static-site-generators-ic
Video version of the blog post from the Genesis event: Demo | Zero to Fullstack: Web Apps on the Internet Computer (Kyle Peacock) - YouTube

Why KYC
That’s out of my domain, sorry

Do I need tokens
Canisters run on cycles that are loaded up front, kind of like an AWS account. Your service stays up as long as you pay for it, or if you build in mechanisms that can fund itself based on transaction fees, tips, or some other mechanism you come up with

Does my identity need to be linked to those tokens
The Internet Identity is one tool we are providing to make authentication simpler on the Internet Computer, but it is certainly not the only one. We offer canister creation from ICP using the NNS app, or from Cycles using the Cycles Wallet we’ve developed, but the ecosystem is still developing, and we have built the API’s to be open, so that new services can compete with what the Dfinity org puts out on UX, convenience, or design philosophy.

Why should I use this?
This is a subjective question, but here’s my take - this ecosystem is accelerating in a way that I find incredibly exciting. We’re starting with the building blocks of a platform, but we’re already reaching the point where full-stack identity can be instrumented with a dozen lines of code, like in my auth-client demo. There are some pains with being an early adopter, but the rate at which I see things come together make the growing pains worth it for me.

Also, even if it’s not worth it for you today, we’ll keep working to make the Internet Computer more convenient, well-documented, and simple until it makes sense for you and millions of other developers to make the switch due to pragmatism, without any need for optimism

Best,
Kyle

9 Likes

Kyle,
If you expect to gain the support of the developer community for this language, it seems like Dfinity is going to have tor harder generating support materials that help somebody new to the platform do useful work, quickly. Right now the documentation is very thin, and the support is not so great either.

My experience so far:

Quickstart doesn’t work as its supposed to (see my other post – the cannister compiles and loads, but the webpage doesn’t);

When you go looking for help and join the forum, the post button is mysteriously just missing, with no indication that you need to go through the little exercise with the bot before you can post I guess;

The language reference is too skimpy and brief to be of use. Hard to figure out even basic stguff, like "how do you concatenate two strings together? Or how do you convert a nat to a string?

Just for example, I tried
actor {
public func greet(name : Text) : async Text {
return "Hello, " # name # “!”;
};
public func add(a : Nat, b : Nat) : async Text {
return “The sum is” # (a + b);
};
};

It took me quite while to find the concatenation operator (why #?), and still haven’t been able how to convert a Nat into a string. If you’re going to invent a brand new language, it just seems to me you have to put a bit more effort in the documentation so people can figure out how do the basic things without have to read the whole thing cover to cover – and even then there’s a lot that’s left out. Most of the time I depend on the stack overflow community to help out when the samples or documentation dont answer the some of these questions, its feels like to actually try to build something is going to be really painful.

2 Likes

Cross linking this:

Great tutorial, thanks.

Could you do an update/follow-up on how deployment works now after genesis happend?

Note from the tutorial:

after Genesis, you will have to set up and fund your canister before you’ll be able to deploy

Who do you think you are, [name redacted] from comms?

Don’t worry, the Developer Experience team working on a proper guide. In short –

Wallet is funded for me

If your principal has been added, all you need to do is run:

dfx identity set-wallet {wallet id}
dfx deploy --network ic

If you are starting from the NNS App

  • Create and fund your canister using UI
  • Set your dfx principal as a controller
  • From CLI:
dfx identity deploy-wallet {empty canister id}
dfx identity set-wallet {newly created wallet id}
dfx deploy --network ic

There’s more to flesh out, but this is basically what you can expect!

1 Like

Cool, thanks a lot - looking forward to the guide as I am still confused with the terms principal, controller etc.

Principal refers to the long hyphenated strings that you see in URLs before ic0.app. They generally represent canisters, your development machine, or an Internet Identity, and can be used interchangeably as some way to consistently refer to an entity on the IC.

A controller is just a Principal that a smart contract recognizes has special permissions. A generic person might be able to visit the landing page for a Cycles Wallet, but they have to be authenticated as a controller to check the balance, send cycles, etc

3 Likes

Kyle, I am struggling with deciphering your instructions. I created a canister on NNS and funded it. I also added my developer id as a controller. Then @ dfx prompt, I don’t understand your commands: ```
dfx identity deploy-wallet {empty canister id} followed by dfx identity set-wallet {newly created wallet id}. What does {empty canister id} mean? We really REALLY need more documentation on how to utilize all the commands and options in dfx. At present it is almost impossible. Also, there are a growing family of examples/tutorials that have completely different command flows for deploying locally versus live, and even major diffs of the examples of deploying static websites. Do we really need to npm install, dfx deploy, npm start just for a static site? One example says yes, another didn’t mention them. I’m lost, and not sure where to find answers. Everything is spew, and nothing is easy to follow.

Sorry you’re struggling with the docs - it’s a wide surface area and I and a number of us are gradually working on improvements right now. Let’s see what I can help with here -

  • Empty canister id
    When you create a canister using the NNS app or the ledger, it is considered empty - it doesn’t have wasm code to run, or existing state. in context, it means the id of the canister you just created.

  • Deploying locally used to be identical to deploying live on the Sodium beta network, apart from the --network ic flag. We’ve tried to update all the docs to consistently explain the current process, but the process needed to change once Canisters required funding.

  • Strictly speaking, npm is not required to deploy a truly static site. If you wrote simple HTML, JavaScript, and CSS, an asset canister could host it without requiring a build job. npm is necessary if you intend to use our @dfinity/agent package to talk to an IC Canister, however, or to use modern frontend frameworks.

I recommend following these guides for frontend development:

https://sdk.dfinity.org/docs/quickstart/local-quickstart.html
https://sdk.dfinity.org/docs/developers-guide/webpack-config.html
https://sdk.dfinity.org/docs/developers-guide/tutorials/my-contacts.html

Technical writing is still a newer skill for me, so I also recommend reading posts on my blog for some of my free-er form writing where I’m a little more conversational

2 Likes