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.1.0 released Date: Sat, 9 Nov 2024 16:49:34 +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="5148"; mail-complaints-to="usenet@ciao.gmane.io" To: guile-user Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Sat Nov 09 16:50:45 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 1t9njY-00017k-Uv for guile-user@m.gmane-mx.org; Sat, 09 Nov 2024 16:50:44 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t9niu-00021D-JB; Sat, 09 Nov 2024 10:50:04 -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 1t9niu-00020v-27 for guile-user@gnu.org; Sat, 09 Nov 2024 10:50:04 -0500 Original-Received: from mail-vk1-f175.google.com ([209.85.221.175]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t9nis-00045a-Bu for guile-user@gnu.org; Sat, 09 Nov 2024 10:50:03 -0500 Original-Received: by mail-vk1-f175.google.com with SMTP id 71dfb90a1353d-5101c718439so1077373e0c.1 for ; Sat, 09 Nov 2024 07:50:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731167385; x=1731772185; 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=Ko91qD4A4cEZ6YoPNyEUEyewI6myBSs+1P+IGIYqD9c=; b=nvom1d2y4pWdX2pWQZdvtQHlZdl2R5u1Tv9r9q+VeFSXiFYKdQry1ZaSjJAzNty1fF 0SYrJ1H90UPHQ8dly3AB4eSOO0znWAQzcuO3opcK+NojLI21sTDdtgG77Z1aNmjjrhVJ OMp2Pj3R3QYdFSWiCrK3gCOOliyV8Z4oNtHC0II/jzh3ag22VLLVAea5i/rfSVbOJ2r6 pmj58DHxYcsibjIbvjUhCD/f5GLNMZYyInehDTzP0ybSBPw7+sqJ9lEq7yYp6Uox85nr aHynYFH+wxnBwDI9DB5c6GEWUmzncVmn95wZB+4vb8V5b7BGxxKMrkITU/BHKD7IFB+d v17g== X-Gm-Message-State: AOJu0YxDKqZvDTzcHdT+hK7wu96ujikCpWHmf5YGqVN/8J4Vek8lwva0 DMlGxFXgOoQzyTw6DlFl28FOlLxRvc8XexnCEnVvaZYLPVPbwpIyQzM5LiYunEr3w76UA9Q3Hi1 dvMADxDRwCbqoeJOqRpSb8tiGPoBvsdxA X-Google-Smtp-Source: AGHT+IGeQur9l9NFFUnBMhJbDY2+RA7ctLXDwQsZKxenAs7/n2W3hx3rYhzzVMk9j0n6pIOW43iMc989GlmDZ+P8Ydo= X-Received: by 2002:a05:6122:1697:b0:4f6:aa3e:aa4c with SMTP id 71dfb90a1353d-51401ba1983mr6427118e0c.3.1731167385025; Sat, 09 Nov 2024 07:49:45 -0800 (PST) Received-SPF: pass client-ip=209.85.221.175; envelope-from=mdjurfeldt@gmail.com; helo=mail-vk1-f175.google.com X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:19879 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. 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. Example: This 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). Guile MQTT maturity is beta level. Guile MQTT is free software; the full source distribution is available through * a tarball: https://github.com/mdjurfeldt/guile-mqqt/releases/download/v0.1.0/guile-mqtt-0.1.0.tar.gz * the git repository: https://github.com/mdjurfeldt/guile-mqqt