From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Aleix_Conchillo_Flaqu=C3=A9?= Newsgroups: gmane.lisp.guile.user Subject: Re: [ANN] guile-mqtt-0.2.0 released Date: Sun, 17 Nov 2024 11:39:31 +0100 Message-ID: References: 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="5338"; mail-complaints-to="usenet@ciao.gmane.io" Cc: guile-user To: mikael@djurfeldt.com Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Sun Nov 17 11:40:23 2024 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 1tCchb-0001Ed-86 for guile-user@m.gmane-mx.org; Sun, 17 Nov 2024 11:40:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tCch4-0003iW-Mi; Sun, 17 Nov 2024 05:39:50 -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 1tCch1-0003iI-0i for guile-user@gnu.org; Sun, 17 Nov 2024 05:39:47 -0500 Original-Received: from mail-qv1-xf36.google.com ([2607:f8b0:4864:20::f36]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tCcgy-0006VV-7w for guile-user@gnu.org; Sun, 17 Nov 2024 05:39:45 -0500 Original-Received: by mail-qv1-xf36.google.com with SMTP id 6a1803df08f44-6d416a43160so6409356d6.1 for ; Sun, 17 Nov 2024 02:39:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731839982; x=1732444782; darn=gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=9qZOFVegh1agjWpwGw+KwhHBREwtjyfn7SjwSc0YuNE=; b=M+8ykKYwyt8zOnX7DuiwQPGNeIiAPyb4DLpaZYvg3XkBpVXJGmE0OhCAQ15YIIb6ro 62q4d55aYQ152PJxNTFdcOSP1gVGwWBuMJ2IcQyQld96lvoBTh/8UuXCdaVAFNa79vzO JkYhSKK7d7avKnPDYMdRA2w1u9evI6wvWXR4cCKTgVJStUVNyuipHD7elp8WxrsYfLvT V8P9PhmK0HFJvV02/5AguuWunmEVrg+UXpiDjopmBD/+MJEWz70xJqIIfc+DRBrl/GAp chxwG7wql+eO8jRezNvZB9XmZS+MoERdLUaTSGfYCg+qDTB6p5vTJp00DqQ0Fq9u+Hse Hluw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731839982; x=1732444782; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9qZOFVegh1agjWpwGw+KwhHBREwtjyfn7SjwSc0YuNE=; b=J35aFyvibisn9mlS2hK5vwUiEVBAtSbEUDIxNPqcVM+NHRmR3Ejpyn+BRU4LjdLV+B PCSi5Nv+sZdkr665OLbQYDLCXCL2IZJPMB5mKc1XTRVOLELCCjA44hF2ineLa5xrRkbQ HkXKkQaTAucngaScSwJK2tZxX06rQguXP7QppGLp9mILJ5FSR1kRbZWlzwPJBTuM1OHl CLldZT1Jg3beVemSmJWwKHdSDLKyWORJWvr6PTimJm8GPjH599lwqW16meHK0S1zUKYu Q0US/vxmVemtDbkBBS6xs7SuGRUnZh25gdnBGZ0/DP/x+F+j7439nBVyXJoLXK9QTLBT 7imQ== X-Gm-Message-State: AOJu0YyeiSFE/+lxlZ5KeXmOAVD9n38qFm982iAVjvhLP7lYY+Z5sD6i eBv8g8eL9G1kkzAfs3C/LHhQ/lacJxteETpFDSNAZAwHu0aZjeFOE4WfkcV2t5iJ6j7kD9PFy29 R2VjAwWXlgLmfRY4IWB35nvv3gTXN5n6/hug= X-Google-Smtp-Source: AGHT+IFyZzBxGSUneMEtyQd4xtRxDqgt4CGpXYWFNqpADZ0iin5hvxRZ1n6g1sEtfDxvzUwVMZCBD22F7PghUdrD+vo= X-Received: by 2002:ad4:5742:0:b0:6d3:5bcc:485c with SMTP id 6a1803df08f44-6d3e8dbbffcmr204694776d6.0.1731839982513; Sun, 17 Nov 2024 02:39:42 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::f36; envelope-from=aconchillo@gmail.com; helo=mail-qv1-xf36.google.com 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:19899 Archived-At: Hi! guile-mqtt 0.2.1 now available in macOS via Guile Homebrew (https://github.com/aconchillo/homebrew-guile): $ brew tap aconchillo/guile (only needed once) $ brew install guile-mqtt On Tue, Nov 12, 2024 at 1:17=E2=80=AFAM Mikael Djurfeldt wrote: > > Guile MQTT provides bindings for the libmosquitto MQTT client > library. The bindings are written in > [GOOPS](https://www.gnu.org/software/guile/manual/html_node/GOOPS.html) > and rely on lower-level bindings created by NYACC directly and > automatically from mosquitto.h. > > Changes compared to v0.1.0: > > * All functionality of Chicken Scheme mosquitto bindings now > implemented and documented. > > * Distribute own copy of (... foreign cdata). NYACC is now not > required if building from a tar archive (as opposed to building from > a git repository clone). > > * Support make in separate build directory. > > * Bugfix: unsubscribe now works. > > The bindings align with GOOPS style, which means short method > names. (The specialization is done through the arguments.) > > The user can extend the client class by inheritance. > > Guile MQTT is free software and is released under the LGPL v3 license; th= e > full source distribution is available through > > * a tarball: > > https://github.com/mdjurfeldt/guile-mqtt/releases/download/v0.2.0/guile-m= qtt-0.2.0.tar.gz > > * the git repository: > https://github.com/mdjurfeldt/guile-mqtt > > Guile MQTT maturity is beta level. > > The following example, as well as the Guile libmosquitto bindings > themselves, > are inspired by the [Chicken Scheme mosquitto > bindings](http://wiki.call-cc.org/eggref/5/mosquitto) by Dmitrii > Kosenkov. > > ``` > (use-modules (mosquitto client)) > > (let ((client (make-client #:on-connect > (lambda (client err) > (if (not (eq? err MOSQ_ERR_SUCCESS)) > (abort err) > (display "Yay, we are connected!")))))) > (set! (disconnect-callback client) > (lambda (client err) > (if (not (eq? err MOSQ_ERR_SUCCESS)) > (display "Unexpected disconnect...")))) > > (set! (message-callback client) > (lambda (cl msg) > (display (string->append "Topic: " (topic msg) > "Payload:" payload msg)) > (publish client "topic2" "message received, thanks!"))) > (connect client "localhost" #:username "mqtt-admin" #:password "mypass"= ) > (subscribe client "topic1") > (loop-forever client)) > ``` > > See further examples under the directory [examples]( > https://github.com/mdjurfeldt/guile-mqqt/tree/main/examples).