All Projects → itssamuelrowe → JTK

itssamuelrowe / JTK

Licence: other
JTK is a library designed for writing applications and libraries in C. It provides core utilities such as collections, unit testing, I/O streams, threads and much more.

Programming Languages

c
50402 projects - #5 most used programming language
C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to JTK

Zen
Zen is a general purpose programming language designed to build simple, reliable and efficient programs.
Stars: ✭ 24 (-4%)
Mutual labels:  zen, jtk
rrbit-js
No description or website provided.
Stars: ✭ 11 (-56%)
Mutual labels:  collections
flare
Useful thread-safe collections with performance in mind for Java 8+.
Stars: ✭ 14 (-44%)
Mutual labels:  collections
go-stm
Software Transactional Memory for Go
Stars: ✭ 15 (-40%)
Mutual labels:  concurrency
edd
Erlang Declarative Debugger
Stars: ✭ 20 (-20%)
Mutual labels:  concurrency
Corium
Corium is a modern scripting language which combines simple, safe and efficient programming.
Stars: ✭ 18 (-28%)
Mutual labels:  concurrency
queueable
Convert streams to async ⌛ iterables ➰
Stars: ✭ 43 (+72%)
Mutual labels:  concurrency
geeteventbus
An inprocess eventbus for highly concurrent Python applications
Stars: ✭ 17 (-32%)
Mutual labels:  concurrency
Composer
Library for composability of interdependent non-blocking I/O tasks
Stars: ✭ 19 (-24%)
Mutual labels:  concurrency
joda-collect
Java library providing additional collection interfaces and implementations built on top of Guava
Stars: ✭ 26 (+4%)
Mutual labels:  collections
psched
Priority-based Task Scheduling for Modern C++
Stars: ✭ 59 (+136%)
Mutual labels:  concurrency
jenkins-shared-library-example
Example for a Jenkins shared library with unit tests
Stars: ✭ 35 (+40%)
Mutual labels:  unit-test
TcUnit-Runner
Program that makes it possible to automate runs of TcUnit unit tests
Stars: ✭ 23 (-8%)
Mutual labels:  unit-test
channel
Go-like channels for JavaScript
Stars: ✭ 49 (+96%)
Mutual labels:  concurrency
NonEmptyCollections
A type-safe implementation for collections that cannot be empty. Life is too short for emptiness-checks!
Stars: ✭ 45 (+80%)
Mutual labels:  collections
zen archived
TLS integration and more!
Stars: ✭ 133 (+432%)
Mutual labels:  zen
zarch
The Ultimate Script For Arch Linux
Stars: ✭ 49 (+96%)
Mutual labels:  zen
gotopus
Gotopus is a minimalistic tool that runs arbitrary commands concurrently.
Stars: ✭ 17 (-32%)
Mutual labels:  concurrency
ring-election
A node js library with a distributed leader/follower algorithm ready to be used
Stars: ✭ 92 (+268%)
Mutual labels:  concurrency
mux-stream
(De)multiplex asynchronous streams
Stars: ✭ 34 (+36%)
Mutual labels:  concurrency

What is JTK?

JTK is a library designed for writing applications and libraries in C. It provides core utilities such as collections, unit testing, I/O streams, threads and much more.

Initially, the development of the library began within an other project, a compiler for Zen. Zen is a programming language currently under development at OneCube Software Solutions. We observed a need for a library that could be reused in other projects. Therefore, we refactored the reusable components and called it JTK.

JTK aims to provide a better alternative to libraries such as Glib. It was designed with flexibility and performance in mind.

Installation

