Thursday, January 18, 2018

how to create Golang project with maven archetype

I have made small GIF which shows how to make a GoLang project with maven archetype and build it
mvn archetype:generate -B -DarchetypeGroupId=com.igormaznitsa -DarchetypeArtifactId=mvn-golang-hello -DgroupId=HiGo -DartifactId=hello

Tuesday, December 19, 2017

Conway's law

I guess the Conway's law is one of the most important ones in software development:
"Any organization that designs a system (defined broadly) will produce a design whose structure is a copy of the organization's communication structure."
http://www.melconway.com/Home/pdf/committees.pdf

Thursday, September 21, 2017

JDK 9 + JEP-238 + Maven + Preprocessor

I have made small example project to show how to use Java preprocessor and Maven to build multi-release JAR (as described in JEP-238) which is supported in JDK 9.
https://github.com/raydac/jep-238-jcp-example

Sunday, September 3, 2017

JBBP 1.3.0

Java Binary Block Parser 1.3.0 is out and accessible in the Maven Central. The Main feature of the version - to generate Java class sources from JBBP scripts, the feature allows to use the framework for more or less high-load systems. The Library still has size less than 200 kBt but since the version it needs Java 1.6+ (minimal Android version is still 2.0). Also there are published two plugins for Maven and Gradle which allow to generate Java classes from JBBP scripts on fly during project build phase.
Also of course minor refactoring and bugfixing.
p.s.
The Library is used by Orange for its Datavenue Live Objects service

Sunday, February 12, 2017

JCP 6.1.1 is out

New version of Java Comment Preprocessor 6.1.1 is out. In the New Version mainly improved maven options and improved some text functions to make it more compatible with GoLang.
Now it is possible preprocess GoLang and it is possible to load a binary file and represent it as a byte array through just only line command (see example)
var imageArray = []uint8{/*$binfile("./image.png","uint8[]")$*/}

Monday, November 7, 2016

mvn-golang plugin 2.1.2 is out

Maven plugin to work with GoLang in maven is out and accessible through the Maven central. Also I made some example of project with multiple modules and shared sources, it can be downloaded as zip or investigated in github

Sunday, October 9, 2016

How to compile Prolog with GProlog and SWI-Prolog (Linux)

GProlog

Application must contain such piece of code
:-initialization(Goal).


 Then executable file can be built with
gplc --min-size PrologFile.pl
To decrease size of resulted file just use upx utlity
upx --all-methods exeFile

SWI-Prolog

Add some main goal into Prolog application
main :- Goal, Goal, Goal.
Compile with string
swipl -O --foreign=save --toplevel=halt --goal=main --stand_alone=true -o exeFile -c PrologFile.pl
Check usage of system libraries with
ldd exeFile
It will show something like
linux-vdso.so.1 =>  (0x00007ffcdc3f8000)
libswipl.so.7.2 => /usr/lib/libswipl.so.7.2 (0x00007febe1ec8000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007febe1cab000)
libswipl.so.X.X is used by the executable file and must be bundled together with compiled file