Ruby: How to make a Transpiler

Ruby: How to make a Transpiler

The purpose of this article is to explain in simple terms what a transpiler is and how to get started. My target audience is junior or intermediate coders who don’t know what this is. By the end of this article you’ll know where to get started on your own transpilers or compilers. Demistify!

The purpose of this article is to explain in simple terms what a transpiler is and how to get started. My target audience is junior or intermediate coders who don’t know what this is.

By the end of this article you’ll know where to get started on your own transpilers or compilers. Demistify!

It’s a source to source translator.

A compiler takes some source code and compiles it down to some lower language. This lower language might be source code or it might be something less than source code. For example, C++ compiles down to bytecode. Some programmers can mess around with bytecode. Most can’t or wont. Typescript compiles to Javascript since Typescript is a super-set of Javascript.

A transpiler is very similar, except it transpiles source code to some other source code. Generally speaking, this translation is to and from human readable code.

It’s easy to get these things mixed up, and in some cases the destinction between the two can be severely blurred. Sometimes the needs of the program are complicated enough that there is some dispute on wether or not a program is a transpiler or a compiler.

There are build tools that transpile code and also compile code. It’s messy.

For simplicity Just think of a transpiler as a source code to source code translator.

javascript computer-science coding ruby programming

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Day 14 of 30 Ruby Coding Challenge - Fibonacci Sequence the Ruby Way

Day 14 of 30. We're going to solve the famous Fibonacci sequence by taking advantage of features that Ruby offers.

Coding 101: Programming Language Building Blocks

This article will introduce the concepts and topics common to all programming languages, that beginners and experts must know!

77 Programming Language Q&A (P4)

Check the bottom of the page for links to the other questions and answers I’ve come up with to make you a great Computer Scientist (when it comes to Programming Languages).

Principles of Functional Programming in JavaScript That Will Make Your Coding Life Easier

Who else loves to write side-effects-free functions? I think we, as programmers, all do. Today, in this story, I will walk you through the basic principles of functional programming that will make your coding life easier.

Program a Quantum Computer Today

Your options on how to start with working with today’s quantum computers. Quantum computing is one of the most rapidly advancing technologies.