All Projects â†’ iAmGio â†’ pikt

iAmGio / pikt

Licence: GPL-3.0 license
🎨 Image-based poetic programming language.

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to pikt

openj9
Eclipse OpenJ9: A Java Virtual Machine for OpenJDK that's optimized for small footprint, fast start-up, and high throughput. Builds on Eclipse OMR (https://github.com/eclipse/omr) and combines with the Extensions for OpenJDK for OpenJ9 repo.
Stars: ✭ 2,973 (+4029.17%)
Mutual labels:  interpreter, jvm
go-jdk
Run JVM-based code in Go efficiently
Stars: ✭ 61 (-15.28%)
Mutual labels:  interpreter, jvm
esoo
Like the Programming Languages Zoo but with esoteric languages.
Stars: ✭ 18 (-75%)
Mutual labels:  interpreter, esoteric-programming-language
Lice
A multi-paradigm programming language running on JVM
Stars: ✭ 120 (+66.67%)
Mutual labels:  interpreter, jvm
Openj9
Eclipse OpenJ9: A Java Virtual Machine for OpenJDK that's optimized for small footprint, fast start-up, and high throughput. Builds on Eclipse OMR (https://github.com/eclipse/omr) and combines with the Extensions for OpenJDK for OpenJ9 repo.
Stars: ✭ 2,802 (+3791.67%)
Mutual labels:  interpreter, jvm
Kivm
🌟This is a pure C++ implementation of Java Virtual Machine (only Java 8 is supported). Inspired by Hotspot In Action.
Stars: ✭ 137 (+90.28%)
Mutual labels:  interpreter, jvm
Mini Jvm
使用 JDK8 实现 JVM(Java Virtual Machine)
Stars: ✭ 568 (+688.89%)
Mutual labels:  interpreter, jvm
LLVM-JVM
[W.I.P] A Just-In-Time Java Virtual Machine written in Haskell
Stars: ✭ 22 (-69.44%)
Mutual labels:  interpreter, jvm
kpspemu
PSP Emulator written in Kotlin for JVM, JS and Native. Can work as PWA.
Stars: ✭ 57 (-20.83%)
Mutual labels:  interpreter, jvm
hello-kotlin-multiplatform
Multiplatform Kotlin Hello World (Android/Java/JavaScript)
Stars: ✭ 64 (-11.11%)
Mutual labels:  jvm
lambda
lambda calculus interpreter
Stars: ✭ 23 (-68.06%)
Mutual labels:  interpreter
gossa
The Go/Go+ Interpreter
Stars: ✭ 53 (-26.39%)
Mutual labels:  interpreter
hes-gallery
Light, dependency free, responsive gallery script
Stars: ✭ 27 (-62.5%)
Mutual labels:  images
ark-java
Library for interacting with an Ark Ecosystem Blockchain using the JVM.
Stars: ✭ 15 (-79.17%)
Mutual labels:  jvm
jni-bind
JNI Bind is a set of advanced syntactic sugar for writing efficient correct JNI Code in C++17 (and up).
Stars: ✭ 42 (-41.67%)
Mutual labels:  jvm
chirp
Interpreter in C for rockstar programing language
Stars: ✭ 20 (-72.22%)
Mutual labels:  interpreter
imgui-java
JNI based binding for Dear ImGui
Stars: ✭ 270 (+275%)
Mutual labels:  jvm
Cosmo
Embeddable scripting language loosely based off of Lua
Stars: ✭ 14 (-80.56%)
Mutual labels:  interpreter
Latte-lang
100% Java compatibility and Functional Programming.
Stars: ✭ 128 (+77.78%)
Mutual labels:  jvm
library-template-jvm
A Kotlin/JVM library template (with a sample project).
Stars: ✭ 46 (-36.11%)
Mutual labels:  jvm

Banner Banner
Download


Ah a language to code by while listening to Pink Floyd - a guy from Reddit

This looks like it belongs on the list of those things I totally want to do if I ever become immortal - another guy from Reddit



Pikt is a pixel-based, Turing complete esoteric programming language that generates fast and lightweight programs out of aesthetically pleasant image sources. Indeed, Pikt's most interesting feature is flexibility: every keyword, statement, function, operator and so on is linked to one - or more - color, which can be easily customized via color schemes.


Video

Pikt compiles executables via the Kotlin compiler, therefore compilation for both JVM and native* targets is available, along with runtime interpretation.

Make sure to check out the wiki to learn how to create your first Pikt program!

* Native support is limited due to the lack of Kotlin/Native libraries and is being discontinued.


Fibonacci
A high-performance Fibonacci sequence algorithm.

Prime numbers
A prime numbers algorithm.

