Skip to content

Commit

Permalink
Merge branch 'master' into patch-2
Browse files Browse the repository at this point in the history
  • Loading branch information
jennifertrin authored Jan 16, 2024
2 parents ec39a4a + 67c4df3 commit 5520224
Show file tree
Hide file tree
Showing 111 changed files with 3,084 additions and 774 deletions.
52 changes: 52 additions & 0 deletions blog/news-and-updates/2024-01-03-update.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
title: Developer weekly update January 3, 2024
description: To kick off the year, let's explore some of the upcoming features and tools that developers can look forward to in 2024!
tags: [Devs]
image: /img/blog/dev-update-blog-jan-3.jpg
---

# Developer weekly update January 3, 2024

![January 3 2024](../../static/img/blog/dev-update-blog-jan-3.jpg)

Hello developers and happy New Year! To kick off the year, let's explore some of the upcoming features and tools that developers can look forward to in 2024!

## `dfx new` updates

`dfx new` is a core command used by developers to create new projects. By default, it uses a 'Hello, world!' template. Currently, this command doesn't support the ability to choose a different project template, CDK, or frontend framework. To offer a richer workflow for bootstrapping new projects, the `dfx new` command will be updated and reworked to enhance the developer experience. Part of this update will include the ability to choose between different project templates, languages, and frontend frameworks when creating a new project.

## Version manager for dfx

When developers want to use different versions of dfx, the current workflow to switch between them can be tedious and time consuming. To make this process easier, a new dfx version manager tool is currently under development. The tool, known as `dfxvm`, will provide developers the ability to install and manage different versions of dfx seamlessly. It will also pave the way for supporting package manager installations of dfx in the future.

## Cycles ledger

To enhance and improve cycles management across projects, the upcoming cycles ledger will replace the current cycles wallet workflow. The current cycles wallet workflow is a common pain point for new developers, since it requires significant prerequisite knowledge to be used effectively. Once the cycles ledger has been released, dfx will use this new cycles ledger to simplify the cycles management workflow for developers deploying their dapps to the mainnet. The cycles wallet will still be maintained and available for developers to use if they prefer.

## Canister logging

An important enhancement for canister debugging is on the way: logging for canisters deployed on the mainnet. This logging feature will support storing and retrieving logs to get detailed insights into the behavior of a project's canisters. Logging will support both canister and replica level information depending on the preferred detail level.

## Streaming support

To support video hosting and streaming dapps, the asset canister will soon support streaming through content-range requests. For example, this support will include the ability for the HTML `<video>` tag to be used and the ability to seek or scrub the video playback. This will help pave the way for more types of applications to be deployed on ICP.

## Rust developer journey tutorial series

To further build upon the ICP [developer journey tutorial series](/docs/current/tutorials/developer-journey/), a new variation will be released this year in 2024 that focuses on Rust development rather than Motoko development. A Rust version has been highly requested by the ICP developer community, and we're excited to provide more resources for Rust development on ICP.

## Documentation additions

In addition to a Rust variation of the developer journey, there are several other additions planned for the developer documentation, such as:

- Quick start guides for Python, TypeScript, C++, Solidity, and other languages to help onboard developers of all backgrounds.

- Guides for Ethereum development on ICP, showcasing the upcoming EVM RPC canister and Ethereum integration.

- Updates and additions to the Motoko documentation.

- New tutorials, guides, and code examples.

We hope you're all as excited for this year as we are! That'll wrap up this week's developer weekly update, be sure to tune in next week!

-DFINITY
50 changes: 50 additions & 0 deletions blog/news-and-updates/2024-01-10-update.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
title: Developer weekly update January 10, 2024
description: This week, we have an exciting new release of Motoko, some news regarding increasing canister smart contract memory, and a call for community input!
tags: [Devs]
image: /img/blog/dev-update-blog-jan-10.jpg
---

# Developer weekly update January 10, 2024

![January 10 2024](../../static/img/blog/dev-update-blog-jan-10.jpg)

Hello developers, and welcome to this week's developer weekly update! This week, we have an exciting new release of Motoko, some news regarding increasing canister smart contract memory, and a call for community input! Let's get started.

## Motoko v0.10.4

