Code Monkey home page Code Monkey logo

razcal's Introduction

razcal

a cross platfrom desktop app framework written in Nim


A bit history

If you come here, you should already know something about electron, a big desktop app framework written in C++. Perhaps you also know CEF, electron minus node.js.

Well, I used them both in the past, and some of my project still depend on earlier version of CEF, but they grow up immensely, adding much features I don't need at all. Building the binary myself already a nightmare, removing unneeded features is worse.

Then I stumbled upon Layx, a layout language written in javascript. Then I thought, hey, why not we have something like electron/CEF, but lightweight and hackable. And of course, don't use xml-like whatsoever for the layout, we already have too much xml-like language to describe GUI.

That is how razcal idea was born, written in Nim, using Layx inspired layout language, scripted by MoonScript on top of Lua vm. Currently using kiwi as it's constraint solver algorithm. Thanks to Nim powerful metaprogramming feature, binding to Lua is easy, razcal use nimLUA to automate binding process interleaved with hand coded glue code.

You might be tempted to say this is an overly ambitious project. Using new emerging language like Nim and MoonScript, plus a home brew layout language, what kind of hybrid mutant razcal will be?

I will be nice, you can choose what component to be included in your final executable, you can add more functionality either using Nim, Lua, or MoonScript as a module. It already and always be easy to build.

Interesting facts

  • The main language to develop razcal is Nim, it has indentation significant syntax.
  • MoonScript provides a clean syntax using significant whitespace that avoids all the keyword noise typically seen in a Lua script.
  • razcal Layout Language, being inspired by Layx, also has significant whitespace syntax.

And I'm thinking to use Yaml as configuration script, which is also use indentation based syntax. Python?, hmm....., the standard Python is too big, perhaps MicroPython is more suitable.

Construction phase

The first phase already done. Now we can move to the next construction phase, a lot of work to do:

  • Parser
    • parse more styling syntax
      • text & fonts
      • colors & backgrounds
      • transformations
      • tables
      • input widget
    • parse conditional constraint
    • overflow/scrolling content
    • content size constraint
  • Semantic pass
    • activating more style
    • applying functional constraint
    • applying conditional constraint
    • exposing events to lua
  • API
    • widget geometry
    • anim/hierarchy
    • style
    • events
  • Test
    • conditional compilation system
    • robust test suite for Nim
    • for Lua side
    • automated build system
  • Docs
    • documentation
    • tutorial

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.