maxonfjvipon / eo-sys

EO Objects Interacting with Operating System Level

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

logo

EO principles respected here DevOps By Rultor.com We recommend IntelliJ IDEA

mvn PDD status codecov Maven Central Hits-of-Code Lines of code License

EO objects for interactions with operating system.

This is how you make a write syscall to print "Hello, world" to the console (here 1 is the handle of stdout):

[] > app
  "Hello, world!" > msg
  QQ.sys.call > @
    "write"
    1
    msg
    msg.length

This is how you get the current process ID using getpid:

[] > app
  QQ.io.stdout > @
    QQ.txt.sprintf
      "Current PID is %d"
      QQ.sys.call
        "getpid"

This is how you detect what OS you are with:

[] > app
  QQ.io.stdout > @
    QQ.txt.sprintf
      "This is %s"
      switch.
        * 
          QQ.sys.uname.is-windows
          "Windows"
        * 
          QQ.sys.uname.is-unix
          "Unix"
        * 
          QQ.sys.uname.is-macos
          "MacOS"
        * 
          TRUE
          "something else"

How to Contribute

Fork repository, make changes, send us a pull request. We will review your changes and apply them to the master branch shortly, provided they don't violate our quality standards. To avoid frustration, before sending us your pull request please run full Maven build:

$ mvn clean install -Pqulice

You will need Maven 3.3+ and Java 8+.

About

EO Objects Interacting with Operating System Level

License:MIT License


Languages

Language:Java 100.0%