From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from tb-mx0.topicbox.com (localhost.local [127.0.0.1]) by tb-mx0.topicbox.com (Postfix) with ESMTP id E3FF71FF3888 for <9fans@9fans.net>; Sat, 4 Apr 2020 17:37:56 -0400 (EDT) (envelope-from newton688@gmail.com) Received: from tb-mx0.topicbox.com (localhost [127.0.0.1]) by tb-mx0.topicbox.com (Authentication Milter) with ESMTP id B1DF6E10644; Sat, 4 Apr 2020 17:37:56 -0400 ARC-Seal: i=1; a=rsa-sha256; cv=none; d=topicbox.com; s=arcseal; t= 1586036276; b=vkBt2NMn+2Gq8hSsUfr6MyQ1ALbdoRgt7U4W5syZcR7WRoFxBi TR/DhJyIFfH49lLc5U7HViJ2vt92qZO4hMYZxwN2BvtG+SpKZbp/H9QuvUsrT0kR bzjvRAy8lP58Wssy8z4KPxANcukRXNVMX2UMJuLc9j7HI0gU8O3iL9pwjgHmEcL8 88mxZHIZz2uEqsMV2E9DOOo1kfzu5jLvMGiFqz4EDVJ9vv2GPv7sri0fsV7D+5GP 3skbxWeLz8oTQAn7QxTTN8nk1nnsVCETXAGXFTCEJb3td/yizIrjv0b7SxQDEzpR s8LXHJGXgG1RqapaOnw7Sxgv850Ae07CViTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=mime-version:references:in-reply-to:from:date :message-id:subject:to:content-type; s=arcseal; t=1586036276; bh=xo9Okmipu3QQ2Pf96ZfDWYj4DlzYKYGFhITRjB0sUOE=; b=CL2sox+QM2GS gqS1gqiLT9TX2VtdaE3G39smuCALMAUlv37S71sAeSOgfd+PqaT54fxmSkxTW/cX PEqG9xmwyMrx1GNgahZVn556R8uWG4gcbgVGbUbPesAM5eQVnvtYbGWVwWYwCzPp 3pUCUOrzlnyzQbzbYQtrhoQopRjPF18+MXpQBS5zhYP9Qctk9327Ho3H/R6/ADWt wELaM8ITLKkIIxh2eBpf2C2e36xysIHjA4y7aqn3NfN1RkSXOS5I4eUy5AaLMq90 PGCK29aoU8F15VLWjPwn3W4IdsOdYXIDaF1LHaWSbe6646e6sAbREuvNgm9/Zjb+ biX/UhQOpg== ARC-Authentication-Results: i=1; tb-mx0.topicbox.com; arc=none (no signatures found); bimi=none (Domain is not BIMI enabled); dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=FdEesiPm header.a=rsa-sha256 header.s=20161025 x-bits=2048; dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=gmail.com; iprev=pass smtp.remote-ip=209.85.219.49 (mail-qv1-f49.google.com); spf=pass smtp.mailfrom=newton688@gmail.com smtp.helo=mail-qv1-f49.google.com; x-aligned-from=pass (Address match); x-google-dkim=pass (2048-bit rsa key) header.d=1e100.net header.i=@1e100.net header.b=UK+PoXpk; x-ptr=pass smtp.helo=mail-qv1-f49.google.com policy.ptr=mail-qv1-f49.google.com; x-return-mx=pass header.domain=gmail.com policy.is_org=yes (MX Records found: alt1.gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com,alt4.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com); x-return-mx=pass smtp.domain=gmail.com policy.is_org=yes (MX Records found: alt1.gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com,alt4.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com); x-tls=pass smtp.version=TLSv1.2 smtp.cipher=ECDHE-RSA-AES256-GCM-SHA384 smtp.bits=256/256; x-vs=clean score=0 state=0 Authentication-Results: tb-mx0.topicbox.com; arc=none (no signatures found); bimi=none (Domain is not BIMI enabled); dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=FdEesiPm header.a=rsa-sha256 header.s=20161025 x-bits=2048; dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=gmail.com; iprev=pass smtp.remote-ip=209.85.219.49 (mail-qv1-f49.google.com); spf=pass smtp.mailfrom=newton688@gmail.com smtp.helo=mail-qv1-f49.google.com; x-aligned-from=pass (Address match); x-google-dkim=pass (2048-bit rsa key) header.d=1e100.net header.i=@1e100.net header.b=UK+PoXpk; x-ptr=pass smtp.helo=mail-qv1-f49.google.com policy.ptr=mail-qv1-f49.google.com; x-return-mx=pass header.domain=gmail.com policy.is_org=yes (MX Records found: alt1.gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com,alt4.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com); x-return-mx=pass smtp.domain=gmail.com policy.is_org=yes (MX Records found: alt1.gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com,alt4.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com); x-tls=pass smtp.version=TLSv1.2 smtp.cipher=ECDHE-RSA-AES256-GCM-SHA384 smtp.bits=256/256; x-vs=clean score=0 state=0 X-ME-VSCause: gggruggvucftvghtrhhoucdtuddrgeduhedrtdelucetufdoteggodetrfdotffvucfrrh hofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfurfetoffk rfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpeggfhgjhfffkffuvf gtsegrtderredttdejnecuhfhrohhmpeevhhhrihhsucfotgfivggvuceonhgvfihtohhn ieekkeesghhmrghilhdrtghomheqnecuffhomhgrihhnpegsihhtsghutghkvghtrdhorh hgpdhtohhpihgtsghogidrtghomhenucfkphepvddtledrkeehrddvudelrdegleenucev lhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvtdelrdekhedrvddule drgeelpdhhvghlohepmhgrihhlqdhqvhduqdhfgeelrdhgohhoghhlvgdrtghomhdpmhgr ihhlfhhrohhmpeeonhgvfihtohhnieekkeesghhmrghilhdrtghomhequcfukfgkgfepud duheejje X-ME-VSScore: 0 X-ME-VSCategory: clean Received-SPF: pass (gmail.com ... _spf.google.com: Sender is authorized to use 'newton688@gmail.com' in 'mfrom' identity (mechanism 'include:_netblocks.google.com' matched)) receiver=tb-mx0.topicbox.com; identity=mailfrom; envelope-from="newton688@gmail.com"; helo=mail-qv1-f49.google.com; client-ip=209.85.219.49 Received: from mail-qv1-f49.google.com (mail-qv1-f49.google.com [209.85.219.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tb-mx0.topicbox.com (Postfix) with ESMTPS for <9fans@9fans.net>; Sat, 4 Apr 2020 17:37:56 -0400 (EDT) (envelope-from newton688@gmail.com) Received: by mail-qv1-f49.google.com with SMTP id bp12so5527883qvb.7 for <9fans@9fans.net>; Sat, 04 Apr 2020 14:37:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=xo9Okmipu3QQ2Pf96ZfDWYj4DlzYKYGFhITRjB0sUOE=; b=FdEesiPmuVUacSt2UZP01AnIadYbThlZ/fglRn83riIxY3AQX32qWg8z3+rteaJlwv 0pRgn27JI1P/+WbKTu9wt5LWgcXFb5lZSX4n0laTmTXenPIHwDj++WW45RtlS84gVYyG g8Zv9ff7T4E04OhZYHdYcut/38Qg1GGg4jVXm+9dtbplqzFMdJ4wBnmtHrHO3noa9f8y r96lhz2fKIzuJ3RM9QikAVLFpx7EEnwDwH/bAMXC6hXO/RdLGhdUocfZ9MyHXrHv6BIA DKs7gXVs2eYDeoxtx0i+26+pR2uIO0RsybGzpnY+frJP+7M5b3w7ysMR1eba6lVp9303 MkUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=xo9Okmipu3QQ2Pf96ZfDWYj4DlzYKYGFhITRjB0sUOE=; b=UK+PoXpkLD8l+YIv7qMeCEH234yeJq/bSIry0VH0EVe7a3KHjLmuyMSPY5zZNtG3q2 qEok1u4EwTjudgsW8U0y4Kxb/z42uYBaqevmKlJ0neTYuvSGw2drfPm976EcgRmrWKsT CF5QxLW7bELUaM5kWY0/dvHST90dp242PmJAhjr11j8sdCnzKKJDvwi6+DczACurFJJy gBym+XevujnzZEkeM3qAR6SDXrsLh3yRE6c0TkjPbsYY/Ja/8I0cMHTXK0hygV5cuMGt RnuBLbJZwPgMRcefmr+Ny440YsN/1PHXDOtoosRfpM/1i8lAQ/EtrOUQXFTVYony5RUZ 15Qg== X-Gm-Message-State: AGi0PuZH6oc+r1JlBkJPaTjULDPisfn/NMjqB6rW+vYLPNSjpkr1vLiW GiB/x2uIg/HCiaVDEeMGEmubSUZ5kunUqUr09unCshOtEWc= X-Google-Smtp-Source: APiQypKyyGKg9n6r1hrMJXf+isCegWFjrSS23RF7azhlsTdmIwrhxcfQ9P3lHDhTmEeJvhccpfZeFtDrYyqG1VUSQ2Y= X-Received: by 2002:a1f:5cc5:: with SMTP id q188mr10291314vkb.73.1586036274703; Sat, 04 Apr 2020 14:37:54 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Chris McGee Date: Sat, 4 Apr 2020 17:37:42 -0400 Message-ID: Subject: Re: [9fans] a simple graphical application in Go? To: 9fans <9fans@9fans.net> Content-Type: multipart/alternative; boundary="000000000000c1301c05a27dd8f0" Topicbox-Policy-Reasoning: allow: sender is a member Topicbox-Message-UUID: 90d76860-76bc-11ea-b0ff-f4d79df697fc --000000000000c1301c05a27dd8f0 Content-Type: text/plain; charset="UTF-8" You can try this Go library by mischief and some examples in the cmd package: https://bitbucket.org/mischief/draw9/src/default/ Last I recall, it worked fine on 9front. I'm not sure about the other variants. Cheers, Chris On Sat, Apr 4, 2020 at 9:54 AM Kim Lassila wrote: > Has anyone written a graphical application in Go on Plan 9? How would the > Go equivalent of black.c (thank you fgb) look like? > > - - - clip - - - > > #include > #include > #include > > void > main(int, char *argv[]) > { > Rectangle rect; > Image *black; > > fmtinstall('R', Rfmt); > if(initdraw(nil, nil, argv[0]) < 0) > sysfatal("initdraw: %r"); > rect = screen->r; > black = display->black; > draw(screen, rect, black, nil, ZP); > flushimage(display, 1); > sleep(5 * 1000); > closedisplay(display); > print("rectangle was %R\n", rect); > exits(nil); > } > > *9fans * / 9fans / see discussions > + participants > + delivery options > Permalink > > --000000000000c1301c05a27dd8f0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
You can try this Go library by mischief and some exam= ples in the cmd package:

Last I recall, it worked fine on 9front. I'm = not sure about the other variants.

Cheers,
Chris

On Sat, Apr 4, 2020 at 9:54 AM Kim Lassila <kim.lassila@gmail.com> wrote:
=
Has anyone written a graphical application in Go=C2= =A0on Plan 9? How would the Go equivalent of black.c (thank you fgb) look l= ike? =C2=A0

- - - clip - - -

#include <u.h>
#include <libc.h>
#include <draw.h>=

<= /div>
void
main(int, char *argv[])
{
Rectangle rect;
Image *bl= ack;
<= /span>
fmtinstall('R', Rfmt);
<= /span>if(initdraw(nil, nil, argv[0]) < 0)
sysfat= al("initdraw: %r");
rect =3D screen->r;=
black =3D display->black;
draw(screen, rect, black, nil, ZP);
flushimage(disp= lay, 1);
sleep(5 * 1000);
closedisplay(display);
print("rectangle was %R= \n", rect);
exits(nil);
}

--000000000000c1301c05a27dd8f0--