Diving into Plang: A Straightforward Guide for Programmers

Ingi - Apr 6 - - Dev Community

Starting with a new programming language always has its set of challenges and excitements. Today, I'm walking you through the early steps of Plang, a language that has a unique approach and natural language syntax. Let's keep the fluff aside and dive into how you can get your hands dirty with Plang.

Getting the Groundwork Done

Before anything, you need Plang on your machine. It's straightforward, regardless of your OS. Check out the Installation Guide, get it set up, and hop back here.

Setting Up Your Workspace

Next up, the IDE. I went with Visual Studio Code, adding the Plang extension to smooth out the journey. For setting this up, the IDE Setup Guide is your go-to resource. It's a breeze, really.

Your First "Hello plang world"

Here's where the rubber meets the road. We're crafting a simple "Hello plang world" app. Keep in mind, coding in Plang incurs a minor cost—about $0.01 to $0.08 per line due to the LLM usage. But it's a price for efficiency. You can trim this down using OpenAI directly, or stick with the Plang service to back the project.

The Steps:

  1. Craft a New Home: Start by making a new folder. Call it HelloWorld. The path is your choice, just keep it accessible.
  2. Begin Your Story: Inside HelloWorld, create a file named Start.goal.
  3. Pen Down Your Code: Here's the magic line.
   Start
   - write out 'Hello plang world'
Enter fullscreen mode Exit fullscreen mode
  1. Seal the Deal: Save your Start.goal.
  2. Bring It to Life: Hit F5 in VS Code or use the terminal with plang exec.

First Run and Costs:

When you run it the first time, you'll be nudged to top up your Plang account. A $5 start is sensible if you're just tasting the waters. After the refill, hit plang exec again.

The Finale:

Execute, and "Hello plang world" graces your screen. You've just stepped into Plang.

Moving Forward

Pat on the back for making it this far! If you're itching for more, why not delve into creating a Todo app next? It'll be a neat excursion into database interactions and connecting with LLM services. Here's where to head next: Create a Todo app.

Reflections

Dipping your toes into Plang might feel different at first, especially with the cost per line aspect. But it's an intriguing journey. The simplicity and the natural language syntax have a charm, and it's worth exploring further.

Got thoughts or hit a snag? I'm all ears. Let's make this journey collaborative.

To learn more about Plang, checkout our (Github repo)[https://github.com/PLangHQ]

. . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player