Mac/Linux Installer Coming for JS++ 0.5

The next version of JS++ will feature the ‘class’ keyword and is expected for Q1 2017.

In addition, Mac and Linux users will benefit from a JS++ installer:


The installer is completely optional. However, it will be useful if you don’t want to manually install JS++ and various editor plugins. We auto-detect which editors are installed on your system, and, if a plugin is available, we will attempt to install it for you.

JS++ for Mac OS X Updated to Latest Version

During our Christmas release, we had to release one version down (0.4.2.3) for Mac OS X. I’m happy to announce that – now that our staff are back from their breaks – JS++ for Mac OS X has been updated to the latest version and is in sync with JS++ for Windows and Linux.

Please note that, as of 0.4.2.4 for Mac OS X, JS++ defaults to the 32-bit binary. The 64-bit binary is available as jspp-x64.

You can download JS++ for Mac OS X from our homepage.

A JS++ Christmas: AJAX, js++Unit, Mac compiler, Tutorials

Merry Christmas from JS++!

We have multiple “gifts” and announcements for you this Christmas. We have lots of new libraries written with JS++ and a new version.

Version 0.4.2.4 and Mac Support

We have released version 0.4.2.4 which supports callback conversions, array conversions, and C-style casts such as:

int x = (int) y;

For a long time now, we have not provided Mac support. That’s going to change beginning this Christmas. We’ve released 0.4.2.3 for Mac OS X. It is one version down from the latest release for PC, but this was due to the fact that I let our staff off on holiday, found a bug with auto-boxing, and patched it at the last minute.

If you want access to our new libraries, you will need to download the new versions.

Library: js++Unit

js++Unit is an xUnit testing framework for automated testing in JS++. js++Unit currently works best for Node.js and is inspired by the Mocha test framework. It doesn’t really support the browser yet, but we’ll get there. We’re taking open source contributions for js++Unit too!

js++Unit also comes with a full-featured assertion framework (Vendor.JSPPUnit.Assert) and will do neat things like working with cycles for deepEqual.

You can download js++Unit from GitHub.

Library: ConsoleStyle

If you have a terminal emulator that supports ANSI escape codes, we have a library for you to provide colors to your console output. Download the ConsoleStyle library from GitHub. js++Unit depends on it and you need to link ConsoleStyle to use js++Unit.

Library: AJAX

Are you tired of having to include the entire jQuery library just to send an AJAX request? In JS++, you no longer have to. Since JS++ features dead code elimination, if you import an AJAX library that defines functions for HTTP GET and POST requests and you only use GET requests, the logic for POST requests will not be compiled into your final application.

You can download the AJAX library here. (It also ships with the latest version of JS++.)

Tutorial: What Are “Type Guarantees?”

The Getting Started guide has been completely re-written. We now explain how to use JavaScript libraries from JS++. We go one step further and explain what “type guarantees” are and how you can take advantage of them from JS++ using a new “RGBtoHex” tutorial.

The RGBtoHex tutorial shows an “untyped” JavaScript library. We teach you how to use it from JS++ – without ever adding types to your code. We gradually begin to add types (without compromising the soundness of the type system). Finally, we end with fully typed code and a re-usable function.

RGBtoHex is an ideal tutorial. RGB values are limited to the values 0 to 255. This is the JS++ byte data type. In the RGBtoHex tutorial, we show you how JS++ will guarantee your values will remain within the 0 to 255 range.

Check out the Getting Started tutorial now.

Merry Christmas!

JS++ 0.4.2.2: Debugging with Source Maps

JS++ 0.4.2.2 is being released today with support for in-browser debugging via source maps. Source maps allow you to debug your JS++ programs from a web browser of your choice that supports source maps debugging: Google Chrome, Mozilla Firefox, Microsoft Edge (untested), etc. With source maps, you can set breakpoints, log messages, and more with all locations pointing back to the original source JS++ file—rather than the generated .jspp.js file.

At the time of this writing, the recommended web browser to use for source maps debugging is Google Chrome.

In order to leverage source maps, compile your JS++ files with the --debug (or -d) flag:

Compiling source maps with JS++

This will generate a .map file, which maps the generated code back to the original JS++ source code.

When you run the generated code in your web browser, you will notice that console.log statements point to the original source .jspp file’s location rather than the locations of the generated code:

Source Maps - console.log Original Location

In addition, you can set breakpoints, step into, step over, step out and use all the features you’d expect from your debugger:

Source Maps - Set Breakpoint

Finally, we have worked to improve Microsoft Windows integration even more. In JS++ 0.4.2, we gave you Windows context menu integration. However, due to restrictions in Windows, this only allowed compilation of one file. JS++ is a multi-file, modular programming language. Thus, we needed users to be able to select multiple files and compile them. You can now do this in the latest version of JS++:

jspp-windows-multifile

Another problem with Windows integration was that the JS++ CLI compiler would pop up and immediately exit. If you had an error, there was no way to know what to fix. With the latest version of JS++, you will now receive a popup dialog notifying you of the compilation results:

jspp-windows-multifile2

Get the latest download of JS++ by navigating to our home page.

JS++ 0.4.2.1 – Minor Bug Fix Release

JS++ 0.4.2.1 has been released. This is a minor bug fix release. The following issues have been fixed:

