NickSeagull / drahko

🐲 Boost your efficiency: Make your computer work for you

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Boost your efficiency: Make your computer work for you.

Build status Conventional Commits Apache-2.0 license Mergify Status Hintman

Note: Drahko is pre-alpha software, which means that is in development, and it hasn't been thoroughly tested yet

Drahko is a Windows automation framework based on AutoHotkey, a widely used and stable automation solution.

It checks your code for possible errors during compilation, so they don't appear while running your scripts.

Drahko leverages the Idris compiler, in order to generate highly stable and correct AutoHotkey code. Don't go reading the Idris documentation now, everything you need is in the Drahko documentation.

Writing a Hello World application with Drahko goes like this:

import Drahko

main : Promise ()
main = msgBox "Hello world!"

Want to know more? Head over to the documentation site

⌨ Improvements over AutoHotkey

One of the goals of this project is to improve the life of AutoHotkey developers, given that AutoHotkey has nearly no development-time errors, and the runtime ones are silent, making it very difficult to work with.

By generating the code automatically, we free ourselves from AutoHotkey's silent syntax errors, like incorrect calls to subroutines or commands. The Idris typechecker should remove the rest of runtime errors.

In addition to that, Drahko:

  • Allows interacting easily with the terminal, which is something basic in any programming language.
  • Has a dependency manager to install libraries from other users of Drahko
  • Provides a consistent syntax, so you don't have to write MsgBox, % Array%i%[i] anymore, or wonder about the difference between := and =.

πŸ— Building

  1. Follow the steps on how to install Idris dependencies using Stack on the official Idris wiki.

  2. Clone the repo

    git clone git@github.com:NickSeagull/drahko.git
    cd drahko
    
  3. Build the project

    stack exec -- pacman -Sy make
    stack build
    
  4. Download elba and put it in your path

  5. Build the Drahko lib

    stack exec elba build
    
  6. Move all .ibc files from target\lib to lib

  7. Try to compile the example

    stack exec -- idris -i .\target\lib .\examples\HelloWorld.idr --codegen autohotkey -o .\examples\HelloWorld.ahk
    

πŸ™ Acknowledgements

This project is largely based from owickstrom's idris-vimscript, licensed under BSD3 license. Thanks for keeping the repo even though it is not maintained, as it was the key for starting this project.

About

🐲 Boost your efficiency: Make your computer work for you

License:Apache License 2.0


Languages

Language:Haskell 84.9%Language:Idris 14.1%Language:AutoHotkey 1.0%