Giter VIP home page Giter VIP logo

bento's People

Contributors

elliotchance avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

forkkit

bento's Issues

Structures

declare person is composite of first-name is text, last-name is text

Arrays

declare names is array of text

Inline if can be on multiple lines

Allow a comma to be followed by a new line, like:

    If it is the afternoon,
        display "Good afternoon, {persons-name}!",
        otherwise display "Good morning, {persons-name}!"

String substitutions

Say hello to persons-name (persons-name is text):
    display "Good afternoon, {persons-name}!"

Can Bento be used with something like Bash Shell scripts

Bento looks really interesting...

Can Bento be used with something like Bash Shell scripts?

What I mean is can Bento call a Bash script
or
Can a Bash script call a Bento program?

Or is that what "a backend" is about?

A backend is program controlled by bento. A backend can be any program (compiled or interpreted) that implements the bento protocol on the port specified on the BENTO_PORT environment variable.

If Bash can be used could you give an example of calling a Bash script and perhaps returning a "value" from the script?

thanks
brian

Question sentences

Start:
  Declare I is number

  Until I reached limit, display I

Counter reached limit (counter is number)?
  If counter = 10, yes, otherwise no

Error handling

Still trying to work out what error handling will look like, here is a rough idea:

start:
    declare last-order-date is text

    # one line
    try to fetch last order date into last-order-date, on no-orders set last-order-date to "unknown", on missing-order display error-message, always display "Fetched order date"

    # one line with better spacing
    try to fetch last order date into last-order-date,
        on no-orders set last-order-date to "unknown",
        on missing-order display error-message,
        always display "Fetched order date"

    # multiline
    try
        fetch last order date into last-order-date
        display "Fetched order date"
    catch no-orders, set last-order-date to "unknown"
    catch missing-order do
        display error-message
    end

fetch last order date into dest (dest is text):
    raise error no-orders
    raise error missing-order with the message "Where did it go?"

Formatter

bento format to format files like go fmt works.

Binary expressions

if (foo = 123) and (bar != “baz”), ...

Conditions must be in parenthesis. This means we don’t have to worry about operator precedence and it’s more explicit so it’s much easier to parse and understand.

do ... end

These are used in decisions and loops for a block of statements.

Dictionaries

declare scores as dictionary of text to number

Unless

Unless works the same way as if but inverts the condition.

declare should not be mistaken for a sentence

If the grammar of a declare is incorrect it will be treated like a normal sentence, which it shouldn't.

Likewise, no sentence is allowed to be defined with the first word as "declare".

Blackhole variable

Sometimes we want to discard the value when calling, like:

run system command "echo hi" output into _ status code into echo-result

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.