Giter Club home page Giter Club logo

curl.jl's People

Contributors

iainnz avatar pauladam avatar stuinzuri avatar westleyargentum avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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

curl.jl's Issues

Info about upcoming removal of packages in the General registry

As described in https://discourse.julialang.org/t/ann-plans-for-removing-packages-that-do-not-yet-support-1-0-from-the-general-registry/ we are planning on removing packages that do not support 1.0 from the General registry. This package has been detected to not support 1.0 and is thus slated to be removed. The removal of packages from the registry will happen approximately a month after this issue is open.

To transition to the new Pkg system using Project.toml, see https://github.com/JuliaRegistries/Registrator.jl#transitioning-from-require-to-projecttoml.
To then tag a new version of the package, see https://github.com/JuliaRegistries/Registrator.jl#via-the-github-app.

If you believe this package has erroneously been detected as not supporting 1.0 or have any other questions, don't hesitate to discuss it here or in the thread linked at the top of this post.

README suggests git clone, but Pkg.add does that for you

In the README I am advised to run:

cd ~/.julia/; git clone https://github.com/forio/Curl.jl.git Curl

But then the later install instructions fail:

julia> Pkg.update(); Pkg.add("Curl"); using Curl
Branch devel set up to track remote branch devel from origin.
Already up-to-date.
MESSAGE: Installing Curl v0.0.1
 in anonymous at no file:163
ERROR: Path Curl already exists! Please remove to allow installation.
 in _resolve at pkg.jl:378
 in anonymous at no file:163
 in cd at file.jl:25
 in cd_pkgdir at pkg.jl:42
 in add at pkg.jl:143
 in add at pkg.jl:175

The solution was to delete the repo and only run:

julia> Pkg.update(); Pkg.add("Curl"); using Curl

Illegal instruction error

julia> using Curl
julia> Curl.get("http://jsonip.com")
--Process exits--
Illegal instruction

Is this because I don't have libcurl? I didn't install this as a package either. Just git cloned and ran Julia.

WARNING: Curl.jl has been deprecated. m ERROR: error compiling get:...

           _

_ _ ()_ | A fresh approach to technical computing
() | () () | Documentation: http://docs.julialang.org
_ _ | | __ _ | Type "help()" for help.
| | | | | | |/ ` | |
| | |
| | | | (
| | | Version 0.4.0-dev+2847 (2015-01-21 18:34 UTC)
/ |_'|||__'| | Commit fc61385 (28 days old master)
|__/ | x86_64-w64-mingw32

julia> Pkg.update()
INFO: Updating METADATA...
INFO: Updating cache of StatsBase...
INFO: Updating LinearAlgebra...
INFO: Computing changes...
INFO: Upgrading StatsBase: v0.6.11 => v0.6.12

julia> Pkg.add("Curl")
INFO: Cloning cache of Curl from git://github.com/forio/Curl.jl.git
INFO: Installing Curl v0.0.3
INFO: Package database updated

julia> using Curl

WARNING: deprecated syntax "{a=>b, ...}" at C:\Users\SAMSUNG2.julia\v0.4\Curl\src\Curl.jl:15.
Use "Dict{Any,Any}(a=>b, ...)" instead.

WARNING: deprecated syntax "{a=>b, ...}" at C:\Users\SAMSUNG2.julia\v0.4\Curl\src\Curl.jl:113.
Use "Dict{Any,Any}(a=>b, ...)" instead.
WARNING: Curl.jl has been deprecated. Please check out Requests.jl (http://github.com/loladiro/Requests.jl) for al
l your HTTP client needs.

julia> using JSON

julia> Curl.get("http://jsonip.com").text
ERROR: error compiling get: error compiling setup_curl: error compiling curl_version: could not load module libcur
l: no error

julia>

Obligatory Promises Request

Since promises are apparently cool right now, I feel like I should raise this issue.

We shouldn't really have blocking HTTP requests. Can we have the verbs return a promise object, such that I can do:

Curl.get("http://jsonip.com").then((res) -> println(res.text))

Then would take three arguments: onResolved, onError, and onProgress.

I would express it like this:

type Promise
    then::Function
    resolved_callbacks::Vector
    rejected_callbacks::Vector
    progress_callbacks::Vector
    resolve::Function
    reject::Function
    progress::Function

    function then(on_resolved, on_error, on_progress)
        # push callbacks into queues
    end

    function resolve(value)
        # if no handlers left return
        # shift handler off queue
        # invoke handler with value
        # recurse
    end

    function reject(error)
        # if no handlers left return
        # shift handler off queue
        # invoke handler with value
        # recurse
    end

    function progress(value)
        # if no handlers left return
        # shift handler off queue
        # invoke handler with value
        # recurse
    end

    function Promise()
        new(then, [], [], [], resolve, reject, progress)
    end

end

get = function (url)
    promise = Promise()

    on_complete(data) = promise.resolve
    on_error(error) = promise.reject
    on_progress(data) = promise.progress

    do_curl() # with appropriate arguments

    promise;
end

Of course that doesn't allow us to chain then calls, but in general I find chaining to be very difficult in Julia. There may be a way to do it. We could also just pass in handlers as a vector of functions instead of just one function.

Open to other approaches too.

[PackageEvaluator.jl] Your package Curl may have a testing issue.

This issue is being filed by a script, but if you reply, I will see it.

PackageEvaluator.jl is a script that runs nightly. It attempts to load all Julia packages and run their test (if available) on both the stable version of Julia (0.2) and the nightly build of the unstable version (0.3).

The results of this script are used to generate a package listing enhanced with testing results.

The status of this package, Curl, on...

  • Julia 0.2 is 'No tests, but package loads.' PackageEvaluator.jl
  • Julia 0.3 is 'No tests, but package loads.' PackageEvaluator.jl

'No tests, but package loads.' can be due to their being no tests (you should write some if you can!) but can also be due to PackageEvaluator not being able to find your tests. Consider adding a test/runtests.jl file.

'Package doesn't load.' is the worst-case scenario. Sometimes this arises because your package doesn't have BinDeps support, or needs something that can't be installed with BinDeps. If this is the case for your package, please file an issue and an exception can be made so your package will not be tested.

This automatically filed issue is a one-off message. Starting soon, issues will only be filed when the testing status of your package changes in a negative direction (gets worse). If you'd like to opt-out of these status-change messages, reply to this message.

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.