Run COBOL / gnuCOBOL using Cygwin/MSYS2 in Windows

Submitted by Dickens A S on Sun, 08/23/2020 - 11:00
Run COBOL in windows

Why COBOL in 2022?

The reason is, many migration still happening from mainframe COBOL to Java or .NET

If the developer knows how test the COBOL in his local machine, then it benefits the migration to speed up

This article demonstrates the Cygwin dependencies to compile gnuCOBOL from source code

Install Cygwin with below list of dependencies

Cygwin
gnuCOBOL
COBOL
Windows
Run

Kotlin JVM Easy JNI using SWIG and Gradle CPP

Submitted by Dickens A S on Sat, 08/22/2020 - 15:34

This article demonstrates easy way of generating C++ stub code including Java Generation for the corresponding C++ Classes using SWIG

The Gradle KTS project contains a sub module which contains the main source code, the header file and the SWIG file

The Gradle KTS is written in such way it will call the "swig" command line and generates the wrappers and copies the files to corresponding locations

The C++ compiler is auto chosen by Gradle cpp-library plugin, there is no need to write CMake or MakeFile or batch files for that

C++
CPP
JNI
kotlin
Java
JVM
SWIG
gradle

Kolin Multiplatform Targets NodeJS

Submitted by Dickens A S on Sat, 08/08/2020 - 12:13

Code written in kotlin will get transformed to JavaScript NPM module which can be executed directly from Node.JS

Simple Kotlin code

fun main() {
   println ("hello")
   test1()
}

The test1 function code

fun test1() {
   println ("hello test1")
}

The package.json which is manually created at root folder of the project

kotlin
Kotlin Multiplatform
Node.JS
NPM

STM32f429i LED using XPM and yotta and QEMU

Submitted by Dickens A S on Sat, 08/08/2020 - 11:03

This article explains how to run STM32 embedded board in an emulator on windows

Step 1: Install Nodejs

Install Nodejs

Step 2: Check Nodejs in command prompt

C:\>node --version
v12.16.2

Step 3: Install XMP

C:\>npm install -g xpm

Step 4: Check XPM 

C:\>xpm --version
0.6.4

Step 5: Install Python 2.7

Install Python 2.7

STM32
QEMU
QEMU-ARM
Yotta
CMake
Ninja

Kotlin Web Assembly WebGL Auto Stub

Submitted by Dickens A S on Sat, 05/02/2020 - 05:37

WebGL is a big API, it has 200+ properties and 100+ methods, writing a JavaScript stub and corresponding Kotlin stub is very difficult 

We need to write 1400+ lines of JavaScript code and 3000+ lines Kotlin code

This Kotlin gradle script provides a simple approach to auto generate the stub and also compile the generated code to .klib

Gradle Stub Code in KTS

WebGL
kotlin
Web Assembly
WebAssembly
Stub
gradle

Kotlin Web Assembly direct buffer access with UTF-16 string

Submitted by Dickens A S on Fri, 05/01/2020 - 06:07

Kotlin WebAssembly runtime provides a global JavaScript array called heap

which can be accessed if the pointer of a variable is known

The pointer and size of the variable can be determined by library methods stringPointer and stringLengthBytes

The from JavaScript the value can be updated with below logic

Kotlin Main Code

String
Web Assembly
kotlin
Heap
WebAssembly

Kotlin passing string to Web Assembly

Submitted by Dickens A S on Thu, 04/30/2020 - 14:09

From JavaScript as of now we cannot pass string to WebAssembly, therefore the string will be converted to an array of bytes and kept in browser's memory object of the kotlin web assembly framework object kotlinObject

From WebAssembly by calling the JavaScript method for each character, transfer the numeric value

Then convert the numeric value to character and combine to a string in kotlin

This is achieved using below code

JavaScript: string to UTF array utlity

DOM
Web Assembly
String
kotlin
WebAssembly