From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?B?5a6L5paH5q2m?= Newsgroups: gmane.lisp.guile.user Subject: Re: fun with wayland Date: Mon, 06 Feb 2023 10:59:17 +0800 Message-ID: <87edr3mrcq.fsf@envs.net> References: <7e5725e9-4800-05f8-1157-761158effbcc@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1523"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Cc: Guile User To: Matt Wette Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Mon Feb 06 06:54:44 2023 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pOuSi-0000GQ-5g for guile-user@m.gmane-mx.org; Mon, 06 Feb 2023 06:54:44 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pOuRx-0001zb-6U; Mon, 06 Feb 2023 00:53:57 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pOriw-0000FS-Tb for guile-user@gnu.org; Sun, 05 Feb 2023 21:59:18 -0500 Original-Received: from mail.envs.net ([5.199.136.28]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pOrit-0002Q9-BR for guile-user@gnu.org; Sun, 05 Feb 2023 21:59:18 -0500 Original-Received: from localhost (mail.envs.net [127.0.0.1]) by mail.envs.net (Postfix) with ESMTP id 3089D38A04AC; Mon, 6 Feb 2023 02:59:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=envs.net; s=modoboa; t=1675652345; bh=xKj0gTxKYl4G/8VZsIi+HzbGiYYDYe3UuStSY7mz/Ww=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=YB9EswgxCfZOMrz6xcMwQKk7V7x2VfOO0furdYrxzk8yK7W0WnN1mLvDRWx5fSVtH I9vp/M68+sAx/QaSOEsCTndBcI2dAvwZR8PImm3jxB2oZubq8NL5fdNsV0IWQ/lDT+ CDo5mWaFnzgxhhQm7agkTXFrfSUIetfRKXgGaiK/6S8b1sM2jeiWmASdN0sTGtUmvU sJhhHVYiSbMGP3/07isWu9GhdvVOlECwVXWGNEV0fR5cfY6wtz6BJjV/AmCorJJzdS +uPPI0QAHffMpk5AWpVAV9GcjB1wYAvY96PXz+lWVxzDPxP1zG6jPXs5pScmaazIPi JUOUjtWl/LklsfyUDI0IbCrH6fKtG9rjruHMqs1KwnqOu2UYwYThTn7bA2PYe9a3bp U3GkpwlJNIYYSI8ZjWEyg0lFgbjYxkr96zgPe2Usal5/V+DeqJmYwUG9jQFJG0viBj SngnCcd+l6sdMTgxViGJJ3Xkt1ypR6NvZeB9orRr9AaItdy9uJuTB9lBVTTNDuGfyp tYvtgwb/7GAnAavZS0JIplRnzB8Hvan3oHBiIeStz/F/n5ByIuO1kPdtIDIjq3+l/N 0yA1yfQMz8gAhvIiLumsvpcFZDSFHTowm7aIneI0RyGl5PGaAAe0Km/RTkz1N4Lqiq BSFZXu9jOU+rvnQHVtL24 X-Virus-Scanned: Debian amavisd-new at mail.envs.net Original-Received: from mail.envs.net ([127.0.0.1]) by localhost (mail.envs.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id mc8o49Ogh3z2; Mon, 6 Feb 2023 02:59:01 +0000 (UTC) Original-Received: from localhost (unknown [182.150.116.135]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.envs.net (Postfix) with ESMTPSA; Mon, 6 Feb 2023 02:59:00 +0000 (UTC) Original-Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id c8095f76; Mon, 6 Feb 2023 02:59:17 +0000 (UTC) In-Reply-To: <7e5725e9-4800-05f8-1157-761158effbcc@gmail.com> (Matt Wette's message of "Sun, 5 Feb 2023 11:05:11 -0800") Received-SPF: pass client-ip=5.199.136.28; envelope-from=iyzsong@envs.net; helo=mail.envs.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 06 Feb 2023 00:53:52 -0500 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.user:18891 Archived-At: Matt Wette writes: > I finally got my Wayland demo in guile working.=C2=A0 I thought I'd share > some bits. > (I started with creating FFI to libwayland, but with all the callbacks > it was > not worth it.) > > Wayland is a display server for Linux (and others?), meant to replace X11. > It uses UNIX socket I/O between the "compositor" (i.e., server) and clien= ts. > I have written=C2=A0 a client app without using libwayland: I've coded do= wn > to the > socket protocol in Guile Scheme. > > Summary: > 1) I created sendmsg/recvmsg! wrappers for Guile, in C.=C2=A0 This allows= me > =C2=A0=C2=A0 to send file descriptors as shared buffer references to the = server. > 2) I am using my proposed mmap wrapper for Guile, in C, to create a file- > =C2=A0=C2=A0 mapped shared drawing. > 3) I created a "scanner" program in Guile that converts protocol specs > =C2=A0=C2=A0 (e.g., wayland.xml) to scheme. > 4) I created "sender", "receiver" and "monitor" tasks within Fibers to > =C2=A0=C2=A0 run the client app > 5) I used my ffi-helper generated code to use cairo for drawing. > > prototype code is located at https://github.com/mwette/guile-wl-play Cool, I will definitely play/learn with it, thank you for sharing!