[Windows]

  1. For compiling JTK on Windows, you first need to install MSYS2. The steps required
    to install MSYS2 are beyond the scope of this documentation. Although, you can find
    tutorials on installing MSYS2 on the Internet.
  2. Extract the source code to any directory of your choice, for the sake of this
    documentation we will refer this location as 'C:\jtk-1.0'.
  3. Change the directory to 'C:\jtk-1.0'.
    cd 'C:/jtk-1.0'
    
  4. Create a temporary directory for compiling the source code. For the sake of this
    documentation we will refer to this directory as 'build'.
    mkdir build
    
  5. Change directory to the newly created directory.
    cd build
    
  6. Invoke CMake to generate make files. In this documentation, we show the
    commands to generate GNU Makefiles. You can easily generate other makefiles
    similarly.
    cmake .. -G 'MSYS Makefiles'
    
  7. Invoke the GNU Make program. The command may be different on your system,
    if you have not setup an alias.
    make
    
    This should compile the library. Archives and executable files should be
    produced in your current working directory. You can link the library to
    your project. As of this version, a plethora of warnings are generated.
    We are working to eradicate these warnings.

[Linux]

  1. For compiling JTK on Linux, you need CMake and GNU Make (or any other make utility that CMake is compatible with).
  2. Extract the source code to any directory of your choice, for the sake of this
    documentation we will refer this location as '/mnt/g/jtk'.
  3. Change the directory to '/mnt/g/jtk'.
    cd '/mnt/g/jtk'
    
  4. Create a temporary directory for compiling the source code. For the sake of this documentation we will refer to this directory as 'build'.
    mkdir build
    
  5. Change directory to the newly created directory.
    cd build
    
  6. Invoke CMake to generate make files. In this documentation, we show the
    commands to generate the default Makefiles, on my system GNU Makefiles is the default target. You can easily generate other makefiles by specifying the target make files using the -G flag.
    cmake ..
    
  7. Invoke the GNU Make program.
    make
    
    This should compile the library. Archives and executable files should be
    produced in your current working directory. You can link the library to
    your project. As of this version, a plethora of warnings are generated.
    We are working to eradicate these warnings.

Structure of JTK

The various components of JTK are grouped together under modules. Each module
compiles into a library archive. As of version 1.0, there are three components.

[Core]

The core module provides the basic necessities such as loggers, memory
allocation/deallocation, string utilities, integer utilities, etc.

[Collection]

This module consists of various data structures and algorithms, which include
lists, maps, sets, bags, etc.

[Unit]

A module designed for writing unit tests.

Further, each module is again divided into classes. Not that, a class in JTK
simply refers to a group of functions which manipulate instances of a specific
structure. For example, the TestCase class simply refers a group of functions
which work on an instance of the jtk_TestCase_t structure.

Every component declared within JTK use the following name scheme:

jtk_Class_function

The name of a component is divided into three parts separated by an underscore:
* jtk - This prefix is added to all the components in JTK. We are simply
trying to simulate a name space (as in C++) or packages (as in Java).
* Class - The class in which the function belongs.
* function - The name of the function.

Example (in Java):

class TestCase {

    ...

    public boolean isSuccessful() {
        ...
    }
}

The above class translate to the following snippet in C. It follows the naming scheme as described above.

bool jtk_TestCase_isSuccessful(jtk_TestCase_t* testCase) {
    ...
}

Style Guidelines

Files (relative to the root of the source code)

[example]

This directory consists of example programs. It is intended for beginners, intermidiate users, and advanced users. It showcases a variety of examples of using the library.

[include]

This directory consists of all the header files exported by JTK.

[share]

This directory consists of misc files for tools such as pkg-config, etc.

[source]

This directory consists of all the source files that is compiled into library archives.

[test]

This directory consits of unit tests for the library.

[CMakeLists.txt]

The rules for compiling the library, unit tests, etc. Feed this file to CMake in order to generate make files. Currently, it is tested only for MinGW Make.

[README.md]

A brief document to get you started. A more detailed document is yet to be written.

Overload Suffixes

  • v - void pointer
  • b - byte
  • s - short
  • i - integer
  • l - long
  • f - float
  • d - double
  • utf8 - uint8_t*
  • z - boolean
  • c - char
  • cz - char*

Certain functions within the library are overloaded, that is, they perform the
same operation but on different data types. Such functions share a same name
with a unique suffix. The suffixes are listed above.

TODO.txt

It lists all the features yet to be implemented by the library.

License

Copyright 2018-2019 OneCube

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].