https://github.com/objectionary/eo-sys
EO Objects Interacting with Operating System Level
https://github.com/objectionary/eo-sys
eolang java syscall
Last synced: 8 months ago
JSON representation
EO Objects Interacting with Operating System Level
- Host: GitHub
- URL: https://github.com/objectionary/eo-sys
- Owner: objectionary
- License: mit
- Archived: true
- Created: 2022-07-22T14:01:08.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-08-14T09:04:13.000Z (over 1 year ago)
- Last Synced: 2025-03-16T00:27:30.854Z (10 months ago)
- Topics: eolang, java, syscall
- Language: Java
- Homepage:
- Size: 177 KB
- Stars: 5
- Watchers: 2
- Forks: 3
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README

[](https://www.elegantobjects.org)
[](http://www.rultor.com/p/objectionary/eo-sys)
[](https://www.jetbrains.com/idea/)
[](https://github.com/objectionary/eo-sys/actions/workflows/mvn.yml)
[](http://www.0pdd.com/p?name=objectionary/eo-sys)
[](https://codecov.io/gh/objectionary/eo-sys)
[](https://maven-badges.herokuapp.com/maven-central/org.eolang/eo-sys)
[](https://hitsofcode.com/view/github/objectionary/eo-sys)

[](https://github.com/objectionary/eo-sys/blob/master/LICENSE.txt)
**This repository is deprecated! We've moved all EO objects from this repository
to [objectionary/eo](https://github.com/objectionary/eo).**
[EO](https://www.eolang.org) objects for interactions with operating system.
This is how you make a [`write`](https://man7.org/linux/man-pages/man2/write.2.html)
[syscall](https://man7.org/linux/man-pages/man2/syscall.2.html)
to print "Hello, world" to the console (here `1` is the handle of
[stdout](https://en.wikipedia.org/wiki/Standard_streams)):
```
[] > app
"Hello, world!" > msg
QQ.sys.call > @
"write"
1
msg
msg.length
```
This is how you get the current process ID using
[`getpid`](https://man7.org/linux/man-pages/man2/getpid.2.html):
```
[] > 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:
```bash
$ mvn clean install -Pqulice
```
You will need Maven 3.3+ and Java 8+.