Objeck (a programming language)

v2023.1.0 (January 15, 2023)

 

Release notes

Maintenance release

 

v2023.1.0

·        New functions and optimizations for core classes (new)

·        Removal of more legacy 32-bit code on Windows (new)

·        Laid the groundwork for a forthcoming ML framework via TensorFlow

v6.9.1

·        Fixed static code analysis findings (new)

·        Updated documentation for MSYS2 support

v6.9.0

·        Added initial LSP support for ‘textDocument/codeAction’ “Quick Fix” functionality (new)

·        Added JSON to formatted string (new)

·        Provided Windows MSYS2 support for UCRT64 and Clang64 (new)

·        Fixed issue with ‘Encryption.Hash->RIPEMD160(..)’ hash function in Windows (bug)

 

Please refer to the GitHub project site for additional information.

The Programmer’s Guide is located in the “doc” directory. Additional examples are available in the Rosetta Code. If you are facing issues, please submit a bug report.

Getting Started

For new developers, please refer to the getting starting guide.

Package directories

app/ – Windows launcher (optional)

bin/ – compiler, debugger, and VM

doc/ – general documentation

doc/api/ – class library documentation

doc/syntax – files to enable syntax highlighting for supported editors

examples/ – source code examples, including a 2D game

examples/doc – source code for self-documentation system

examples/tiny – “tiny” language compiler and VM

lib/ – supporting language libraries

lib/native/ – native OS shared libraries

lib/native/misc – support file the portable runtime environment

lib/sdl/ – host SDL shared libraries

Windows launcher

The Windows Launcher is a convenient way to run programs and access documentation. On Windows, configuration information is stored in the “%ProgramData%\Objeck” directory and built the first time the app runs. If you move the install location, delete the “%programdata%\Objeck” directory and rerun the launcher. 

Compiling and executing programs

To compile programs outside the “bin” directory set, the “OBJECK_LIB_PATH” environment variable must be set. When this variable is set, all library files must be in the directory specified.

If the Windows installer is used, these variables will be automatically set.

To manually set the environment paths in Windows:

1.      set OBJECK_LIB_PATH=< program_path >\objeck-lang\lib

2.      set PATH=%PATH%;< program_path >\ objeck-lang\bin; C:\ Users\<account>\ objeck-lang\lib\sdl

3.      Note: If you compiled Objeck from source under MSYS2 you do not need to include the “\ objeck-lang\lib\sdl” path as the required SDL2 DLLs are already in the MSYS2 shell’s path.

To manually set the environment paths in macOS and Linux:

  1. export PATH=$PATH: <program_path>/objeck-lang/bin
  2. export OBJECK_LIB_PATH=< program_path >/objeck-lang/lib

 

Simple compile/execute:

1.      obc -src ..\examples\hello_0.obs

                              –OR-

1.      obc -src 'C:\Program Files\Objeck\objeck-lang\examples\encrypt_7.obs' -lib encrypt -dest my_prgm.obe

2.    obr my_prgm

 

Compile/execute for code that has library dependencies:

1.    obc -src ..\examples\xml_path.obs -lib collect.obl,xml.obl -dest xml_path.obe

2.    obr xml.obe

 

Old Intel OS X: You will need to install OpenSSL to use encryption APIs and iODBC to enable database support. Please refer to the following link for OpenSSL directions and this link for ODBC support.

SDL Support

The 2D gaming framework is built around SDL2 (>=2.0.9). The Windows distribution contains the required DLLs. Support for other platforms is below.

For Linux:

1.      sudo apt install libsdl1.2debian libsdl-gfx1.2-5 libsdl-gfx1.2-dev libsdl-gfx1.2-doc libsdl-image1.2 libsdl-image1.2-dbg libsdl-image1.2-dev libsdl-mixer1.2 libsdl-mixer1.2-dbg libsdl-mixer1.2-dev libsdl-net1.2 libsdl-net1.2-dbg libsdl-net1.2-dev libsdl-sound1.2 libsdl-sound1.2-dev libsdl-ttf2.0-0 libsdl-ttf2.0-dev

 

For macOS:

1.      Apple Silicon (arm64)

1.1.   Go to the “lib/native” directory an untar the “sdl2_arm64.tgz” file

1.2.   Copy the include and lib files to “/usr/local/include” and “/usr/local/lib”

OpenSSL Support

The following to generate a self-signed SSL certificate for the ‘TCPSecureSocketServer’ class using OpenSSL commands (for Windows and Linux):

1.      openssl req -x509 -newkey rsa:4096 -sha256 -days 3650 -nodes -keyout local.key -out local.crt -subj "/CN=localhost" -addext "subjectAltName=DNS:localhost,DNS:www.local.net,IP:127.0.0.1"

2.      openssl x509 -in local.crt -out cert.pem

3.      openssl rsa -aes256 -in local.key -out local.encrypted.key

4.      mv local.encrypted.key cert.key

5.      rm local.crt local.key

6.      chmod 600 cert.key

7.      Import ‘cert.pem’ into the host OS

Follow these instructions for macOS.

Source code

The Objeck source repository is located here, and the source can be fetched using the following command GIT command:

·        git clone https://github.com/objeck/objeck-lang.git

License

·        The software was developed under the FreeBSD License. Supporting software licenses can be found here.

Known bugs and limitations

·        System tested on the following

o   Windows 10 and 11 (Intel)

o   Ubuntu 22.04 (Intel)

o   Debian GNU/Linux 11 - Bullseye (ARM64)

o   macOS 13.0.1 (Apple Silicon and Intel)

·        Please report bugs

 

© 2023 Randy Hollines. All Rights Reserved.