August 02, 2012
On Thu, Aug 2, 2012 at 7:53 PM, Walter Bright <walter@digitalmars.com> wrote:
> Can you make a script for me that uploads to the github dmd download page?

http://developer.github.com/v3/repos/downloads/+

Good opportunity to dog-food std.net.curl.

David
_______________________________________________
dmd-beta mailing list
dmd-beta@puremagic.com
http://lists.puremagic.com/mailman/listinfo/dmd-beta

August 02, 2012
On Thu, 02 Aug 2012 10:03:41 -0700
Walter Bright <walter@digitalmars.com> wrote:

> 
> On 8/2/2012 8:56 AM, Steven Schveighoffer wrote:
> > On Aug 2, 2012, at 6:05 AM, Walter Bright wrote:
> >
> >> I sent them an email. Odds are, they'll tell me to use another browser. I'm using the latest IE, but evidently nobody who develops web apps bothers with IE.
> > Only when I get complaints :)  Seriously, though, IE is the *worst* browser to develop for, at least for me.  My CSS book has practically a whole chapter on how to deal with IE oddities.
> >
> 
> 
> Harrumph. It is turning out to be a "github doesn't work with IE" thing. It worked with mozilla running from Linux. This is the second time github has failed with IE, obviously they never test it.

I'm not surprised. GitHub is one of those asinine organizations that *expects* everybody to access the web the way *GitHub* want their users to access it, and it *must* be with the "latest-and-(*cough*)-greatest" browser, ie whatever browsers that *GitHub* determines to be "worthy", and to hell with anyone else. One of the reasons I've come to hate GitHub.

As far as IE troubles - I've done plenty of cross-browser stuff myself,
including supporting IE as far back as *7*, and frankly if you
have a bunch of special IE workarounds in either your HTML/CSS or
anywhere else then *you're doing something wrong* in the first place.
Either you're trying to be pixel-perfect (in a medium that's
*specifically designed* to look different according to the *client*
side) or you're just plain overengineering your HTML/CSS (*very*
common), or doing something stupid like pretending CSS is actually
suitable for layouts (it's *NOT*
- tables OTOH actually *WORK* for layouts, contrary to the hysterical
religious FUD against them), etc.
_______________________________________________
dmd-beta mailing list
dmd-beta@puremagic.com
http://lists.puremagic.com/mailman/listinfo/dmd-beta

August 02, 2012
On 8/2/12 7:06 PM, Nick Sabalausky wrote:
> I'm not surprised. GitHub is one of those asinine organizations that
> *expects* everybody to access the web the way *GitHub* want their users
> to access it, and it *must* be with the
> "latest-and-(*cough*)-greatest" browser, ie whatever browsers that
> *GitHub* determines to be "worthy", and to hell with anyone else. One
> of the reasons I've come to hate GitHub.

I think D owes a big debt to GitHub, and I have all respect for it.

Andrei
_______________________________________________
dmd-beta mailing list
dmd-beta@puremagic.com
http://lists.puremagic.com/mailman/listinfo/dmd-beta

August 02, 2012
On 8/2/2012 4:08 PM, Andrei Alexandrescu wrote:
> On 8/2/12 7:06 PM, Nick Sabalausky wrote:
>> I'm not surprised. GitHub is one of those asinine organizations that
>> *expects* everybody to access the web the way *GitHub* want their users
>> to access it, and it *must* be with the
>> "latest-and-(*cough*)-greatest" browser, ie whatever browsers that
>> *GitHub* determines to be "worthy", and to hell with anyone else. One
>> of the reasons I've come to hate GitHub.
>
> I think D owes a big debt to GitHub, and I have all respect for it.

I agree with that, and I actually have (another) paid account with them.

But, as it is with git itself, it's best not to use it with Windows or any Windows programs.
_______________________________________________
dmd-beta mailing list
dmd-beta@puremagic.com
http://lists.puremagic.com/mailman/listinfo/dmd-beta

August 03, 2012
On Thu, 02 Aug 2012 19:08:49 -0400
Andrei Alexandrescu <andrei@erdani.com> wrote:

