Summary
hg Show by ID
logiqub repository
Statistics are disabled for this repository
Download as zip
logiqub 246d94c6caa8
3 days ago
logiqub 1f2e645a17a4
12 days ago
logiqub 84ee30167afb
22 days ago
logiqub 5c595b0d53bf
22 days ago
logiqub 01b9d75cb89e
22 days ago
logiqub 3c296b677724
22 days ago
logiqub b4749e92a65f
22 days ago
logiqub fb5d06dc489f
22 days ago
logiqub 44153fde02b4
22 days ago

Description

The logiqub is a scripting language designed to be small, fast, and interoperable (portable, extensible, embeddable). As a virtual machine assembler, high level features present in other languages are not implemented. The minimalist approach reduces complexity and maintenance, and increases agility by cutting depencies. That being said, anything that can be done in C and assembly can be done with the logiqub.

Visit the about page to learn about the making of this product.

Build

Detailed building instruction for advanced users are available at the build page.

Install

You can browse the source and download files on the online mercurial repository.

Supported systems and architectures:

  • Windows - x86
  • Linux - x86
  • Raspbian - ARMv7 (beta)
  • Java - JVM (alpha)

Linux (Debian, Raspbian)

1) Binary

Debian packages for the logiqub are not available for the moment. You can download a prebuilt binary here. For graphical apps get the SDL2 libraries for Debian:

sudo apt-get update
sudo apt-get install libsdl2-2.0
sudo apt-get install libsdl2-image-2.0
sudo apt-get install libsdl2-tff-2.0
sudo apt-get install libsdl2-mixer-2.0

2) Source

In the following code, change "linux" to "raspbian" for the Raspberry Pi. Open a terminal.

sudo apt-get update
sudo apt-get install binutils
sudo apt-get install gdb        # optional
sudo apt-get install make
sudo apt-get install mercurial

cd $HOME                        # if you wish to install there
hg clone http://logiqub@logiqub.com/repo/logiqub

cd logiqub/system/linux
make                            # release build
make debug                      # debug build (symbols for gdb)
make lib                        # library build


To install:

ln -s $HOME/logiqub/system/linux/logiqub $HOME/bin/logiqub
ln -s $HOME/logiqub/system/linux/liblogiqub.so $HOME/bin/liblogiqub.so


To test:

cd $HOME/logiqub/demo
logiqub ascii.qub

cd tetris                       # SDL2
logiqub main.qub

Windows

1) Binary

You can download a prebuilt binary here.

For graphical apps get the 32-bit SDL2 libraries for Windows.

2) Source

You can also compile the logiqub executable from source.

Install Mininal GNU for Windows: MinGW. For the toolchain you can choose whatever you like. Simplest is probably 32-bit. This means "mingw32/mingw-w64-i686" prefix.

You can use 64-bit versions with "mingw64/mingw-w64-x86_64" prefix. Finally you can use cross compiler with "msys/mingw-w64-cross" prefix. What matters is that you get the assembler (as), the linker (ld) and the Windows CRT (crt) installed. Make sure you edit the Makefile to reflect your toolchain choice.

Open a terminal.

pacman -Syu                   # optional, update system
pacman -S gdb                 # optional, to debug the virtual machine
pacman -S binutils            # assembler, linker
pacman -S crt-git             # C runtime
pacman -S make                # builder
pacman -S mercurial           # source code management

cd $HOME                      # if you wish to install there
hg clone http://logiqub@logiqub.com/repo/logiqub

cd logiqub/system/windows
make                          # release build
make debug                    # debug build (symbols for gdb)


To properly install the executable, you should add it to your PATH environment variable. You can also create a logiqub.rc file with aliases and some paths.

pacman -S ansicon             # ascii colors
pacman -S winpty              # terminal

alias run="ansicon_x86 winpty logiqub"
alias debug="ansicon_x86 winpty gdb --args logiqub"
export PATH=$PATH:$HOME/logiqub/system/windows
export LD_LIBRARY_PATH="/mingw32/i686-w64-mingw32/lib"

Make sure to "source logiqub.rc" in your .bashrc file to make the aliases available, or do it manually when you need.


If you wish to develop SDL2 applications, get the libraries. Even though we don't statically link against them, having the source at hand is necessary to know the offsets of C struct fields or debug missing definitions.

pacman -S mingw32/mingw-w64-i686-SDL2 
pacman -S mingw32/mingw-w64-i686-SDL2_image
pacman -S mingw32/mingw-w64-i686-SDL2_mixer
pacman -S mingw32/mingw-w64-i686-SDL2_ttf


Verify installation.

cd $HOME/logiqub/demo
run ascii.qub

cd tetris                       # SDL2
run main.qub

Execution

Find demos and tutorials showcasing the capabilities of the logiqub at the play page.

Documentation

To learn about the underlying system, its philosophy based of the Forth language and other materials that may help you build your own system, you can check the learn page.

Support

If you like this software, want to share ideas or have features added to it, please let me know at logiqub@gamil.com.

Additionally, on the share page, you will find a donate link.