Giter Site home page Giter Site logo

cl-flow's Introduction

cl-flow's People

Contributors

borodust 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

cl-flow's Issues

Some systems failed to build for Quicklisp dist

Building with SBCL 2.1.10 / ASDF 3.3.5 for quicklisp dist creation.

Trying to build commit id bb95fda

cl-flow fails to build with the following error:

; caught WARNING:
;   * is not permitted as an argument to the FUNCTION type specifier
; 
; caught WARNING:
;   * is not permitted as an argument to the FUNCTION type specifier
...
Unhandled UIOP/LISP-BUILD:COMPILE-FILE-ERROR in thread #<SB-THREAD:THREAD "main thread" RUNNING {1001C08103}>: COMPILE-FILE-ERROR while compiling #<CL-SOURCE-FILE "cl-flow" "context">

cl-flow/tests fails to build because of a failure in cl-flow.

Full log here

Implement *> operator

*> operator will intercept conditions unhandled in the -> blocks.

Usage gonna be somewhat like this:

(>> (-> :tag ()
      (error "must be raised here"))
    (-> :tag ()
      (normal-op))
    (*> :tag (e)
      ;; process condition raised in the first form skipping second form
      ;; return value that next form must be able to consume or rethrow?
      (process-condition e))
    (-> :tag (arg)
      (consume-result-of-normal-op arg)))

Incorrect flow elements

If, for example, function used in a place where a flow element must be, but doesn't represent a correct flow callback, unobviuos things happen. Condition raised in runtime won't provide much useful information to find a culpirt in this case.

(>> (function-returning-flow)                   ; ok
    (function-returning-neither-flow-nor-list)) ; hard-to-locate error

That's a programming error, but hard to catch atm. Some checks need to be added.

Aliases for operators

Put your suggestions here.

Winning variants:
-> - flow:atomically
~> - flow:concurrently
>> - flow:serially
->> - flow:dynamically

Destructure block arguments

If result is received from ~> operator, it uses ((fn-0-values) (fn-1-values) ... ) format, which can be bound to next block by (-> :tag (v0 v1 ... ) ... ) where v0 and v1 gonna be lists. We probably should allow simple destructuring to simplify user's burden, e.g.:

(>> (~> (-> :a () 1)
        (-> :b () 2)
        (-> :c () 3))
    (-> :tag ((a) (b) (c))
      (= 6 (+ a b c))))

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.