> On 8/2/12 7:06 PM, Nick Sabalausky wrote:
> > I'm not surprised. GitHub is one of those asinine organizations that *expects* everybody to access the web the way *GitHub* want their users to access it, and it *must* be with the "latest-and-(*cough*)-greatest" browser, ie whatever browsers that *GitHub* determines to be "worthy", and to hell with anyone else. One of the reasons I've come to hate GitHub.
> 
> I think D owes a big debt to GitHub, and I have all respect for it.
> 

FWIW, I *do* like the features that GitHub, BitBucket, et al provide.
In fact, I agree that stuff's fantastic. It's just GitHub's
implementation I dislike. It's temperamental, ornery and self-absorbed
(the software itself - not a commentary on any people).
_______________________________________________
dmd-beta mailing list
dmd-beta@puremagic.com
http://lists.puremagic.com/mailman/listinfo/dmd-beta

August 03, 2012
On Thu, Aug 2, 2012 at 11:59 AM, David Nadlinger <code@klickverbot.at>wrote:

> On Thu, Aug 2, 2012 at 7:53 PM, Walter Bright <walter@digitalmars.com> wrote:
> > Can you make a script for me that uploads to the github dmd download
> page?
>
> http://developer.github.com/v3/repos/downloads/+
>
> Good opportunity to dog-food std.net.curl.
>
> David
> _______________________________________________
> dmd-beta mailing list
> dmd-beta@puremagic.com
> http://lists.puremagic.com/mailman/listinfo/dmd-beta
>

This is as far as I got before giving up due to libcurl's low level interface (std.net.curl doesn't have a way to upload a file with extra fields, if it did this would have been amazingly simple):

#!/usr/bin/rdmd

import std.stdio, std.net.curl, std.string, std.json, std.conv; import etc.c.curl;

void main(string[] args)
{
    write("GitHub username: ");
    auto username = readln().chomp();

    write("GitHub password: ");
    auto password = readln().chomp();

    write("GitHub repo: ");
    auto repo = readln().chomp();

    write("Description: ");
    auto desc = readln().chomp();

    write("MIME type: ");
    auto mime = readln().chomp();

    auto client = HTTP();
    client.setAuthentication(username, password);

    auto create_url = "https://api.github.com/repos/" ~ username ~ "/" ~
repo
        ~ "/downloads";

    auto create_json = format(
            q"#{ "name": "%s", "size": %d, "description": "%s",
            "content_type": "%s" }#",
            args[1], File(args[1]).size(), desc, mime);
    auto create_response = post(create_url, create_json, client);
    auto cj = parseJSON(create_response);

    Curl curl;
    curl.initialize();
    curl.set(CurlOption.url, cj["s3_url"].str);


    // missing from etc.c.curl
    enum CURLFORM_COPYNAME = 1;
    enum CURLFORM_COPYCONTENTS = 4;
    enum CURLFORM_FILE = 10;
    enum CURLFORM_CONTENTTYPE = 14;
    enum CURLFORM_END = 17;

    curl_httppost *post=null;
    curl_httppost *last=null;
    void formadd(string key, string value) {
        curl_formadd(&post, &last, CURLFORM_COPYNAME, key.toStringz(),
                CURLFORM_COPYCONTENTS, value.toStringz(), CURLFORM_END);
    }
    formadd("key",                   cj["path"].str);
    formadd("acl",                   cj["acl"].str);
    formadd("success_action_status", "201");
    formadd("Filename",              cj["name"].str);
    formadd("AWSAccessKeyId",        cj["accesskeyid"].str);
    formadd("Policy",                cj["policy"].str);
    formadd("Signature",             cj["signature"].str);
    curl_formadd(&post, &last,
            CURLFORM_COPYNAME, "Content-Type",
            CURLFORM_CONTENTTYPE, cj["mime_type"].str.toStringz(),
            CURLFORM_END);
    curl_formadd(&post, &last,
            CURLFORM_COPYNAME, "file",
            CURLFORM_FILE, args[1].toStringz(),
            CURLFORM_END);
    curl_formadd(&post, &last,
            CURLFORM_COPYNAME, "name",
            CURLFORM_COPYCONTENTS, cj["name"].str.toStringz(),
            CURLFORM_END);
    curl.set(CurlOption.httppost, post);
    curl.onProgress = delegate int(size_t dltotal, size_t dlnow, size_t
ultotal,
            size_t ulnow)
    {
        writeln("Progress: uploaded bytes ", ulnow, " of ", ultotal);
        return 0;
    };
    curl.perform();
    curl_formfree(post);
}


