www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 15040] New: showcase curl example doesn't run


          Issue ID: 15040
           Summary: showcase curl example doesn't run
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: minor
          Priority: P1
         Component: dlang.org
          Assignee: nobody puremagic.com
          Reporter: jansen.gerald gmail.com

The sample program on the home page that demonstrates curl+json gives this
error message when the "Run" button is clicked: 

Compilation output: (9 Killed)

This doesn't make a very good impression for a casual visitor.

// D is like...
pragma(lib, "curl");
import std.functional, std.json, std.net.curl, std.stdio;

alias getJSON = pipe!(get, parseJSON);

void main()
    auto json = getJSON(
    writefln("So, basically D is like a %s for %s",
        json["this"].str, json["that"].str);

Sep 11 2015