Re: guile-json 2.0.0 released

2018-12-13 Thread John Cowan
On Thu, Dec 13, 2018 at 5:48 PM Aleix Conchillo Flaqué wrote: The reason I chose hash-tables back in 2013 was that I wanted to an > unordered data structure to strictly comply with the JSON spec. > RFC 8259, the latest JSON RFC, clarifies this: JSON parsing libraries have been observed to di

Re: guile-json 2.0.0 released

2018-12-13 Thread Aleix Conchillo Flaqué
On Thu, Dec 13, 2018 at 2:48 PM Aleix Conchillo Flaqué wrote: > > I was also thinking to look at "reader macros", which was also a > suggestion from jao. I'm not sure if you can do that in Guile, but I > have found this: > > https://lists.gnu.org/archive/html/guile-user/2016-03/msg00039.html > > T

Re: guile-json 2.0.0 released

2018-12-13 Thread Aleix Conchillo Flaqué
On Thu, Dec 13, 2018 at 6:30 AM Thompson, David wrote: > > On Thu, Dec 13, 2018 at 12:56 AM Aleix Conchillo Flaqué > wrote: > > > > Hi, > > > > I'm pleased to announce a new guile-json release 2.0.0. This is a > > breaking change release. It is not possible anymore to specify a JSON > > object us

Re: Tensorflow bindings

2018-12-13 Thread Jan Wedekind
Here follows another example. The MNIST handwritten digit database is a well-known benchmark for machine learning. The following code implements a neural network with two convolutional layers and two fully connected layers. The example achieves an error rate of 2.75%. I am planning to add regula

Re: Trouble parsing a response

2018-12-13 Thread swedebugia
On 2018-12-13 23:03, Roel Janssen wrote: > On 13-12-18 17:06, swedebu...@riseup.net wrote: >> On 2018-12-13 16:01, swedebu...@riseup.net wrote: >> snip >> >>> >>> I tried with the file attached but got this because the driver does not >>> support URIs but only host, port, type, token: >> >> Ah, I s

Re: Trouble parsing a response (Was: Re: New library: guile-wikidata)

2018-12-13 Thread Roel Janssen
On 13-12-18 17:06, swedebu...@riseup.net wrote: On 2018-12-13 16:01, swedebu...@riseup.net wrote: snip I tried with the file attached but got this because the driver does not support URIs but only host, port, type, token: Ah, I saw now that you already implemented URI on master :) https:/

Re: guile-json 2.0.0 released

2018-12-13 Thread John Cowan
On Thu, Dec 13, 2018 at 12:33 PM Thompson, David wrote: The catch is that '() becomes both the empty array and empty > object so there's no way for the serializer to do the right thing all > the time. You could introduce a special value for one of those cases, > and hey we're back at square one!

Re: guile-json 2.0.0 released

2018-12-13 Thread Thompson, David
On Thu, Dec 13, 2018 at 12:09 PM John Cowan wrote: > > Interesting. That's the approach (SXML attribute lists) that I had thought of > earlier and abandoned because (a) you cannot search it with assoc and (b) you > have to be careful to test in the order "empty JSON array, JSON object, > non-em

Re: 3 different json projects

2018-12-13 Thread Thompson, David
On Thu, Dec 13, 2018 at 9:53 AM Catonano wrote: > > This is not strictly about guile-json, it's somewhat tangential > > In the thread announcing guile-json 2.0, I learned that David Thompson uses > his own json processing thing > > There is also guile-sjson by Christopher Allan Webber > > And then

Re: guile-json 2.0.0 released

2018-12-13 Thread John Cowan
Interesting. That's the approach (SXML attribute lists) that I had thought of earlier and abandoned because (a) you cannot search it with assoc and (b) you have to be careful to test in the order "empty JSON array, JSON object, non-empty JSON array", which is annoying. An approach which solves (a)

Re: guile-json 2.0.0 released

2018-12-13 Thread Thompson, David
On Thu, Dec 13, 2018 at 11:35 AM John Cowan wrote: > > > > On Thu, Dec 13, 2018 at 9:31 AM Thompson, David > wrote: > >> * They have no read syntax >> * They use a procedural, mutable API >> * They are slower than alists when the number of keys is small, which >> is 99% of the time when dealing

Re: guile-json 2.0.0 released

2018-12-13 Thread John Cowan
On Thu, Dec 13, 2018 at 9:31 AM Thompson, David wrote: * They have no read syntax > * They use a procedural, mutable API > * They are slower than alists when the number of keys is small, which > is 99% of the time when dealing with serializing objects > I agree with these objections. > Why not

Trouble parsing a response (Was: Re: New library: guile-wikidata)

2018-12-13 Thread swedebugia
On 2018-12-13 16:01, swedebu...@riseup.net wrote: snip > > I tried with the file attached but got this because the driver does not > support URIs but only host, port, type, token: Ah, I saw now that you already implemented URI on master :) https://github.com/roelj/guile-sparql/blob/master/sparql

Re: New library: guile-wikidata

2018-12-13 Thread swedebugia
On 2018-12-11 11:29, Roel Janssen wrote: > On 11-12-18 01:32, swedebu...@riseup.net wrote: snip >> I now implemented sparql queries as well. See >> https://gitlab.com/swedebugia/guile-wikidata >> > > "guile-wikidata" looks cool! And I'm glad to see you've added SPARQL > support as well. It woul

3 different json projects

2018-12-13 Thread Catonano
This is not strictly about guile-json, it's somewhat tangential In the thread announcing guile-json 2.0, I learned that David Thompson uses his own json processing thing There is also guile-sjson by Christopher Allan Webber And then there's guile-json This amounts to 3 different projects for de

Re: guile-json 2.0.0 released

2018-12-13 Thread Thompson, David
On Thu, Dec 13, 2018 at 12:56 AM Aleix Conchillo Flaqué wrote: > > Hi, > > I'm pleased to announce a new guile-json release 2.0.0. This is a > breaking change release. It is not possible anymore to specify a JSON > object using alists. Instead alist->hash-table needs to be explicitly > used (examp

Re: a network client

2018-12-13 Thread Catonano
Il giorno gio 13 dic 2018 alle ore 11:08 Mark H Weaver ha scritto: > > I'm sorry, but there's not enough information in your email for me to > understand what's happening. > > It would be most helpful if you could provide a small, self-contained > example of the server and client code, so that we

Re: a network client

2018-12-13 Thread Mark H Weaver
Hi, Catonano writes: > I wrote a small server in Guile scheme > > I used the command "nc" to test it > > It seems to work > > Then I wrote a small client in Guile > > It doesn't work and I don't understand why I'm sorry, but there's not enough information in your email for me to understand what

a network client

2018-12-13 Thread Catonano
I wrote a small server in Guile scheme I used the command "nc" to test it It seems to work Then I wrote a small client in Guile It doesn't work and I don't understand why At the REPL: scheme@(lsp-client)> (run-ping-test 11211) This runs the client The client is supposed to write a short str