This week, Motoko `v0.10.4` has been released! The release notes for this version are short, but for good reason: this Motoko update officializes the new incremental garbage collector after a successful beta testing phase! That's right, the incremental GC has officially been flagged for release outside of beta, meaning it is now regarded as safe for use in production. Some important notes about using the new incremental GC:

- Thoroughly test the upgrade: Be sure to take adequate measures to verify that the amount of stable data is supported when upgrading your canister. Utilize different data volumes and heap sizes to conservatively determine the amount of stable data supported by your program.

- Monitor the heap size: Be sure to monitor memory size and heap size of your code in production.

- Avoid large allocations per message: Avoid allocations of 100 MB or more per message, as they extend the duration of the GC's increment. Instead, distribute large allocations across multiple messages.

- Limit the heap size: Set a custom limit within your program to keep the heap size and data volume below the scalability limit that you determined during testing.

To review the full list of recommendations along with the full release details, see the Motoko release notes [here](https://github.com/dfinity/motoko/releases/tag/0.10.4).

## Increased canister smart contract memory

The DFINITY engineering team has announced that testing of canister stable memory has been successful for 400 GB of memory! There are plans to propose in an upcoming replica version to increase the stable memory limit from 96 GB to 400 GB.

You can read more or contribute your thoughts in the forum post [here](https://forum.dfinity.org/t/increased-canister-smart-contract-memory/6148/173).

## Request for community input: short videos!

Have a developer question that you'd like a short video explanation of? Kai from the SDK team is taking suggestions on questions to answer in a short-form video format. Ideally, the question can be answered in a short 60-second explanation, helping developers get quick, visual answers to some of their questions. Some examples are:

- "Should I use Motoko or Rust?"

- "How do I create an Internet Identity?"

- "What are threshold signatures?"

You can find an example [here](https://www.youtube.com/shorts/_AKZwwG6Z_k), that answers the question, "How do you make sure a Principal is not anonymous? How would you execute this using II?"

You can leave your questions in the forum post [here](https://forum.dfinity.org/t/video-short-suggestions/26368).

That'll wrap up this week. Tune back in next week for more developer updates!

-DFINITY
60 changes: 60 additions & 0 deletions blog/news-and-updates/team-spotlight-devrel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
title: Team spotlight - Developer relations
description: In this final interview, we sat down with the developer relations team, also known as the DevRel team, to learn more about their role in the ICP community.
tags: [Team spotlight]
image: /img/blog/dev-update-blog-devrel.jpg
---

![Developer relations team spotlight](../../static/img/blog/dev-update-blog-devrel.jpg)

Hello developers and welcome to the final installment of the Dev Blog's team spotlight series! In this final interview, we sat down with the developer relations team, also known as the DevRel team, to learn more about their role in the ICP community.

**To kick things off, what is the purpose of the DevRel team?**

*DevRel is the abbreviation for Developer Relations. Our main goal is to nourish and grow a flourishing developer ecosystem.*

**What is the composition of the DevRel team?**

*We are a team of four engineers. Two of us are in Switzerland, one in Germany, and one in the US West Coast. We are part of the Growth team, and many activities are done in collaboration with the broader Growth team.*

**The goal of nourishing and growing the ICP ecosystem must include several different activities and tasks. More specifically, what is the DevRel team responsible for? How does it interact with the ICP developers and community?**

*We are at the pulse of the developer community, and this has many facets. Our goal is to attract new promising developers and teams to ICP, understand their needs and pain points, and help them build and be successful.*

*A main vehicle to support developers in the initial stages is the DFINITY Developer Grants program, which allows us to provide some financial support, but more importantly regular touch points with the teams to help them build and grow.*

*We are active on many communication platforms like the ICP Developer Discord and the DFINITY Forum, but also on (crypto) X, as well as OpenChat or new platforms like Farcaster. We run weekly Office Hours on Discord, are coordinating Technical Working Groups, organize Hackathons and Workshops, and create and aggregate resources for developers.*

**While interacting with the community in so many different ways, what are some of the challenges that the team faces?**

*The Internet Computer is a general purpose and powerful computing platform. Hence, the ecosystem and applications are wide ranging with many different needs and requirements.*

*Furthermore, the Internet Computer becomes ever more powerful as we are always adding new capabilities on top of it. This [past] year, e.g., the SNS, vetKeys (Phase 1) and ckETH was launched. Each of these capabilities are essentially products on their own, and we need to understand them well to help teams use them effectively.*

*These challenges are very exciting and fun but still, well, challenging. :)*

**What is something important about developing on ICP that new developers should know?**

*The Internet Computer is a powerful but very nascent computing platform. New developers often come with a specific frame of reference to the IC. Either they are coming from a blockchain platform like Ethereum or they come from a traditional web development background. So, don’t get frustrated too early, it’s definitely worth it.*

**You've mentioned that one responsibility of the DevRel team is to aggregate resources for developers. What are some of those resources that are available for the ICP community?**

*The main landing page for developers is [https://docs.internetcomputer.org/](https://docs.internetcomputer.org/) which is the entry point to our developer documentation. In addition, we curate developer resources at [Awesome Internet Computer](https://github.com/dfinity/awesome-internet-computer), and with the [ICP Hackathon Cheatsheet](https://dfinityorg.notion.site/ICP-Hackathon-Cheat-Sheet-b2921239266149de81021412f572351c). Furthermore, we are currently working on an aggregation of all educational resources available in the ICP ecosystem, which should go live in January 2024.*

**How does the DevRel team work with other teams?**

*We work closely with the Product and R&D teams to help them understand and prioritize the pain points and requirements of the developer ecosystem. We collaborate with the Marketing & Global Adoption team on events and the creation of educational resources, and support the Partnerships team with the technical onboarding of new partners.*

**What primary project is the DevRel team currently working on?**

*We are working on a revamp of the Developer Grants program. First, we want to increase transparency and community involvement. Therefore, we start with making the grant proposals for micro grants (USD 5k) public in the Developer Forum, and invite experienced community members to contribute reviews of the proposals. Furthermore, we will put more emphasis on targeted Requests for Proposals (RFPs) and Bounties to focus the grants program in the most promising directions.*

**Developers can learn more about the DFINITY Developer Grants program [here](https://dfinity.org/grants).**

**To wrap things up, what makes the DevRel team unique compared to some of the other teams at DFINITY?**

*We strive to be advocates for the community more than we are DFINITY employees.*

As this blog series comes to a close, we hope you've enjoyed learning more about each team and what projects they've been working on! In a new, upcoming series, we'll interview individuals rather than entire teams to learn more about their role on ICP and the hand that they play in current and upcoming features, tools, research, and development. Be sure to stay tuned for that series!

-DFINITY
4 changes: 3 additions & 1 deletion docs/concepts/what-is-ic.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ The Internet Computer also enables developers to use [cryptographically-secure i

- [Developer tooling working group](https://www.google.com/calendar/event?eid=MHY0cjBubmlnYXY1cTkzZzVzcmozb3ZjZm5fMjAyMzEwMDVUMTcwMDAwWiBjX2Nnb2VxOTE3cnBlYXA3dnNlM2lzMWhsMzEwQGc&ctz=Europe/Zurich).

- [Motoko bootcamp](https://github.com/motoko-bootcamp/bootcamp-2022), a week-long crash course to learning all things Motoko.
- [Motoko Bootcamp - The DAO Adventure](https://github.com/motoko-bootcamp/dao-adventure) - Discover the Motoko language in this 7 day adventure and learn to build a DAO on the Internet Computer.

- [Motoko Bootcamp - Discord community](https://discord.gg/YbksCUxdzk) - A community for and by Motoko developers to ask for advice, showcase projects and participate in collaborative events.

- [Motoko developer working group](https://www.google.com/calendar/event?eid=ZWVnb2luaHU0ZjduMTNpZHI3MWJkcWVwNWdfMjAyMzEwMTJUMTUwMDAwWiBjX2Nnb2VxOTE3cnBlYXA3dnNlM2lzMWhsMzEwQGc&ctz=Europe/Zurich).

Expand Down
40 changes: 8 additions & 32 deletions docs/developer-docs/frontend/custom-frontend.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,19 +170,7 @@ To prepare the frontend files:

- #### Step 1: Open the webpack configuration file (`webpack.config.js`) in a text editor.

- #### Step 2: Modify the frontend entry to replace the default `index.html` with `index.jsx`.

:::caution
The following example is a **code snippet** that is part of a larger code file. This snippet may return an error if run on its own.
:::

entry: {
// The frontend.entrypoint points to the HTML file for this build, so you need
// to replace the extension to `.js`.
index: path.join(__dirname, asset_entry).replace(/\.html$/, ".jsx"),
},

- #### Step 3: Add the following `module` key above the `plugins` section:
- #### Step 2: Add the following `module` key above the `plugins` section:

:::caution
The following example is a **code snippet** that is part of a larger code file. This snippet may return an error if run on its own.
Expand Down Expand Up @@ -301,9 +289,9 @@ module.exports = {
};
```

- #### Step 4: Create a new file named `tsconfig.json` in the root directory for your project.
- #### Step 3: Create a new file named `tsconfig.json` in the root directory for your project.

- #### Step 5: Open the `tsconfig.json` file in a text editor, then copy and paste this code into the file:
- #### Step 4: Open the `tsconfig.json` file in a text editor, then copy and paste this code into the file:

```
{
Expand All @@ -317,11 +305,11 @@ module.exports = {
}
```

- #### Step 6: Save your changes and close the `tsconfig.json` file to continue.
- #### Step 5: Save your changes and close the `tsconfig.json` file to continue.

- #### Step 7: Open the default `src/custom_greeting_frontend/src/index.js` file in a text editor and delete everything in that file.
- #### Step 6: Open the default `src/custom_greeting_frontend/src/index.js` file in a text editor and delete everything in that file.

- #### Step 8: Copy and paste this code into the `index.js` file.
- #### Step 7: Copy and paste this code into the `index.js` file.

```
import * as React from "react";
Expand Down Expand Up @@ -366,24 +354,12 @@ const MyHello = () => {
render(<MyHello />, document.getElementById("app"));
```

- #### Step 9: Rename the modified `index.js` file as `index.jsx` by running the following command:
- #### Step 8: Rename the modified `index.js` file as `index.jsx` by running the following command:

mv src/custom_greeting_frontend/src/index.js src/custom_greeting_frontend/src/index.jsx


- #### Step 10: Change the entry point in `webpack.config.js` to the following:

:::caution
The following example is a **code snippet** that is part of a larger code file. This snippet may return an error if run on its own.
:::

entry: {
// The frontend.entrypoint points to the HTML file for this build, so you need
// to replace the extension to `.js`.
index: path.join(__dirname, frontend_entry).replace(/\.html$/, ".jsx"),
},

- #### Step 11: Open the default `src/custom_greeting_frontend/src/index.html` file in a text editor, then replace the body contents with the following:
- #### Step 9: Open the default `src/custom_greeting_frontend/src/index.html` file in a text editor, then replace the body contents with the following:

<!doctype html>
<html lang="en">
Expand Down
6 changes: 3 additions & 3 deletions docs/developer-docs/frontend/existing-frontend.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ In the top-level directory of your repository, at the source of add a `dfx.json`
},
"source": ["out"],
"type": "assets"
},
"output_env_file": ".env"
}
}
},
"output_env_file": ".env"
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ If you need to get your wallet canister ID, you can run the `dfx wallet addresse
Then, you can send a request, such as one to get the BTC/USD rate, with the following command:

```
dfx canister call --wallet $WALLET --with-cycles 10000000000 xrc get_exchange_rate '(record { base_asset = record { symbol = "BTC"; class = variant { Cryptocurrency } }; quote_asset = record { symbol = "USD"; class = variant { FiatCurrency } } })'
dfx canister call --wallet $WALLET --with-cycles 10000000000 uf6dk-hyaaa-aaaaq-qaaaq-cai get_exchange_rate '(record { base_asset = record { symbol = "BTC"; class = variant { Cryptocurrency } }; quote_asset = record { symbol = "USD"; class = variant { FiatCurrency } } })'
```

## Exchange rate canister demo
Expand Down
Loading

0 comments on commit 5520224

Please sign in to comment.