IRC channel logs

2017-12-11.log

back to list of logs

<lloda>daviid: rekado: no need to patch Guile to fix printing of large structures at the repl. It's supported with repl-option-set!, which is of course undocumented.
<lloda>(repl-option-set! (car (fluid-ref *repl-stack*)) 'print (lambda (repl val) (format #t "~200@y" val)))
<lloda>will do the trick
<lloda>you do need to patch Guile to fix printing of exception messages though
<lloda>for .guile you don't need *repl-stack* but
<lloda>(repl-default-option-set! 'print (lambda (...) ...))
***do is now known as w1gz
***do is now known as w1gz
***do is now known as w1gz
<dsmith-work>Morning Greetings, Guilers
<OrangeShark>hello everyone
<dustyweb>wingo: http://stefan-marr.de/papers/pldi-marr-et-al-zero-overhead-metaprogramming/
<hikikomori>hi there folks ! would it be complicated to setup guile web server like an nginx config? where I simply give the virtualhostname and the directory location of teh files.
<anonymous2139321>anyone tinkered with the (web server) module? looking to have a simple html text displayed with minimal config
<daviid>hello guilers!
<anonymous2139321>hey there daviid
<daviid>lloda: thanks, that will help, in the mean time ... I strongly believe that guile's repl should use truncated-print per default, and that users whould want the repl to use write instead of truncated-print are the ones who should have to configure, not the other way around ... hence the mini (inoffensive) patch I proposed (1 patch for all users, not all users to configure their .guile, in a 'multi guile users' entity, it saves time and
<daviid>user headakes to)
<daviid> this, and a raised exception that, per default, also uses truncated-print is really essential for those of us who daily manipulates large structures ... I hope guile maintainers will pay attention to your patch, and get it in asap...
<daviid>I don't expect to have not even a single guile-cv user till this is guile's default
<dsmith-work>daviid: Makes sense to me
<daviid>no way to expect users comming form python or java to 'resist' a repl which blows every seconds...
<daviid>rekado: despite lloda (very usefull) suggestion, I still think guix should patch guile as I proposed: this way, all users benefit from it, and as I said, no one wants a repl to try to print a large structure, not just guile-cv users... see all the comments people made here, lloda, mwette, dsmith ... not a single one said it was not a good idea...
<daviid>rekado: it is an inoffensive patch, talk to civodul if you re 'afraid' of anything ... and let's get this in guile proper as well, please...
<rekado>daviid: for Guix we usually don’t patch upstream packages like that. Especially in this case I think it’s reasonable to discuss this change for Guile and wait for a patch release.
<daviid>rekado: yes, I did think that patch would be implemented, 2y ago ...
<civodul>i didn't follow the discussion but "patch guile in guix" doesn't sound like something we'd normally do :-)
<daviid>as I said, it is an 'emergency inoffenive patch, then we get it into guile proper, then we get guile to have proper raised exception mmechanism when playing with large structures ...
<daviid>civodul: the thing is to get (system repl common) to import (ice-9 pretty-print) and the repl procedure to call truncated-print insted of write. that would fix guile, using guile, for all users ... could you please look at this and get it into guile, thanks! then we should do something about raised-excption, but it seems a bit more complicated
<civodul>is there a bug report for it?
<civodul>BTW "could you do think thx" is unnecessarily aggressive to me
<daviid>civodul: I did not send a bug report, because the way we discussed this here, at least in the very beginning, sounded that it was going to be fixed immediately, but if that is what misses, I can send a bug. one question about the proposed (really tiny patch) is should the manual being updated somewhere maybe? I could not find the answer to that question
<civodul>i'm just coming to the discussion so i can't tell "if that is what misses"
<civodul>what i know though is that bug reports are better when they're filed :-)
<daviid>civodul: :), ok then I'll send one today then, though it is not a bug perse, rather a 'wish'
<civodul>ok, sounds good!
<daviid>civodul: another thing is to patch the raised exception system, lloda has worked on this in the branch 'wip-raised-exception'
<civodul>did lloda send a message or something somewhere?
<civodul>i could try to comment later, and then lloda has commit rights
<daviid>civodul: I don't know how far lloda did discuss his work with 'you' (maintainers) I remember he was still 'thinking' about his patch (ice-9 boot)
<daviid>civodul: my opinion is, the defauly raised excpetion should use truncated-print as well, because users ca always call write as part of thir debug 'work' ... but in the repl, wether repl-print or raied exception, guile should never try to print large structures (lsts, array, sfri-4 bytestrcutures ... )
<daviid>going afk a little, bbl...
<kristofer>anonymous2139321: I have been tinkering with (web ...) for a few days now :)
<kristofer>anonymous2139321: what you describe should be pretty easy. check out tekuti and guix-web. there are other examples, but both of those are complete programs to give you an idea of a workflow
<anonymous2139321>kristofer: nice , I copy pasted the code from the official website like a monkey and it does work when I use wget on localhost:8080 but the information does not appear if I used eww, lynx or icecat. Would you happen to know anything about that?
<anonymous2139321>kristofer: thanks I will look into it
<kristofer>anonymous2139321: I'd have to see your code. I have been using write-shtml-as-html from (htmlprag) in guile-lib to format responses
<anonymous2139321>;;; Hello HTTP server
<anonymous2139321>(use-modules (web server))
<anonymous2139321>
<anonymous2139321>(define (my-handler request request-body)
<anonymous2139321> (values '((content-type . (text/plain)))
<anonymous2139321> "Hello World!"))
<anonymous2139321>
<anonymous2139321>(run-server my-handler)
<anonymous2139321>kristofer: this is the code i am referring to, you have you any equivalent i do not mind as long as it is in guile
***bmansurov_ is now known as bmansurov
<anonymous2139321>ls -la
<anonymous2139321>000ps