Re: Srfi-159/166 - monadic formatting for guile

2024-07-07 Thread Luis Felipe
Hi, El 7/07/24 a las 13:23, Linus Björnstam escribió: I had an implementation of 158 that was available in guix. However, bitbucket discontinued hg support and now the code is gone. It was trivial to port of the SRFI iirc. At that time, https://www.softwareheritage.org/ was archiving public

Re: Srfi-159/166 - monadic formatting for guile

2024-07-07 Thread Linus Björnstam
I had an implementation of 158 that was available in guix. However, bitbucket discontinued hg support and now the code is gone. It was trivial to port of the SRFI iirc. -- Linus Björnstam On Sat, 6 Jul 2024, at 15:55, Hans-Werner Roitzsch wrote: > On 06.07.24 02:00, Juliana Sims wrote: >> H

Re: Srfi-159/166 - monadic formatting for guile

2024-07-06 Thread Hans-Werner Roitzsch
On 06.07.24 02:00, Juliana Sims wrote: Hi, Has there been any movement on this? It would be great to have this SRFI in Guile proper :) Thanks, Juli Hello Juli, personally, I have not seen any news regarding that. However, I also did not quite understand what monadic formatting is or what

Re: Srfi-159/166 - monadic formatting for guile

2024-07-05 Thread Juliana Sims
Hi, Has there been any movement on this? It would be great to have this SRFI in Guile proper :) Thanks, Juli

Re: Srfi-159/166 - monadic formatting for guile

2019-06-18 Thread Linus Björnstam
So, I have had a look and played around with trimmed/lazy and it does nothing fancy. It relies solely on guiles own procedures for custom printers, which means we get guile's guarrantees for free. Recursive records are no problem, nor are circular lists of any rank or vectors any problem. trim

Re: Srfi-159/166 - monadic formatting for guile

2019-06-16 Thread Linus Björnstam
Well, in the written-shared/pretty-shared case, Alex Shinn (I just ported his reference implementation) relies on display/write for everything except lists and vectors, and those are, from what I can tell, exhaustively checked for cycles. trimmed/lazy I have to have a read through in some othe

Re: Srfi-159/166 - monadic formatting for guile

2019-06-16 Thread Mark H Weaver
Hi John, John Cowan writes: > On Sun, Jun 16, 2019 at 2:47 AM Mark H Weaver wrote: > > >> How do you implement 'written-shared', 'pretty-shared', and >> 'trimmed/lazy'? In particular, how do you avoid non-termination when >> asked to print cyclic data, when the cycle includes a non-standard da

Re: Srfi-159/166 - monadic formatting for guile

2019-06-16 Thread John Cowan
On Sun, Jun 16, 2019 at 2:47 AM Mark H Weaver wrote: > How do you implement 'written-shared', 'pretty-shared', and > 'trimmed/lazy'? In particular, how do you avoid non-termination when > asked to print cyclic data, when the cycle includes a non-standard data > type printed using a custom print

Re: Srfi-159/166 - monadic formatting for guile

2019-06-15 Thread Mark H Weaver
Hi Linus, Linus Björnstam writes: > I am not sure I understand what you mean, but i suspect it is already > solved, since for simple cases show will use display/write. So unless > you try to do advanced formatting of circular lists it will do > whatever display or write does. The same thing goes

Re: Srfi-159/166 - monadic formatting for guile

2019-06-14 Thread Linus Björnstam
Hi Mark! I am not sure I understand what you mean, but i suspect it is already solved, since for simple cases show will use display/write. So unless you try to do advanced formatting of circular lists it will do whatever display or write does. The same thing goes for custom printers. In fact, a

Re: Srfi-159/166 - monadic formatting for guile

2019-06-11 Thread Mark H Weaver
Hi Linus, Linus Björnstam writes: > I just ported the reference implementation of SRFI-159/166 (166 being > the successor of 159) from the reference implementation in chibi > scheme. The srfi document is here: > https://srfi.schemers.org/srfi-166/srfi-166.html > > SRFI-166 is like (ice-9 format)

Re: Srfi-159/166 - monadic formatting for guile

2019-06-03 Thread Ludovic Courtès
Hi! Linus Björnstam skribis: > When SRFI-166 stabilizes I will probably make a pull request myself and > convert the srfi document to a texi file. > > I want to package it as (srfi srfi-166) whenever that happens, and maybe try > to get it into guile (or at least become the maintainer for the

Re: Srfi-159/166 - monadic formatting for guile

2019-06-02 Thread Linus Björnstam
Thanks Ludo! When SRFI-166 stabilizes I will probably make a pull request myself and convert the srfi document to a texi file. I want to package it as (srfi srfi-166) whenever that happens, and maybe try to get it into guile (or at least become the maintainer for the guix package myself). T

Re: Srfi-159/166 - monadic formatting for guile

2019-06-02 Thread Arne Babenhauserheide
Linus Björnstam writes: > I just ported the reference implementation of SRFI-159/166 (166 being the > successor of 159) from the reference implementation in chibi scheme. The srfi > document is here: https://srfi.schemers.org/srfi-166/srfi-166.html … > Anyway, the repo is here: https://bitbuc

Re: Srfi-159/166 - monadic formatting for guile

2019-06-02 Thread Ludovic Courtès
Hi Linus, Linus Björnstam skribis: > Anyway, the repo is here: https://bitbucket.org/bjoli/guile-srfi-159 . I > haven't ported the tests, but playing with it in guile and chibi scheme > produces the same result. Tests are up, but I'm travelling without computer > the next week, so there is no

Srfi-159/166 - monadic formatting for guile

2019-06-02 Thread Linus Björnstam
Hi there! I just ported the reference implementation of SRFI-159/166 (166 being the successor of 159) from the reference implementation in chibi scheme. The srfi document is here: https://srfi.schemers.org/srfi-166/srfi-166.html SRFI-166 is like (ice-9 format) on steroids, drenched in molasses.