August 03, 2012
Walter Bright, el  2 de August a las 18:33 me escribiste:
>
> On 8/2/2012 4:08 PM, Andrei Alexandrescu wrote:
> >On 8/2/12 7:06 PM, Nick Sabalausky wrote:
> >>I'm not surprised. GitHub is one of those asinine organizations that *expects* everybody to access the web the way *GitHub* want their users to access it, and it *must* be with the "latest-and-(*cough*)-greatest" browser, ie whatever browsers that *GitHub* determines to be "worthy", and to hell with anyone else. One of the reasons I've come to hate GitHub.
> >
> >I think D owes a big debt to GitHub, and I have all respect for it.
>
> I agree with that, and I actually have (another) paid account with them.
>
> But, as it is with git itself, it's best not to use it with Windows or any Windows programs.

Then, even Microsoft use it :P http://git-scm.com/#companies-projects

--
Leandro Lucarella (AKA luca)                     http://llucax.com.ar/
----------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------
According to several sources
Dr. Harvey Kellogg tried to make a cure for masturbation
When he made cornflakes
_______________________________________________
dmd-beta mailing list
dmd-beta@puremagic.com
http://lists.puremagic.com/mailman/listinfo/dmd-beta

August 03, 2012

On Aug 03, 2012, at 12:38 PM, Leandro Lucarella <luca@llucax.com.ar> wrote:

> Then, even Microsoft use it :P http://git-scm.com/#companies-projects

You know they do work on other operating systems than Windows. For example, they have Office for Mac OS X. I'm pretty sure they contribute to the Linux kernel and so on.

--
/Jacob Carlborg

August 03, 2012
Jacob Carlborg, el  3 de August a las 11:46 me escribiste:
>
>
> On Aug 03, 2012, at 12:38 PM, Leandro Lucarella <luca@llucax.com.ar> wrote:
>
> >Then, even Microsoft use it :P http://git-scm.com/#companies-projects
>
> You know they do work on other operating systems than Windows. For example, they have Office for Mac OS X. I'm pretty sure they contribute to the Linux kernel and so on.

If you follow the link, that's the ASP.NET framework they are using Git on, a framework that I think is supposed to work and be developed on Windows (among other operating systems).

And I was about to say that I doubt they contribute to the Linux kernel,
but before making stupid remarks I thought I'd better check. And luckily
I did, because they do :P
http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux.git&a=search&h=HEAD&st=author&s=microsoft

--
Leandro Lucarella (AKA luca)                     http://llucax.com.ar/
----------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------
TRABAJADORAS DEL SEXO ADHIEREN AL PARO...
	-- Crónica TV
_______________________________________________
dmd-beta mailing list
dmd-beta@puremagic.com
http://lists.puremagic.com/mailman/listinfo/dmd-beta
August 03, 2012
On Aug 2, 2012, at 9:33 PM, Walter Bright wrote:

> But, as it is with git itself, it's best not to use [github] with Windows or any Windows programs.

Firefox is a windows program, no?

Kind of like being upset that github doesn't support Visual Source Safe because that's the "Windows" tool?

I suppose it's not really the same, since visual source safe doesn't come with Windows, but still... you went through the trouble of installing git, why wouldn't you consider installing another browser just for github access?  Seems like it would be easier than dealing with half-assed support from github.

I have opera installed on my computer just to read the D newsgroups.  I don't use it as a browser.  I just think of it as my D newsgroup tool.

Just saying...

Oh, and there's also http://windows.github.com/  Seems like they've done a lot of work since the first release, maybe it's less buggy.

Also just noticed there's an iPhone app!  cool, must install now.

-Steve
_______________________________________________
dmd-beta mailing list
dmd-beta@puremagic.com
http://lists.puremagic.com/mailman/listinfo/dmd-beta