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 F1C322002947 for <9fans@9fans.net>; Sun, 5 Apr 2020 00:37:30 -0400 (EDT) (envelope-from skip.tavakkolian@gmail.com) Received: from tb-mx0.topicbox.com (localhost [127.0.0.1]) by tb-mx0.topicbox.com (Authentication Milter) with ESMTP id 91DECAA6963; Sun, 5 Apr 2020 00:37:30 -0400 ARC-Seal: i=1; a=rsa-sha256; cv=none; d=topicbox.com; s=arcseal; t= 1586061450; b=g60G44k5whRP3fa3PB6002fzZRa1txjIiC9uigN3HM5qCTKgBa Mzk9a8gr49QuWcZ2BRyS+zv4aZHKYlAq+18cHjnFPENtm9/TOKBmldPywzeOINGd ++Zplb8PdEd9XGxPyRjNc4DKz3V1yemZZPXafpLxgHl0K8C1/I2ofXe7mLk8C+no 6iRDX718yN+GGJTwhXYDamiRD1kRVKbb61GoLJ4SxWrIJjd4f9wYP99pSuxxAjjq av8kNpeiZ9FiD44ZdnoUzkkpFY6zDk4oeW3xDR0b0aah+YNlPciNBEOKCY8CnjDx fn33MXPT42+9rhdJpUplwn9RNxIUB4mnGwfA== 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=1586061450; bh=7lKICNWhmm/JrBkGSF/9KR2XyIYjPWGWoE9UARRoBgg=; b=nZ7D7eZBlsS4 cGgT4Z3Gdmtq0g5YN6iQ+gDioIoHf/Nl5TvV2/igHgKFgN4J1I/V7WIdwDrrZd6i ltH5afHB5OfNqEM2exUKkkYyrwMOPQbhKOb76ugGaci1mOY+IycAT05TRXxc2wRh yb32JD6cqs+VnhagA7ynq4uUoqxbGUOik6+l16N5tn20FPLQNUmsv039oFpsaCCQ wHBrCvRNsTTPJZIpUGs+RXt6qUDR21CE51ADgmbkRr39CXxgLo/W49MhulxcmNrP IQhHmd0R+6zwaI24N4OjQ6zcTcC97nkcKItTzIjK/YR3TIYTZDIv6bYEtix+hS9X u+EX6bIAcQ== 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=CZPhj8WJ 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.221.171 (mail-vk1-f171.google.com); spf=pass smtp.mailfrom=skip.tavakkolian@gmail.com smtp.helo=mail-vk1-f171.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=bdboSV8f; x-ptr=pass smtp.helo=mail-vk1-f171.google.com policy.ptr=mail-vk1-f171.google.com; x-return-mx=pass header.domain=gmail.com policy.is_org=yes (MX Records found: alt3.gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com,alt4.gmail-smtp-in.l.google.com,alt1.gmail-smtp-in.l.google.com); x-return-mx=pass smtp.domain=gmail.com policy.is_org=yes (MX Records found: alt3.gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com,alt4.gmail-smtp-in.l.google.com,alt1.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=CZPhj8WJ 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.221.171 (mail-vk1-f171.google.com); spf=pass smtp.mailfrom=skip.tavakkolian@gmail.com smtp.helo=mail-vk1-f171.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=bdboSV8f; x-ptr=pass smtp.helo=mail-vk1-f171.google.com policy.ptr=mail-vk1-f171.google.com; x-return-mx=pass header.domain=gmail.com policy.is_org=yes (MX Records found: alt3.gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com,alt4.gmail-smtp-in.l.google.com,alt1.gmail-smtp-in.l.google.com); x-return-mx=pass smtp.domain=gmail.com policy.is_org=yes (MX Records found: alt3.gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com,alt4.gmail-smtp-in.l.google.com,alt1.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: gggruggvucftvghtrhhoucdtuddrgeduhedrtdelgdekiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecunecujfgurhepgghfjgfhff fkuffvtgesrgdtreertddtjeenucfhrhhomhepufhkihhpucfvrghvrghkkhholhhirghn uceoshhkihhprdhtrghvrghkkhholhhirghnsehgmhgrihhlrdgtohhmqeenucffohhmrg hinheplehfrghnshdrnhgvthdpghhithhhuhgsrdgtohhmpdhgohhlrghnghdrohhrghdp tggrthdqvhdrohhrghdpthhophhitggsohigrdgtohhmnecukfhppedvtdelrdekhedrvd dvuddrudejudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedv tdelrdekhedrvddvuddrudejuddphhgvlhhopehmrghilhdqvhhkuddqfhdujedurdhgoh hoghhlvgdrtghomhdpmhgrihhlfhhrohhmpeeoshhkihhprdhtrghvrghkkhholhhirghn sehgmhgrihhlrdgtohhmqecuuffkkgfgpedutddtgeel X-ME-VSScore: 0 X-ME-VSCategory: clean Received-SPF: pass (gmail.com ... _spf.google.com: Sender is authorized to use 'skip.tavakkolian@gmail.com' in 'mfrom' identity (mechanism 'include:_netblocks.google.com' matched)) receiver=tb-mx0.topicbox.com; identity=mailfrom; envelope-from="skip.tavakkolian@gmail.com"; helo=mail-vk1-f171.google.com; client-ip=209.85.221.171 Received: from mail-vk1-f171.google.com (mail-vk1-f171.google.com [209.85.221.171]) (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>; Sun, 5 Apr 2020 00:37:30 -0400 (EDT) (envelope-from skip.tavakkolian@gmail.com) Received: by mail-vk1-f171.google.com with SMTP id k63so3091032vka.7 for <9fans@9fans.net>; Sat, 04 Apr 2020 21:37:30 -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=7lKICNWhmm/JrBkGSF/9KR2XyIYjPWGWoE9UARRoBgg=; b=CZPhj8WJqy4p7L2zKtiQki7U2jqQdONuR76nKC4m2CohVZmNFS0ys5jn3EvJTQy7iW jfCdFz5dFEy8vy3Z46hw3lh18anjrHLGAkjrlGgO+GknIO9Fr9ZoeHhV3IMa1CTrSBxC xxf6X2/Qc4nSQdXXVHAp0bLolyT72m98MSCa4DLGnj+ziBISMevRcYTgDjvEAKPcZjGz 5UFdpU6oZPxQ/yk6gKUL9Gr7bx4WX70qAhkeWh+ejJJNW7WE86BPZF963CarPsIZJcxc i2FOmigjltLQ72vuZDK+Nra5MnLU5W7g8mNHbVo1EK/3VgSYWw+VrGI0uZ8fekMx5Uwr BD0w== 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=7lKICNWhmm/JrBkGSF/9KR2XyIYjPWGWoE9UARRoBgg=; b=bdboSV8fck88rmERu8FEBFkFH2NlsVtjId+vIGjvbwqa6jqI7UB7Hfisk3Lca6yYWF 92K9l437S/Iy1vnUF48m6qHySMJmajR1NtyHBcJtUdnx4H6Q8kTZDO3a1z4ESuiXO3v8 +bC9M7lwRYUcOpy6HtcpHLbfl+NhlXpTsyTy32Y+gR/n+ZedqP6kh+mfpAW4OV4/U/xF JocBGH/95A9UecJ48EohW8Z0N9HzvSM9xQA+0q5vjB9wyaY29qke0+oYyhgaw9/qeWxO 5LQJnJB/LiwJiiMFy/D+FTXhPDyslZ/UL1U7NiAGdsfsKmRy8eYnsKd1qly1y6ySAtHI igHQ== X-Gm-Message-State: AGi0PuYAixlk/PgfJfS0yELpeRSjkxzhi/igk9+vcT6Vp+Wqy8h1z01A LlUrOdBo/JnO5rb+sok3RNQhy0pw04Fi5j45RoK9Lt6J X-Google-Smtp-Source: APiQypKqRjhprq3KnLRGtqwvmm33pvR59Q0Dtg+9isKdVYSkTPPRW/xrIhGke5JwY3mo1QYNfxbKqK9OPHTQybeCD5I= X-Received: by 2002:a1f:f884:: with SMTP id w126mr11142109vkh.41.1586061449677; Sat, 04 Apr 2020 21:37:29 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Skip Tavakkolian Date: Sat, 4 Apr 2020 21:37:18 -0700 Message-ID: Subject: Re: [9fans] a simple graphical application in Go? To: 9fans <9fans@9fans.net> Content-Type: multipart/alternative; boundary="0000000000004ccfc005a283b5fd" Topicbox-Policy-Reasoning: allow: sender is a member Topicbox-Message-UUID: 2c014ad8-76f7-11ea-bf79-c86ff18d410e --0000000000004ccfc005a283b5fd Content-Type: text/plain; charset="UTF-8" Cool! Thank you. On Sat, Apr 4, 2020, 9:17 PM Fazlul Shahriar wrote: > There is a PR open with Plan 9 devdraw support to 9fans.net/go/draw: > https://github.com/9fans/go/pull/28 > It at least works with the Go acme port Edwood last I tested. > > On Sat, Apr 4, 2020 at 4:33 PM Jeremy Jackins > wrote: > >> Well, you need a Go draw package in place of the C library. There is a >> draw package in github.com/9fans/go/ but unfortunately I think it only >> supports plan9port devdraw, rather than the native Plan 9 draw device. >> So there is some library work to be done first. Since the Go standard >> library also contains the most important drawing primitives >> implemented by the Plan 9 draw device (with the exception of font >> rendering, but there is golang.org/x/image/font), you may be able to >> ignore a lot of functionality provided by the Plan 9 draw library and >> focus on a few things like loading pixel data directly to the draw >> device. >> >> See: http://man.cat-v.org/plan_9/3/draw >> >> Jeremy >> >> On Sat, 4 Apr 2020 at 06:55, 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 >> >> ------------------------------------------ >> 9fans: 9fans >> Permalink: >> https://9fans.topicbox.com/groups/9fans/T0d490c91935dc74b-M08178595d1453fd46812690c >> Delivery options: https://9fans.topicbox.com/groups/9fans/subscription >> > *9fans * / 9fans / see discussions > + participants > + delivery options > Permalink > > --0000000000004ccfc005a283b5fd Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Cool! Thank you.

<= div dir=3D"ltr" class=3D"gmail_attr">On Sat, Apr 4, 2020, 9:17 PM Fazlul Sh= ahriar <fshahriar@gmail.com&g= t; wrote:
There is= a PR open with Plan 9 devdraw support to 9fans.net/go/draw:=C2=A0https://github.com/9fans/go/pull/28
It at least works with the = Go acme port Edwood=C2=A0last I tested.

On Sat, Apr 4, 2020 at 4:33 PM= Jeremy Jackins <jeremyjackins@gmail.com> wrote:
Well, you need a Go draw pa= ckage in place of the C library. There is a
draw package in github.com/9fans/go/ but unfortunately I t= hink it only
supports plan9port devdraw, rather than the native Plan 9 draw device.
So there is some library work to be done first. Since the Go standard
library also contains the most important drawing primitives
implemented by the Plan 9 draw device (with the exception of font
rendering, but there is golang.org/x/image/font), you m= ay be able to
ignore a lot of functionality provided by the Plan 9 draw library and
focus on a few things like loading pixel data directly to the draw
device.

See: http://man.cat-v.org/plan_9/3/draw

Jeremy

On Sat, 4 Apr 2020 at 06:55, Kim Lassila <kim.lassila@gmail.com&g= t; 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 <u.h>
> #include <libc.h>
> #include <draw.h>
>
> void
> main(int, char *argv[])
> {
> Rectangle rect;
> Image *black;
>
> fmtinstall('R', Rfmt);
> if(initdraw(nil, nil, argv[0]) < 0)
> sysfatal("initdraw: %r");
> rect =3D screen->r;
> black =3D 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 Perm= alink

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T0d490c91935dc74b-M08178595d14= 53fd46812690c
Delivery options: https://9fans.topic= box.com/groups/9fans/subscription
--0000000000004ccfc005a283b5fd--