IRC channel logs

2017-12-12.log

back to list of logs

<daviid>rekado: are you a member of bug-guile?
<daviid>anyway, for info, I've sent a bug (request for improvement) report ... here: https://lists.gnu.org/archive/html/bug-guile/2017-12/msg00008.html
<daviid>lloda: I see, in wip-raised-exception, your've added (define exception-format siple-format) andcalls it 'everywhere' below. but that does not seem to change anything compared to the previous version, calling format, which also was redefined at top for simple-format, what am I missing?
<daviid>oh I see now, it so that users can redefined it in their .guile
<daviid>lloda: for info, I just tried your patch with 2.2.3 (stable-2.2) and it gets guile to quick after a few seconds, no matter what ...
<daviid>to quit
<daviid>lloda: that is whe I also redefine exception-format i .guile, following your suggestion
<daviid>lloda: if I don't redefine anything, it works fine (as expected I guess, since the patch does not change anything 'per se')
<daviid>lloda: I also tried to use your patch and truncated-print, like this:
<daviid>in .guile
<daviid>(use-modules (ice-9 pretty-print))
<daviid>
<daviid>(when (defined? 'exception-format)
<daviid> (set! exception-format
<daviid> (lambda (port fmt . args)
<daviid> (apply truncated-print #:port port args))))
<daviid>
<daviid>but that provoque the same behavior, guile starts, then quit after a second (sometimes not even a second)
<daviid>lloda: like this ( a mini session in geiser)
<daviid>scheme@(guile-user)> ,use (cv)
<daviid>scheme@(guile-user)> (im-load "gnu.png")
<daviid>$2 = (148 125 4 (#f32(0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 # …) …))
<daviid>scheme@(guile-user)>
<daviid>It's been nice interacting with you!
<daviid>Press C-c C-z to bring me back.
<daviid>
<daviid>I did quit, guile did quit on its own ...
<daviid>lloda: any hint?
<daviid>lloda: but this seems to work fine:
<daviid>(use-modules (ice-9 pretty-print))
<daviid>
<daviid>(when (defined? 'exception-format)
<daviid> (set! exception-format
<daviid> (lambda (port fmt . args)
<daviid> (for-each (lambda (arg)
<daviid> (truncated-print arg #:port port))
<daviid> args))))
<daviid>
<daviid>lloda: so, pretty cool! the best would be to get truncated-print in boot-9, not sure how difficult tht would be
<daviid>lloda: if you have no objection, I will send a bug report with your patch (actually one built on top of the lates, there is a change in boot-9 since your branch), naming you as the author of course, then suggest a user (or global) config as above, and ask how difficult would it be (if possible) to get truncated-print in boot-9, so no user would have to do anything to get this default ...
<daviid>it is actually possible to globally configure guile, for those who share guile among several users: just put the content of relevant .guile content here in here: share/guile/site/init.scm
<dustyweb>o/
<cmaloney>o/
<lloda>sneek: later tell daviid I guess that could work. I explained how I use that patch here: https://lists.gnu.org/archive/html/guile-devel/2017-02/msg00083.html
<sneek>Okay.
<lloda>sneek: later tell daviid the first address@hidden is x~~~@y and the second is ~200@y, but ofc you can use truncated-print directly
<sneek>Will do.
<lloda>sneek: later tell daviid it isn't general b/c it depends on rewriting the error format strings and afaiu those can be anything
<sneek>Will do.
<lloda>sneek: later tell daviid the way you do it, fmt or the details of the error msg is lost. My patch is only a hack so that I could use Guile w/o killing myself. I think the right solution is to severely restrict what you can put in error format strings, and then provide a fluid to change the exception printer, but those are api changes.
<sneek>Got it.
<lloda>sneek: later tell daviid anyway please do file that bug
<sneek>Okay.
<wingo>moo
<civodul>hey!
***Amynka_ is now known as Amynka
<manumanumanu>Good day everyone
<dsmith-work>Tuesday Greetings, Guilers
<OrangeShark>Hello everyone
<jeko>Hi guys !
<ftknox>Hello!
<notsoanonymous13>hi there !
***ftknox_ is now known as ftknox
<daviid>heelo guilers!
<sneek>Welcome back daviid, you have 5 messages.
<sneek>daviid, lloda says: I guess that could work. I explained how I use that patch here: https://lists.gnu.org/archive/html/guile-devel/2017-02/msg00083.html
<sneek>daviid, lloda says: the first address@hidden is x~~~@y and the second is ~200@y, but ofc you can use truncated-print directly
<sneek>daviid, lloda says: it isn't general b/c it depends on rewriting the error format strings and afaiu those can be anything
<sneek>daviid, lloda says: the way you do it, fmt or the details of the error msg is lost. My patch is only a hack so that I could use Guile w/o killing myself. I think the right solution is to severely restrict what you can put in error format strings, and then provide a fluid to change the exception printer, but those are api changes.
<sneek>daviid, lloda says: anyway please do file that bug
<amz3>o/
<daviid>hello lloda! I believe truncated-print should be used both by repl-print and the raised exception system, and for the later, either configure in share/guile/site/init.scm or individually in .guile, after your patch, is nearly perfect (perfect would be to rewrite truncated-print so it would work at boot-9 time...)
<OrangeShark>I think after I finish this online course on using the Seaside web framework for pharo, I want to try experimenting with the same ideas in guile
***webshinra_ is now known as webshinra
<daviid>lloda: the solution you propose, in .guile (in this email you link), gets guile crasy, it simply quits gule after a sec, sometime not even 1 sec ... the solution I proposed works perfectly, and fullfill the need that, imo again, we want truncated-print, not user specific fmt... (by the way, iirc, I tried and error does not support fmt in the msg string, and after some thought, i don't think we want that anyway). truncated print is
<daviid>sophisticated, and try its very best toprint val according to its type, I don't think we have anything as good anwhere else in guile
<daviid>lloda: I will send a bug (request for improvement) bug today, based on your very simple and totally 'inoffensive' patch
<daviid>lloda: truncated-print has been written by wingo in 2009, it really is well thought, well written, robust... in 2009, wingo already knew guile very very deeply, I don't believe anyonr of us could write a better procedure then this one, adn we have it so, let's use it! :)