[new egg] mosquitto - Bindings to mosquitto MQTT client library

2024-01-03 Thread Dmitry
Hello.

New egg "mosquitto" - Bindings to mosquitto MQTT client library.

Code: https://github.com/Junker/chicken-mosquitto
Docs: http://wiki.call-cc.org/eggref/5/mosquitto
release-info URL: 
https://raw.githubusercontent.com/Junker/chicken-mosquitto/master/mosquitto.release-info


$ test-new-egg mosquitto 
https://raw.githubusercontent.com/Junker/chicken-mosquitto/master/mosquitto.release-info
Writing egg-locations for mosquitto to /tmp/temp379f.3151627/egg-locations...
Running /usr/bin/henrietta-cache...
Caching egg 'mosquitto'
Downloading egg version 0.1.0 from 
https://github.com/Junker/chicken-mosquitto/tarball/0.1.0 (CHICKEN release 5)
Finding out the latest version for mosquitto...
Running /usr/bin/salmonella on mosquitto version 0.1.0...
salmonella 3.1.1 -- a tool for testing CHICKEN eggs 
(http://wiki.call-cc.org/egg/salmonella)

Started on Wed Jan  3 19:38:16 2024
Command line: /usr/bin/salmonella

Options:
  chicken-install: /usr/bin/chicken-install
  repo-dir: /tmp/temp379f.3151627/mosquitto/0.1.0/salmonella-tmp-cbe98/repo
  chicken-install-args: (-v -test)

C compiler: gcc
gcc (GCC) 13.2.1 20230801
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.



C++ compiler: g++
g++ (GCC) 13.2.1 20230801
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.



C compiler flags: -fno-strict-aliasing -fwrapv -DHAVE_CHICKEN_CONFIG_H 
-DC_ENABLE_PTABLES -Os -fomit-frame-pointer -I/usr/include/chicken 
-I'/tmp/temp379f.3151627/mosquitto/0.1.0/salmonella-tmp-cbe98/repo/include/chicken'
 

Linker: gcc
Linker flags: -L/usr/lib -Wl,-rpath=/usr/lib 

Libraries: -lchicken -lm -ldl 

CHICKEN banner:
CHICKEN
(c) 2008-2021, The CHICKEN Team
(c) 2000-2007, Felix L. Winkelmann
Version 5.3.0 (rev e31bbee5)
linux-unix-gnu-x86-64 [ 64bit dload ptables ]

Environment variables:
  SALMONELLA_RUNNING: 1
  CHICKEN_INSTALL_PREFIX: 
/tmp/temp379f.3151627/mosquitto/0.1.0/salmonella-tmp-cbe98/repo
  CHICKEN_PREFIX: (not set)
  CHICKEN_INSTALL_REPOSITORY: 
/tmp/temp379f.3151627/mosquitto/0.1.0/salmonella-tmp-cbe98/repo/lib/chicken/11
  CHICKEN_REPOSITORY_PATH: 
/tmp/temp379f.3151627/mosquitto/0.1.0/salmonella-tmp-cbe98/repo/lib/chicken/11
  CHICKEN_EGG_CACHE: 
/tmp/temp379f.3151627/mosquitto/0.1.0/salmonella-tmp-cbe98/repo/cache
  CHICKEN_INCLUDE_PATH: 
/tmp/temp379f.3151627/mosquitto/0.1.0/salmonella-tmp-cbe98/repo/share/chicken
  CHICKEN_C_INCLUDE_PATH: 
/tmp/temp379f.3151627/mosquitto/0.1.0/salmonella-tmp-cbe98/repo/include/chicken
  CHICKEN_HOME: (not set)
  CSC_OPTIONS: (not set)
  PATH: 
/tmp/temp379f.3151627/mosquitto/0.1.0/salmonella-tmp-cbe98/repo/bin:/home/junker/.local/bin:/sbin:/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl

 mosquitto (1 of 1) 
  Fetching[ ok ] 0s
  Reading .egg[ ok ] 0s
  Checking dependencies...[ ok ] 0s
  Checking category...[ ok ] 0s
  Checking license[ ok ] 0s
  Checking author.[ ok ] 0s
  Installing..[ ok ] 18s
  Checking version[ -- ] 
  Testing.[ ok ] 11s
  Checking documentation..[ ok ] 0s
Removing /tmp/temp379f.3151627
Egg looks ok!


--
Dmitrii Kosenkov
https://github.com/Junker



Re: [Chicken-users] parameter limit

2007-05-17 Thread Dmitry Lizorkin

I notice that sxml-tools doesn't implement the sxml:document procedure
(or at least, I can't find it in any of the XML-related packages).
This seems like a very useful function, because it can handle either
files or URIs.


I think the problem here is that xml:document relies on the
xlink-infrastructure.
xlink is currently not supported by chicken as it lacks the
ssax:multi-parser.
I recently ran in this issue too. I don't know if the maintainer of the
sxml-tools
and ssax has this on his/her todo-list. If not, it may be a good idea to
mail about
it or even start porting the code to chicken and package it up.?


In fact, the sxml:document procedure definition is independent of 
XLink-infrastructure. The procedure depends on:

1. SSAX (available as a Chicken egg)
2. HtmlPrag (for retrieving HTML documents in addition to XML documents; 
this feature may probably be discarded in case of licence problems)
3. access-remote.scm library for getting access to remote resources; I 
suppose that there should be an equivalent standard unit/egg in Chicken.


I thus believe that it should be quite easy to port the sxml:document 
procedure into a Chicken egg.


Dmitry



___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] paramater limit

2007-05-10 Thread Dmitry Lizorkin

Hello!


...I'm working with some GraphML
files (some of which are quite large).  Unfortunately, I'm running up
against the (apply) parameter limit exceeded error.  The offending
code looks like this:

(map
  (lambda (n) (display (string-append (string-trim-both n) nl)))
((txpath //edge/@target) (SSAX:XML-SXML (open-input-file
001Grant-gml.xml) '(


Can you provide a traceback? It's not clear to me where the (apply) is
happening.


The parameter limit problem was probably caused by the sxml:attribute 
function defined in sxpathlib.scm. You can try the modified definintion of 
this function, as follows:


(define (sxml:attribute test-pred?)
 (let ((fltr (sxml:filter test-pred?)))
   (lambda (node)
 (map-union
  (lambda (node) (fltr (sxml:attr-list node)))
  (as-nodeset node)

Regards,
Dmitry



___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] SXML tutorial draft

2007-02-06 Thread Dmitry Lizorkin

Hi!


I found the existing documentation to be severely lacking.


I agree with you completely. For the same reason, I made an attempt of 
creating an SXML tutorial some time ago 
(http://modis.ispras.ru/Lizorkin/sxml-tutorial.html), but your tutorial is 
definitely more detailed and user-friendly.


I'm not sure I understand the question.  I assume you are referencing to 
the

*NAMESPACES* annotations for *TOP*.


I mean that you state in your tutorial that When we translate this [XHTML 
page] to SXML it looks like this: [and you give the SXML representation]. 
Since the conventional instrument for translating an X(HT)ML document into 
SXML is Oleg Kiselyov's SSAX parser, a reader would probably expect the SXML 
fragment to be the result of calling the SSAX parser for the XHTML page. 
However, the SSAX parser produces a substantially different result (below), 
and such an inconsistency would lead a reader to a confusion when attempting 
to develop his/her own applications.


(ssax:xml-sxml
  (open-input-string
html xmlns='http://www.w3.org/1999/xhtml'
 xml:lang='en' lang='en'
head
 titleAn example page/title
/head
body
 h1 id='greeting'Hi, there!/h1
 pThis is just an gt;gt;examplelt;lt; to show XHTML amp; SXML./p
/body
/html)
  '())
==
(*TOP*
(http://www.w3.org/1999/xhtml:html
  (@ (xml:lang en) (lang en))
  (http://www.w3.org/1999/xhtml:head
(http://www.w3.org/1999/xhtml:title An example page))
  (http://www.w3.org/1999/xhtml:body
(http://www.w3.org/1999/xhtml:h1 (@ (id greeting)) Hi, there!)
(http://www.w3.org/1999/xhtml:p
  This is just an example to show XHTML  SXML.

Of course, such an SXML fragment with long expanded element names does not 
look simple and illustrative at all, and I agree with you that your SXML 
example is much more suitable for the discussion in your tutorial, since the 
presentational aspect is very important here. However, the tutorial should 
also give much care to the technical correctness of the information 
presented. For sustaining correctness, I can think of two approaches:


1. Completely removing xmlns='http://www.w3.org/1999/xhtml'  from 
consideration here. However, as this namespace declaration is the essential 
part of the XHTML recommendation, such an approach may not be acceptable 
when generating complete XHTML pages.


2. Explicitly stating (e.g., in a note or a footnote) that the SXML fragment 
presented is not obtained by automatically translating the XHTML page 
(although the XHTML page _can_ be obtained from that SXML fragment by 
automatic conversion tools, and _that_ kind of conversion is the ultimate 
goal of our activity when generating dynamic websites with SXML). For 
example, you may wish to put it like this: For simplicity, we treat XML 
namespace declarations as common attributes throughout this tutorial. 
Although slightly different from namespaces treatment in SXML, such an 
interpretation allows us to achieve desired and well-formed results in the 
generated XHTML documents. The detailed discussion on XML namespaces 
handling in SXML is outside the scope of this tutorial.


Hope these thoughts will help in improving your tutorial.
Dmitry




___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] SXML tutorial draft

2007-02-05 Thread Dmitry Lizorkin

Hello,

What a good tutorial! Thank you for taking your time and effort for 
developing illustrative tutorial examples and for presenting all this.


[begin quote]
html xmlns=http://www.w3.org/1999/xhtml;
 xml:lang=en lang=en
...
/html

(html (@ (xmlns http://www.w3.org/1999/xhtml;)
   (xml:lang en) (lang en))
 ...)
[end quote]

You are obviously aware of a different XML namespace handling mechanism 
accepted in SXML. As far as I understand, namespaces consideration is not 
significant for the primary subject of your tutorial. Would it be a good 
idea to make namespace declarations  consistent for X(HT)ML and SXML in your 
examples?


Best regards,
Dmitry




___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users