Skip to content

Commit

Permalink
Rename FetchFail to ReadFail. Document running in Docker.
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyash committed Feb 4, 2017
1 parent 403bbff commit d4671d8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/bootstrap.ngs
Expand Up @@ -18,7 +18,7 @@ TEST Exception(Exception()).cause is Exception

{
type NotImplemented; NotImplemented.inherit(Exception);
type FetchFail; FetchFail.inherit(Exception);
type ReadFail; ReadFail.inherit(Exception);
type RequreFail; RequreFail.inherit(Exception);
type MainFail; MainFail.inherit(Exception);
}
Expand Down Expand Up @@ -85,7 +85,7 @@ F read(fname:Str) {
c_close(fd)
data[1]
} catch(e) {
throw FetchFail(e)
throw ReadFail(e)
}
}

Expand Down
15 changes: 13 additions & 2 deletions readme.md
Expand Up @@ -45,8 +45,19 @@ The language feels (to me) like a mix of Python, bash and a bit less Ruby and Pe
* Demo 3: [demonstrates race condition](bin/locks.ngs) and locks.


Running
=======
Running using docker
====================

# Build the docker
docker build -t ngs
# Run the container
docker run -it --rm ngs
# Use NGS inside the container
ngs -pi 'sum(0..10)'


Compile and run
===============

sudo apt-get install uthash-dev libgc-dev libffi6 libffi-dev libjson-c2 libjson-c-dev peg libpcre3-dev make
sudo type awk || sudo apt-get install gawk
Expand Down
2 changes: 1 addition & 1 deletion vim/syntax/ngs.vim
Expand Up @@ -18,7 +18,7 @@ syn keyword ngsKeyword A B C and break breaks catch collector collect cond conti
syn keyword ngsConditional if then else
syn keyword ngsRepeat for
" bootstrap types
syn keyword ngsType NotImplemented FetchFail RequreFail MainFail
syn keyword ngsType NotImplemented ReadFail RequreFail MainFail
" other types
syn keyword ngsType Any ArgvMatcher ArgvMatcherDecorator Arr ArrIter ArrLike BasicType Bool Box CLib Closure Command ConstIter Counter CSym DelimStr Eachable Eachable1 Eachable2 EmptyBox ExclusiveRange ExecutableNotFound FFI FullBox Fun Hash HashIter HashLike InclusiveRange Int Iter KillFail KV NormalType NormalTypeInstance Null Path Pipe PipeCreateFail Process ProcessFail Range RangeIter Real Seq Stats Str Table TableMeta TableMetaNotIfCol TtyCheckFail Type
syn keyword ngsType AssertFail ArgsMismatch CException EmptyArrayFail Error Exception CompileFail DontKnowHowToCall GlobalNotFound ImplNotFound InternalError LookupFail KeyNotFound StackDepthFail
Expand Down

0 comments on commit d4671d8

Please sign in to comment.