GithubHelp home page GithubHelp logo

kevinnnnqin / oil Goto Github PK

View Code? Open in Web Editor NEW

This project forked from oilshell/oil

0.0 2.0 0.0 19.33 MB

Oil shell

Home Page: http://www.oilshell.org/

License: Other

Makefile 0.42% C 28.02% C++ 1.06% Python 54.28% Shell 8.54% Batchfile 0.01% HTML 0.35% Roff 0.47% Visual Basic 0.01% PLSQL 0.05% M4 0.46% Assembly 1.27% TeX 0.69% Objective-C 4.20% DIGITAL Command Language 0.06% R 0.07% JavaScript 0.04% CSS 0.01%

oil's Introduction

Oil

Build Status

Oil is a new Unix shell. Why Create a New Unix Shell?

This repo contains a bash-compatible shell called OSH, written in Python.

The dialect of bash that is recognized is called the OSH language. The Oil language has been designed but not implemented.

OSH is written in Python, but we deploy a native executable. A subset of the Python-2.7.13/ directory is packaged with the application.

Quick Start for Developers on Linux

Clone the repo, build the Python extension, and run bin/osh.

bash$ build/dev.sh minimal
...
# Now you should have a libc.so symlink in the repository root directory

bash$ bin/osh
osh$ name=world
osh$ echo "hello $name"
hello world

Most shell scripts should run, e.g. with osh myscript.sh.

You can also download the latest release and build it, which is linked from the home page. (This is the only way to try OSH on OS X. Developer builds don't work on OS X.)

Contributing

For information on how to build and test Oil, see Contributing on the wiki.

If you'd like to contribute, please post a message on the #oil-dev channel of oilshell.zulipchat.com. Let us know what you're thinking, or let us know if you're having problems getting started.

The blog has updates on the project status.

Code Overview

Try this to show a summary of what's in the repo and their line counts:

$ metrics/source-code.sh all

(Other functions in this file may be useful as well.)

Directory Structure

# Development Scripts

benchmarks/       # Benchmarks should be run on multiple machines.
metrics/          # Metrics don't change between machines (e.g. code size)
build/            # Build automation
  dev.sh          # For development builds, running CPython
devtools/         # For Oil developers (not end users)
  release.sh      # Documents the release process.
misc/             # Other development scripts
demo/             # Demonstrations of bash/shell features.  Could be
                  # moved to tests/ if automated.
web/              # HTML/JS/CSS for tests and tools

# Tests

test/             # Test automation
  unit.sh         ## Types of test runner: unit, spec, wild, smoke
  spec.sh
  wild.sh
  smoke.sh
  sh_spec.py      # shell spec test framework
testdata/
gold/             # Gold Test cases.
spec/             # spec test cases
  bin/            # tools used in many spec tests
  testdata/       # scripts for specific test cases
  errors/         # TODO: migrate these bad shell scripts

# Oil Code

Python-2.7.13/    # CPython is the initial basis for the Oil VM
asdl/             # ASDL implementation
bin/              # Programs to run (bin/osh)
core/             # Most of the Oil and OSH implementation.
native/           # Native code for Oil, e.g. libc.c
frontend/         # Lexing/Parsing code common to Oil and OSH.
oil_lang/         # Oil language definition.
osh/              # OSH language definition.
opy/              # Python compiler in Python
  lib/            # Common code
  pgen2/          # Parsing library
  compiler2/      # Bytecode compiler
  byterun/        # Metacircular bytecode VM in Python
  gold/           # tests
ovm2/             # A nascent VM to run Oil.  Perhaps a target for
                  # metaprogramming.
pylib/            # Borrowed from the Python standard library.
tools/            # osh2oil translator

# Temporary Directories

_bin/             # Native executables are put here
_build/           # Temporary build files
_devbuild/        # Developer build files not deleted upon 'make clean'
  gen/            # Generated Python and C code
_deps/            # build dependencies like re2c
_tmp/             # Test suites and other temp files
  spec/
  wild/
    raw/
    www/
  osh-parser/
  osh-runtime/
  vm-baseline/
  oheap/
  startup/
  ...
_release/         # Source release tarballs are put here
  VERSION/        # Published at oilshell.org/release/$VERSION/
    benchmarks/
    doc/
    metrics/
    test/
      spec.wwz
      wild.wwz
      ...
    web/          # Static files, copy of $REPO_ROOT/web
      table/

# Docs
doc/              # A mix of docs
README.md         # For Oil developers

LICENSE.txt       # For end users
INSTALL.txt

# End user build system

Makefile
configure
install

Unit tests are named foo_test.py and live next to foo.py.

More info

Right now we're using /r/oilshell on Reddit for general discussion.

I have docs that need to be cleaned up and published. For now, there is a fair amount of design information on the blog at oilshell.org.

oil's People

Contributors

andychu avatar aykamko avatar batmanaod avatar bb010g avatar contrepoint avatar dreamtigers avatar fauxfaux avatar gnprice avatar icarroll avatar jyn514 avatar kbillings avatar lheckemann avatar nicolashahn avatar okayzed avatar rhencke avatar tekknolagi avatar timetoplatypus avatar tyxieblub avatar valpackett avatar wwwaldo avatar yorwba avatar yumaikas avatar

Watchers

 avatar  avatar

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.