1. Checking for permissions. Compiler now checks if the user has permission to read input files and write to output directories.
2. Segmentation faults for built-in modules (e.g. `Externals.DOM`)
3. Dead Code Elimination (DCE) algorithm updates so parent modules do not get eliminated.
4. Error 0119 was incorrectly being raised on function parameters. This has been fixed so assignments to parameters can be done.
5. Parser bug for regular expression literals.

In the next release, 0.4.2.2, we will be including free, open-source libraries for AJAX and real-time streaming.

The latest version can be downloaded from the JS++ homepage.

JS++ 0.4.2 Released

We are proud to announce the release of JS++ 0.4.2 Early Access Preview. The latest release of JS++ introduces modules, function overloading, dead code elimination, better integration with Microsoft Windows, and 16 new editor integrations.

Emacs Syntax Highlighting for JS++

JS++ 0.4.2 introduces the module keyword and enables modular design. The application entry point occurs at the “main file”. See the documentation for the main file for more information.

In addition, at the compiler level, JS++ gives you full access to static linking and dead code elimination. Dead code elimination means that all unused code will not be compiled into the final generated output. One of the biggest pain points in JavaScript is that you need to include the entire jQuery library just to use one function. With npm and the “micro-library” revolution, JavaScript code has grown and grown in size. Web pages take longer to load because they depend on megabytes of JavaScript to be downloaded, and this is especially painful over mobile connections. Dead code elimination solves this: if you didn’t use it, it doesn’t end up in the code you ship.

Please note that dead code elimination is a JS++ feature only. It cannot be retroactively applied to JavaScript code effectively. For example, JS++ is a superset of JavaScript that introduces structure, such as the module keyword. Unlike JavaScript prototypes, these structures cannot be modified at runtime. Therefore, the compiler is fully able to analyze which classes, variables, and functions actually get used and eliminate the ones that don’t get used. If your code is structured with JavaScript prototypes rather than JS++ classes and modules, dead code elimination will be a lot less effective.

JS++ 0.4.2 also introduces function overloading. All unused overloads and unused functions (even if not overloaded) will not be compiled in the final output via dead code elimination.

Modules, function overloading, and dead code elimination (DCE) together enable the creation of more sophisticated applications.

However, we’ve delivered much more than that. In addition to all the new compiler features, we are shipping integrations with 16 new code editors – including some of the most popular editors:

1. Sublime Text
2. Notepad++
3. Visual Studio Code
4. Vim
5. GitHub Atom
6. Adobe Brackets
7. GNU Emacs
8. UltraEdit
9. gedit
10. Kate
11. KWrite
12. Nano
13. Geany
14. Ace (Editor for Cloud9 IDE)
15. CodeMirror
16. Alex Gorbatchev’s SyntaxHighlighter

Sublime Text Build System

Finally, we’ve also improved Windows integration. Installation on Windows is now more seamless (no restarts necessary), and you can now use the GUI to compile JS++ files and avoid the command-line altogether:

JS++ Windows Context Menu

This is an exciting and comprehensive new release for JS++. You can download the latest version from the home page.

JS++ for Ace: Embedding and Tooling

JS++ now supports the popular Ace editor library. The Ace editor is an open-source text editor plugin that is used as the underlying editor for Cloud9 IDE and is the successor to the Mozilla Bespin project.

Ace can be used for embedding JS++ snippets into web pages. It can also be used to develop tooling for JS++ such as text editors and IDEs. Ace is fully web-based so it can be used for developing cloud editing tools.

JS++ for Ace AJAX Cloud9 IDE

You can download the JS++ Ace integration from our GitHub.

Visual Studio Code Integration

We are happy to announce JS++ integration with Visual Studio Code, the free cross-platform code editor from Microsoft. Today makes for a double announcement as we simultaneously also announced JS++ integration with Adobe Brackets today. Onux is committed to providing maximum editor and IDE integration for JS++, and today’s double announcement reinforces our commitment.

JS++ for Visual Studio Code

The Visual Studio Code integration for JS++ will be available with the next version, v.0.4.2. Early birds can download the Visual Studio Code plugin from our GitHub repository.

Currently, only syntax highlighting is supported for Visual Studio Code. We will continue to develop the Visual Studio Code plugin to support debugging, IntelliSense, symbol navigation, and so on as part of our continued commitment to maximum editor and IDE integration.

Adobe Brackets Plugin

We are happy to announce JS++ integration with Brackets, the free text editor for web development from Adobe.

Adobe Brackets JS++ Plugin

The JS++ plugin for Adobe Brackets supports full syntax highlighting and code folding. The plugin can be downloaded from our GitHub repository.

The Adobe Brackets plugin will be distributed with the next version of JS++ (v.0.4.2), which should be coming in the next few weeks. Onux is committed to maximum editor and IDE integration, as we have consistently demonstrated by delivering integrations for the most popular code editors.

Emacs Syntax Highlighting for JS++

We have finished Emacs syntax highlighting for JS++ in our Emacs plugin. Please note that only syntax highlighting is available for Emacs at this time. In the future, we will be including other extras such as code folding and indentation logic in the Emacs plugin.

Emacs Syntax Highlighting for JS++

The Emacs plugin will be distributed with the next version of JS++ (v.0.4.2) which is due next month in October.

The Emacs plugin can also be downloaded from the GitHub repository.