Coder Social home page Coder Social logo

conorobrien-foxx / stacked Goto Github PK

View Code? Open in Web Editor NEW
15.0 4.0 0.0 328 KB

A practical stack-based language with an emphasis on functions.

JavaScript 93.02% HTML 6.07% CSS 0.91%
language stack postfix concatenative programming-language scripting-language

stacked's Issues

Feature request: pattern matching in lambda arguments

Consider the following program:

{ xv yv :
  xv yv #, transpose
  $- #/ $square + map sum sqrt
} @:dist

It takes its arguments as, e.g., (1 2) (3 4) dist. Now, with pattern matching, we could write this as:

{ (x1 y1) (x2 y2) :
  x1 x2 - square y1 y2 - square + sqrt
}

Another example:

{ ((a b) (c d)) :
  a b - c d - +
}

Fix npm installation

Currently, there is no way to automatically install the node packages. The following packs must therefore be installed independently:

  1. clear
  2. readline-sync
  3. minimist

`falsey` problem

The definition for falsey has the following condition (line 626):

    c |= isNaN(tp);

This is true for more than NaN.

On stdin end event

There's online, but no onend --thus, it is hard to find when there is no more data.

Function repetition and application over arguments

Implement *<Func, Decimal>, *<Decimal, Func>, *<Lambda, Decimal>, *<Decimal, Lambda>.

Also, implement, for a func-like f, arr f spread. Equivalent to an infix f(*arr).

For example:

> (3 4) $add spread
(7)

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.