Reverser
A string reverser.

Tree
A tree that prints "A tree!".

These examples use custom color schemes.
Click on the examples for a breakdown/explanation.

Table of contents

Properties

The following properties define parameters needed by Pikt.
Example: java -Dproperty=value -jar pikt.jar -argument.

  • -Dsource source image file;

  • -Doutput output name without extension. It will take source name without extension if not specified;

  • -Dcolors path to the .properties color scheme without extension.
    Default values will be used if not specified (not recommended);

  • -Dtargets compilation targets divided by a comma. Can be jvm, windows, osx or linux. Note that Windows and OSX executables can be generated only on those platforms. No compilation will be executed if not specified;

  • -Dlib path to JAR libraries, including the bundled stdlib.jar file, divided by a comma. If not specified, points by default to ./libraries/stdlib.jar;

  • -Djvmcompiler path to the Kotlin/JVM (kotlinc) executable compiler. Required if target contains jvm or if -interpret is used;

  • -Dnativecompiler path to the Kotlin/Native (kotlinc) executable compiler. Required if target contains a native target;

  • -Dproject optional path to a project info YAML configuration.

  • -Dtask optional task name (defined within a project info configuration) to be executed.

Settings arguments

The following arguments enable settings that affect Pikt's behavior.

  • -interpret runs the generated code via the JVM compiler;

  • -printoutput prints the generated Kotlin code;

  • -nocompile prevents the generation of any executable file;

  • -pixelinfo adds information about pixel coordinates to the output code as comments;

  • -imgoutput=path sets the output file for image-generating commands (see below). If not specified, defaults to the source image path followed by a suffix.

Command arguments

The following arguments execute tasks and exit when completed.

  • -downloadcompiler=type[,version] downloads the zipped Kotlin compiler for the given platform (jvm, windows, macos, linux).
    version defaults to 1.6.10.

  • -createscheme creates a new color scheme with default values.
    It automatically appends library colors too, i.e. as the stdlib scheme, loaded from -Dlib;

  • -exportscheme generates a useful color palette image out of the given color scheme;

  • -recolorize[=method] creates a copy of the source image (that relies on the default scheme) and adapts it to a custom scheme (specified by -Dcolors).
    method defines the way properties with more than one color are handled; it can be either first (default), last or random;

  • -standardize creates a copy of the source image (that relies on a custom scheme) and adapts it to the default scheme;

  • -compact[=size] creates a compacted copy of the source image.
    If size is not specified, it will try to create a square-ish image with no whitespaces.
    size can be defined via w?h?, where both wand h are optional (in case one is missing, it will be calculated the same way as before) (e.g. w10h5, w10, h5);

  • -decompact creates a decompacted copy of the source image with a statement per line;

  • -standardecompact runs -standardize + -decompact;

  • -colorswap=<swaps> swaps colors from the source image.
    swaps is defined as from1:to1,from2:to2,... where from and to are hexadecimal colors.

  • -mask=path creates a masked copy of the source image, loading the mask image from path;

  • -strconvert=string converts a string into a sequence of RGB (grayscale) values supported by Pikt and prints them out.
    See Hello world! for further information.
    For instance, -strconvert="Hello Pikt!" prints:

RGB:  72  101  108  108  111  32  80  105  107  116  33  
      H   e    l    l    o        P   i    k    t    !   
  • -welcome runs -createscheme, -exportscheme (both on colors) and -downloadcompiler=jvm. Its output is already zipped in the downloadable archive.

Commands can be chained. For example, java -Dsource=img.png -Dcolors=scheme -jar pikt.jar -imgoutput=img_new.png -recolorize -compact applies the scheme color scheme to img.png and compacts the output to img_new.png at the same time.

It is possible to overwrite the source image, albeit highly discouraged.

Building

The downloadable archive is already built off the latest GitHub commit. If you wish to build it yourself from source just run mvn clean install.

As a bonus tip, consider setting your run configuration to execute mvn clean install -pl stdlib -am in order to compile the standard library before launching Pikt.
If you are using IntelliJ IDEA consider importing configuration templates from the runConfigurations folder.

Roadmap

Code

  • Variables
  • Constants
  • Function calls (both as part of expressions and standalone)
  • Function definition
  • If / else / if else
  • Lambdas
  • Operators (equality, logical and arithmetic)
  • Loops (for-each + range function for indexed for loop)
  • Try/catch
  • Structs
  • Standard library (2%, see CONTRIBUTING for contribution guidelines)
  • External libraries support (following certain standards, wiki in progress)

Generation

  • Compilation (JVM and Native)
  • Interpretation (JVM)
  • Error handling
  • Runtime information
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].