bits-and-bytes

What’s this? Could it be…??? Oh my God, I actually TRANSLATED a page of my webcomic!!

Here’s page 107 of my Bits & Bytes webcomic, specially translated because I liked it a lot. Basically, it’s a little homage to many Kickstarter projects that got funded. Enjoy!

Oh, you can also read this page in my IMGUR account. Try here: http://imgur.com/gallery/rf1gC2k

9

It’s finally time for the start of the Bits and Bytes OCT. Since last week, I’ve been uploading one picture per day until today. Here are the characters in order of the numbers:

8. Kaguya and Mikemon from HibiWiki

7. Riza Ryuzaki and Buster (Omega V-Mon) from Riza23

6. Matthew Ambrose and Lopmon from TheHaloGuy

5. Janna Hansen and Coonomon from Viva-La-Veritas

4. Magnhild Gun Hallstrom and Elecmon from Lord-Evell

3. Shay Steeler and Kabumon from ZinyaWolf

2. Takeo Raiden and Shoutmon from FireReDragon

1. Razor from Goma-Teishoku and Tenyo Esyra from Rubixa-Seraph

0. Hukaro Nakawa and Vulupomon which are from yours truly.

4

In quantum computing, qubit or quantum bit, is a unit of quantum information—the quantum analogue of the classical bit.

A qubit is a two-state quantum-mechanical system such as the polarization of a single photon: here the two states are vertical polarization and horizontal polarization. In a classical system, a bit would have to be in one state or the other, but quantum mechanics allows the qubit to be in a superposition of both states at the same time, a property which is fundamental to quantum computing.

New Post has been published on DREW5.net

New Post has been published on http://drew5.net/code/bits-and-bytes-getting-started-with-typescript/

Bits and Bytes: Getting Started with TypeScript

External image

You might be wondering what is TypeScript. Is it yet another programming language I need to learn? Another set of API’s and documents to read through? Yes and no. It is a superset of the programming language JavaScript. What does that mean? Well, as a “superset” it means everything that you love (or hate) about JavaScript is still there but now you have the ability to create classes, modules and interfaces to help build your large scale applications and components. Don’t worry about compatibility since at the end of the day it compiles down to simple JavaScript. What is also cool is you can start using TypeScript immediately. If you know JavaScript, you know TypeScript. Your developers and your apps can take full advantage right now and incorporate current JavaScript libraries if needed.

Let’s get started.Node.js

Installing TypeScript

Remember, any browser, any OS, any host can accept type script. These instructions are platform agnostic so follow along.

Make sure you have Node.js install. I won’t go over that but it is as simple as going to NodeJS.org and downloading it for your OS.

Once you have NodeJS installed you can add the TypeScript compiler via the package manager.

npm install -g typescript

To confirm if it installed correct type in tsc and you will see the list of compiler commands

External image

Editor Configuration

You can use an editor of your choice. Visual Studio 2015 comes with TypeScript support out of the box. If you are running a Mac or even Windows, a nice editor to use is Visual Studio Code. Lightweight and TypeScript support. I will continue the rest of the article assuming you are using VS Code.

Your project needs to have a defintion file to allow the compiler to understand the settings it needs. Open up a new file and save it as tsconfig.json. Intellisense should be able to start helping you create the properties within the file however a simple one to get up and running would be something like this:

    "compilerOptions": 
        "target": "es5",
        "module": "amd",
        "sourceMap": true
    

The items to note here are target. You can specify es3, es5, es6. What that means is you can code to the E6 or E7 specs and output JavaScript to E5! So you can use the latest and greatest features of the new ECMAScript spec but still support browsers that are not there yet. For more information on all of the property options check out the GitHub page for detail.

Now, when we create a .ts file as part of our project we will have super rich and exciting experiences with validation!

Writing TypeScript

Create a new file and call it helloerror.ts

Since TypeScript is JavaScript we can add the following to that file:

function handleError(err) 
    console.log("Error Happened: " + err)


var myErr = "VeryBadError";

handleError(myErr);

Done! You just created your first TypeScript file. But before we get ahead of ourselves you might ask what about the Types and all of the cool stuff. Lets move on and change up our code a bit.

function handleError(err: string) 
    console.log("An Error Happened " + err)


var myErr = "VeryBadError";

handleError(myErr);

We just added a string type to our parameter. If we change myErr to a number we will get a compile error. Lets now add one more change.

interface ErrorMessage 
    messageText: string;
    messageId: number


function handleError(err: ErrorMessage) 
    console.log("An Error Happened " + err.messageText)


var myErr = messageText: "MyVeryBadError", messageId: 100;

handleError(myErr);

Now we have an object. However over to see the intellisense to see what is being returned. Now we can debug a bit better. Understand our code when it becomes a bit large in scale. Bringing modern development to JavaScript.

Make a TS to a JS

Now if we try to run this in our browser it will not work. We still have a TS file and we need a JS file. We could issue the build process from the command line (tsc helloerror.js) but as you can imagine that would get tiresome after a while.

Let’s use some build tasks within VS Code. Open the command palette with F1 and type in Command Task Runner and hit Enter

This will create a tasks.json file in the.vscode directory with an example output. You can look through and optimize your build but we just need to update the path within the args property to the path for our helloerror.ts file.

Press Ctrl+Shift+B to kick of the build process and you will see helloerror.js show up near the TS file. Let’s open the file and see what we get.

function handleError(err) 
    console.log("An Error Happened " + err.messageText);

var myErr =  messageText: "MyVeryBadError", messageId: 100 ;
handleError(myErr);

Holy Cow! It looks like JavaScript! That is because TypeScript is JavaScript!

If there were any build issues they would have shown up on the lower left hand side of the editor.

Done

Now you know TypeScript. Next up is how to take an existing application and add TypeScript support to it.

I completely forgot to finish these Xrosses, so I finished this and the realized that I haven’t even thought about the three form Xros, whoops.

Skippermon! Rollimon! DigiXros!

Not only does Skippermon gain armor with this Xros, but he also gains the ability to roll up like a wheel to both move around and attack using Cellarbuster.

The references I could make with this Xros only came to mind after I drew it. It took everything I had not to have him ‘got to go fast’.

Figured I’d upload some of the latest things I’ve been cooking up, because hey, why the fuck not.

I guess, so to say….this is a preview or teaser of my portion of the story for the exciting upcoming year of the Digimon Bits and Bytes OCT that is held on deviantART~! (that background was fun, by the way :D )

Maybe a select few may recognize these characters of mine X3 More art coming your way, hopefully soon.