From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mikael Djurfeldt Newsgroups: gmane.lisp.guile.user Subject: [ANN] guile-mqtt-0.2.0 released Date: Tue, 12 Nov 2024 01:16:17 +0100 Message-ID: Reply-To: mikael@djurfeldt.com Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22687"; mail-complaints-to="usenet@ciao.gmane.io" To: guile-user Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Tue Nov 12 01:17:06 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 1tAeag-0005kk-77 for guile-user@m.gmane-mx.org; Tue, 12 Nov 2024 01:17:06 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tAeaA-0002gv-OV; Mon, 11 Nov 2024 19:16:34 -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 1tAea8-0002gV-5s for guile-user@gnu.org; Mon, 11 Nov 2024 19:16:32 -0500 Original-Received: from mail-vk1-f173.google.com ([209.85.221.173]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tAea6-0000YR-9f for guile-user@gnu.org; Mon, 11 Nov 2024 19:16:31 -0500 Original-Received: by mail-vk1-f173.google.com with SMTP id 71dfb90a1353d-513de426bf5so1794470e0c.3 for ; Mon, 11 Nov 2024 16:16:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731370588; x=1731975388; h=to:subject:message-id:date:from:reply-to:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=c6yQaqe07wQWbwqasy1hQKH1MZyF5BoDcrvYVb/n/UU=; b=fjv0qHtrXE59RMKGxHOJQ8ZOYOF2305Um50XeZrWDWAL0F1grRfaeCR5y51e5BqfKe 3kLycBMMcUunMRM8WPbef/Io1kNFQ+pmXFmkaeblHGSpPuI/a1guUJp2VxbxjciOTo9y dVkMjc2gJSCEnoz86+ZSCfNoLPODPawoZxI2EiVvwczAU4cC7ad9MJxtB9cknImujnh4 Ny5K85v2tmfeklDBs/pQCAaXFxANIFsKGFSA4HUa8hKYfoXUi7hklfWBP8awqqmJOlpd Hh7N8/fxWxoDjOPhR5gkPwvTrmdYf8MH5zSGN3jqBQrpL6cMwrCxRFOPM2vAv5MSuhaZ rGZQ== X-Gm-Message-State: AOJu0YwUR5+AAkY0tgfbSSYFdjCTUIavHJqdtDZrBkYu9gcx3OjHqE0Z zJ1nufj5kI0mLHBza7FPJxOLPKDVQqlrmZ9uMSu0FYaoiFDmBKNol9K+ioL7D9mnLArBVw7DLlp dpFmJukwk416TA+OlqWE/dxAHEbwei3dN X-Google-Smtp-Source: AGHT+IEE+FsB5R6/bp0hro8d6d7/h+O4TJ5Un5MNLDwv5XSbDkPSH5WHPhf9/817K1scGNBDx6pJkPM1LzQFVoL63iI= X-Received: by 2002:a05:6122:a06:b0:510:3a9:c3f0 with SMTP id 71dfb90a1353d-51401ba1616mr13747450e0c.1.1731370588263; Mon, 11 Nov 2024 16:16:28 -0800 (PST) Received-SPF: pass client-ip=209.85.221.173; envelope-from=mdjurfeldt@gmail.com; helo=mail-vk1-f173.google.com X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.671, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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:19893 Archived-At: 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; the full source distribution is available through * a tarball: https://github.com/mdjurfeldt/guile-mqtt/releases/download/v0.2.0/guile-mqtt-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).