Giter Site home page Giter Site logo

eo-sys's Introduction

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+.

eo-sys's People

Contributors

graur avatar maxonfjvipon avatar mximp avatar renovate[bot] avatar rultor avatar yegor256 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

eo-sys's Issues

pom.xml:254-260: Turn on duplicate finder. For some...

The puzzle 71-a345f49f from #71 has to be resolved:

eo-sys/pom.xml

Lines 254 to 260 in 97b8c01

@todo #71:30min Turn on duplicate finder. For some reason
qulice fails on github actions with "Found duplicate (but
equal) resources in [net.java.dev.jna:jna:5.13.0,
org.eolang:eo-sys:1.0-SNAPSHOT] :
com/sun/jna/darwin-x86-64/libjnidispatch.jnilib". See:
https://github.com/objectionary/eo-sys/actions/runs/5532201228/jobs/10093939487.
Need to figure it out and remove "exclude" line below

The puzzle was created by @maxonfjvipon on 12-Jul-23.

Estimate: 30 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

Usage in another repository

@mximp I started this test in another repository and it failed:

+alias org.eolang.hamcrest.assert-that
+architect [email protected]
+home https://github.com/objectionary/eo
+junit
+package org.eolang.threads
+version 0.0.0

[] > get-time-of-day
  gt. > @
    QQ.sys.call
      "gettimeofday"
    0

and get

[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.012 s <<< FAILURE! - in EOorg.EOeolang.EOthreads.EOget_time_of_day_testTest
[ERROR] EOorg.EOeolang.EOthreads.EOget_time_of_day_testTest.testWorks  Time elapsed: 0.006 s  <<< ERROR!
org.eolang.ExFailure: Can't #copy() package object 'org.eolang.sys.call'
        at org.eolang.PhPackage.copy(PhPackage.java:108)

Is it possible to use it now in foreign repository?

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/codecov.yml
  • actions/checkout v4
  • actions/setup-java v4
  • actions/cache v3
  • codecov/codecov-action v4
  • ubuntu 22.04
.github/workflows/mvn.yml
  • actions/checkout v4
  • actions/setup-java v4
  • actions/cache v3
.github/workflows/pdd.yml
  • actions/checkout v4
  • ubuntu 22.04
.github/workflows/xcop.yml
  • actions/checkout v4
  • ubuntu 22.04
maven
pom.xml
  • com.jcabi:parent 0.66.0
  • org.eolang:eo-runtime 0.32.0
  • net.java.dev.jna:jna 5.14.0
  • net.java.dev.jna:jna-platform 5.14.0
  • org.junit.jupiter:junit-jupiter-api 5.9.3
  • org.junit.jupiter:junit-jupiter-engine 5.9.3
  • org.slf4j:jul-to-slf4j 2.0.9
  • org.slf4j:slf4j-api 2.0.9
  • ch.qos.logback:logback-classic 1.4.14
  • net.java.dev.jna:jna 5.14.0
  • net.java.dev.jna:jna-platform 5.14.0
  • org.apache.maven.plugins:maven-compiler-plugin 3.8.1
  • org.eolang:eo-maven-plugin 0.32.0
  • com.qulice:qulice-maven-plugin 0.22.0

  • Check this box to trigger a request for Renovate to run again on this repository

Any syscall should work with this object

At the moment, only a few syscalls are supported. An arbitrary syscall will lead to an error, because it may either return a pointer to a structure in memory, which we don't support, or may expect such a structure as an argument. Let's make this library more flexible. For example, this syscall should work out of the box:

int getfsstat(user_addr_t buf, int bufsize, int flags);

Like this:

ram 100 > buf
QQ.sys.call
  "getfsstat"
  buf
  100
  0

uname.eo:31-33: Current implementation of uname method...

The puzzle 10-68261936 from #10 has to be resolved:

# @todo #10:30min Current implementation of uname method uses java.
# This object can be implementet by EO. But for now it is impossible
# due to failed build on Windows.

The puzzle was created by @Graur on 15-Mar-23.

Estimate: 30 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

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.