If you are writing code, chances are that ASTs are involved in your development flow. AST stands for Abstract Syntax Tree and they power a lot of parts of your development flow. Some people might have heard about them in the context of compilers but they are being used in a variety of tools. Even if you don't write general development tools, ASTs can be a useful thing to have in your toolbelt. In this post we'll talk about what ASTs are, where they are used and how you can leverage them.
What is AST?
Abstract Syntax Trees or ASTs are tree representations of code. They are a fundamental part of the way a compiler works. When a compiler transforms some code there are fundamentally the following steps:
- Lexical Analysis
- Syntax Analysis
- Code Generation
Lexical Analysis aka Tokenization
During this step, code that you wrote is going …
Over the last month, we hosted a hackathon with our friends at DEV to celebrate the launch of our CodeExchange Community Program. We've been amazed by the amount of excitement and the incredible submissions that we've seen.
In total we've seen over 200 submissions to the hackathon from developers around the world. Today we are excited to announce the winners of the Twilio x DEV April 2020 Hackathon.
Thank you all for participating!
Before we announce the winners, we want to thank everyone who worked on a submission for this hackathon. We are constantly amazed to see what the community builds – and this hackathon was no different. The submissions included everything from apps making life during COVID-19 better, sending SMS from databases, and even using BASIC on a TRS-80.
For this hackathon we had four prize categories:
- COVID-19 Communications: an app to help folks communicate …
The Node.js ecosystem is full with useful CLI tools and most of them offer configurations that let you tune them to do exactly what you want. However, sometimes you still have the need for very custom configurations and scripts. This is where "npm scripts" come into place. While you might have used this to set up your "build", "dev" or "start" script, there's a lot of things you can do with them. In this blog post we'll talk about the most useful and some hidden features.
Before we get started, make sure you have the latest version of
npm installed. While a lot of these things should work in
pnpm as well, we'll focus on
npm in this article. Everything in this post has been tested with
npm version 6.10.
What are npm scripts?
When we talk about "npm scripts" we are talking about entries in …
If you received a promo code from Twilio to apply to your account, and you are unsure how to apply it, you are at the right place. In this post, we'll walk together through the process of applying a promo code.
What is a promo code?
A promo code is a way for us to give you some Twilio credits for you to work on your projects. They are typically all-caps alphanumeric codes and are valid for a specific time. You might have received one as part of a hackathon or other event we are sponsoring or through another type of promotion.
How do I apply a promo code?
In order to apply a promo code, you'll need an existing Twilio account. You can sign up for a free Twilio trial account at twilio.com/try-twilio
Once you are signed up, your next steps depend on the type of promo code you …
At GitHub Universe 2019, GitHub announced that Actions have been moved into General Availability. We are very excited about this launch and as part of it have launched the Twilio SMS for GitHub Action. In this blog post we'll look at how you can get started with that and some use cases for it.
You can find the Twilio SMS Action in the GitHub Marketplace. Before using it, you'll need a Twilio account. Sign up for free to get your account details.
Once you have an account, we'll need two additional things.
Get a phone number
If you haven't gotten a phone number yet, head over to the Phone Numbers section of the Twilio Console and select your preferred phone number. Make sure it has SMS capabilities enabled.
Once you have that phone number, make sure to note it down somewhere. We'll need it later when …
For a lot of developers the first pull request to an open-source project can be the most intimidating one. It often gets even more intimidating if it is your very first pull request to open source in general. For that reason we decided this year to create the Open Pixel Art project with the aim to teach people how to create their first pull request. Today we are happy to have reached a first big milestone with the project.
Thank you for all your contributions!
In the first 4 weeks of the project over 1000 developers have gotten their pull requests merged into the Open Pixel Art project.
A lot of them did not stop by contributing a pixel to the canvas, they added new functionality that let …
It's October 1, 2019 and that means Hacktoberfest 2019 has officially started! Over the next month, people from around the world are taking time to contribute to open-source projects. The world of open source has become such an elementary part of the software we all write day-to-day and the things we create! It allows us to share and collaborate with each other. At Twilio we believe in the power of developers and are excited to take part in Hacktoberfest in various ways both online and in-person.
Here are a few things you'll want to keep an eye on if you are as excited about Hacktoberfest as we are!
Learn how to create your first open-source contribution
Creating your first contribution to the world of open source can be intimidating. We get it. It wasn't any different for us. But we wanted to see if we can make it a bit …
Contributing to an open-source project can often be intimidating. Especially if it is your first contribution. At one point we've all been there. But contributing to open source can also be fun and rewarding once you get through it. We decided to try and help you with your first steps into the world of open source and hopefully make it less intimidating and more fun!
As a result we are launching today two new projects! The Open Pixel Art project and a brand new Twilio Quest mission focused on taking you step-by-step through your quest into the world of open source.
Open Pixel Art - A Collaborative Art Project
One problem doing your first contribution to open source is finding the right project to get started. While there are some great projects that welcome new contributors, we wanted to create something that makes it easy to identify what to contribute. …
With the Serverless Toolkit we can include the development, debugging and deploying of Twilio Functions, Twilio's Serverless Runtime offering, more tightly into our existing development flows. For example we can add build tools such as TypeScript into our project to perform type checks on our Twilio Functions to catch more bugs during compilation time. In this post we'll look into how we can set up a Twilio Functions project using the Serverless Toolkit and TypeScript.
Before we can get started, you'll need to make sure to have the following things:
- Node.js 8.10 (or newer)
- A Node.js package manager (the examples will be using npm)
- A Twilio account. Sign up for free
We'll be using the Serverless Toolkit via the Twilio CLI but you can also use it as a standalone. Check out the docs for more on how to use the Toolkit alone.
If you don't …