GTK3 and Glade3 using Kotlin

Submitted by Dickens A S on Sat, 11/30/2019 - 14:13

GTK windows design using glade builder

GitHubhttps://github.com/dickensas/kotlin-gradle-templates/tree/master/gtk3-glade3

This code explains how to use Kotlin to program GTK3 and Glade3 using Cygwin Glade designer

Install cygwin with below dependencies (basic cygwin installation explained here install R using cygwin)

Call OpenCL from Kotlin or embed OpenCL inside Kotlin

Submitted by Dickens A S on Fri, 11/29/2019 - 17:29

Embedded OpenCL inside Kotlin

GitHubhttps://github.com/dickensas/kotlin-gradle-templates/tree/master/embed-opencl

OpenCL code which runs from kotlin

#pragma OPENCL EXTENSION cl_khr_byte_addressable_store : enable
__constant char hw[] = "Hello World";
__kernel void hello(__global char * A) {
    size_t tid = get_global_id(0);
    A[tid] = hw[tid];
}

 

Kotlin code which runs OpenCL

Artificial Neural Network in Kotlin - FANN

Submitted by Dickens A S on Thu, 11/28/2019 - 13:53

FANN is an open source library  https://libfann.github.io/fann/docs/files/fann-h.html

which offers C based API which can be invoked from Kotlin

Below Kotlin example shows how it can be invoked

import fann.*

fun main() 
{

    var ann = fann_create_standard(4, 2, 8, 9, 1)
    
    fann_print_connections(ann)
    
    fann_destroy(ann)
}

Below is the sample output from MSYS2 terminal

Call MATLAB function octave Mex from Kotlin

Submitted by Dickens A S on Thu, 11/28/2019 - 09:06

GNU Octave https://www.gnu.org/software/octave/ 

Is one of the popular Scientific Programming Language or platform

general MATLAB functions will work in Octave

It can be download https://www.gnu.org/software/octave/download.html and installed for free

This Article explains how to trigger Mex script from Kotlin using "mex.h" and "octave.h" C API in Kotlin

Octave is installed in C:\octave with below structure and files

Installing R using Cygwin

Submitted by Dickens A S on Wed, 11/27/2019 - 14:37

R is amazing platform which many numerical methods and analysis options available

This article explains how to use R in Windows using Cygwin

Reason for Cygwin, it has X11 and Cygwin-X with amazing setup selection tools and many libraries

Below are the installation steps

Step 1: Download and install Cygwin and dependencies

64 Bit Windows: https://www.cygwin.com/setup-x86_64.exe 32 Bit Windows: https://www.cygwin.com/setup-x86.exe

Chipmunk 2D game physics using Kotlin

Submitted by Dickens A S on Mon, 11/25/2019 - 12:21

Kotlin OpenGL code for chipmunk 2D physics engine

GitHubhttps://github.com/dickensas/kotlin-gradle-templates/tree/master/chipmunk-physics

Demo screen capture

The code is a single C style code to make beginners understand, the code is compiled and tested using MSYS2 and eclipse in Windows only

Please refer the articles for MSYS2 pacman commands