IRC channel logs

2016-10-17.log

back to list of logs

<zacts>hi guilers
<OrangeShark>amz3`: I've been busy but I started working learning the basics for it. I also decided to start reading a bit about git internals to understand git more.
<adfeno>Hi all! :)
<adfeno>I'm using Skribilo, and noticed that the "enumerate" syntax doesn't support alphabetical enumeration (e.g.: "a)" "b)" "c)" "za)" "zb)") How would I go on making a procedure that displays a different character each time it's called?
<ijp>I don't know what sort of interface skribilo would expect, but the natural answer is to extend the common "make-counter" example
<ijp>e.g. (define (make-counter) (let ((x -1)) (lambda () (set! x (+ x 1)) x)))
<ijp>maybe you can take advantage of char-sets too
<adfeno>Perhaps... . Actually, I'm relatively new to Guile and Skribilo
<zacts>I'm wondering if emacsy is still useful, or if there is an alternative now
<zacts>I still like this idea of making a tiny guile editor
<adfeno>ijp: Where can I find this "make-counter" to extend to.
<ijp>I just defined it above
<adfeno>Ah... :)
<ijp>the key point is that there is some state "outside" the function which is maintained across calls
<adfeno>Hm, I see.
<adfeno>Hmmm....
<adfeno>It seems I'm missing something....
<adfeno>I have this:
<adfeno>(define testenumerate (lambda* ((mychar 97)) (display (integer->char mychar)) (if (char=? (integer->char mychar) #\\z) (set! mychar 97) (set! mychar (+ mychar 1)))))(display (string-append (testenumerate) "\\n"))
<adfeno>97 is "a" (lowercase A)
<adfeno>This results in: lambda*: invalid argument list in subform ((mychar 97)) of ((mychar 97))
<adfeno>Found the error. :)
<adfeno>Next day will be: How to make the next letter appear to the right if the last right letter is "z".
<adfeno>So that, if "z" is to be printed now, the next one to be printed should be "aa", then "ab" and so on.
<adfeno>Must go now. 23:20 here;
***bonsaishitten is now known as Zachte-g
<civodul>Hello Guilers!
<janneke>Hi civodul!
<nalaginrut>wingo: I think with-stack-and-prompt has same meaning with start-stack, but it's implemented by start-stack, is there any special purpose for creating it?
***wleslie is now known as jyrfyvr
<wingo>nalaginrut: start-stack does not start a prompt afaiu
<wingo>with-stack-and-prompt installs a default prompt handler
<wingo>dunno
<wingo>probably they should be the same tho
***jyrfyvr is now known as wleslie
<nalaginrut>wingo: I saw start-stack use call-with-prompt in ice-9/boot9.scm, it installed a similar handler to with-stack-and-prompt
<nalaginrut>wingo: I think the difference is start-stack uses a "start-stack" prompt tag
<nalaginrut>wingo: but I still don't know if I should use with-stack-and-prompt directly
<wingo>orly
<wingo>ACTION looks
<wingo>maybe you are right!
<wingo>probably just accidental refactoring messes
<nalaginrut>wingo: could you double check it? I'm refactoring artanis code discreetly, just like dissembling a Note7 ;-P
<wingo>:-)
<wingo>nalaginrut: the handlers are different tho
<wingo>anyway, just a mess, no bug here afaiu?
<nalaginrut>wingo: is it better to use start-stack directly ?
<nalaginrut>I'm not sure if wrap one more prompt will bring some cost
<nalaginrut>the code is used in every request handler, so I have to care about it
<wingo>hard to say. if your code relies on the ability to abort to the default prompt and have the values passed to the handler be interpreted as the default prompt does, then you need with-stack-and-prompt.
<wingo>otherwise you could get away with with-stack, if all you wanted was to trim backtraces.
<wingo>or you could do away with it entirely and trim stack traces yourself
<wingo>if you are able to do so anyway
<nalaginrut>wingo: do you think implementing co-routine is the 1st case? ;-)
<wingo>i don't know :) for a coroutine you also need a "catch" form
<wingo>(fibers doesn't do that right now and i am not sure what the good design is)
<nalaginrut>I think the main problem is how to understand the "stack" here
<nalaginrut>and the relationship between delimited-continuations...alas
***Kooda_ is now known as Kooda
<nalaginrut>well, I don't know why record-accessor in r6rs uses an index rather than fields name, but I don't think it's a good design...
<amz3>héllo :)
<OrangeShark>hello
<wingo>ACTION pokes ecraven again re: benchmarks
<wingo>:)
<ecraven>:) thanks
<ecraven>hm.. seems I have misplaced the new guile run, starting it again now
<wingo>coolio
<ecraven>wingo: pushed :)
<wingo>ecraven: oh great, thanks :-)
<ecraven>wingo: if you notice anything funny, tell me :) I don't think I botched the runs, but you never know
<ecraven>guile 2.1.4 is definitely faster than 2.0 :)
<wingo>strangely not on ctak tho
<wingo>i will try them and see if i get a similar ratio between guile 2.0 and 2.1
<ao2>Hi, the lilypond project (http://lilypond.org/) uses Guile, but it does not work well with guile-2.0 and the developers does not seem to have as a priority to transition to 2.0. This fact could result in lilypond not being shipped in the next Debian stable release, so I am asking here if by any chance there is some guile developer willing to help out to fix lilypond to work with guile-2. More details at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug
<ao2>=746005
<ao2> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=746005
<civodul>ao2: Lily developers reported 2.0 bugs and issues in the past, some of which have been addressed
<civodul>i don't what the status is on their side
***bnw is now known as Guest81608
<ao2>civodul, the latest info I could find is this message: https://lists.gnu.org/archive/html/guile-devel/2016-06/msg00024.html which is a continuation of the discussion from here https://lists.gnu.org/archive/html/guile-devel/2015-11/msg00003.html I'll try pinging lilypond devs again
<wingo>meep
***random-nickname is now known as sandos-idiot
<jmd>wingo: what does that mean?
<OrangeShark>about the FFI, if I am given a pointer from C, if I wanted to add a finalizer, I would have to do something like (make-pointer (pointer-address my-pointer) finalizer-func)?
***sandos-idiot is now known as random-nickname
<wingo>jmd: just a little noise
<wingo>OrangeShark: i think so yes
<OrangeShark>thanks wingo
<OrangeShark>it probably what we should do in the guile bindings to libgit2, I don't think everyone wants to manage memory in scheme :P
<wingo>:)
<davexunit>OrangeShark: oh cool, happy to see someone working on bindings. :)
<OrangeShark>davexunit: I am working with amz3 on it
<davexunit>twice now I've thought that I was going to be the one to write them, but it's never materialized. glad some other people are getting it done!
***random-nick_ is now known as random-nick
<wingo>api-scheduling.texi, the worst? [y/n]
<wingo>maybe i should just deprecate the crap
<wingo>arbiters and user asyncs i guess are first
<wingo>lol we have a prototype in libguile/async.h
<wingo>void scm_switch (void);
<wingo>no definition.
<wingo>aaaaaarg we have a procedure called scm_noop
<wingo>wtfffff
<civodul>uh!
<paroneayea>noop noop noop
<paroneayea>nope nope nope
<wingo>:)
<civodul>daviid: guile-lib 0.2.3 against guile 2.0.12 has one test failure: FAIL: texinfo.serialize.scm
<civodul>test-serialize failed: assert-equal: expected:
<civodul>"@iftex \\nThis is only for tex.\\n\\nNote. Foo.\\n\\n@end iftex\\n\\n"
<civodul>got:
<civodul>"@iftex \\nThis is only for tex.\\n\\nNote. Foo.\\n\\n@end iftex\\n\\n"
<civodul>
<wingo>probably because it's picking up the (texinfo string-utils) or whatever from guile itself; strange?
<wingo>anyway surely guile-lib should remove the modules that are in guile 2.0
<civodul>yeah
<civodul>or only build/install them if they're not already there
<civodul>for ancient guiles
***random-nickname is now known as random-nick
<daviid>civodul: wingo strange> I kind of remember having tested [make check] against 2.0.12, and noticed 2 failures against 2.1.4... but I'll try to look at it later: but I don't think it installs texinfo modules for guile >= 2.0
<daviid>civodul: are you sure? just tried here and using 2.0.12.33-4f324, I get All 25 tests passed
<daviid>wingo: the only texinfo module that is intalled for guile >= 2.0 is (texinfo nodal-tree)
<daviid>I think what happens is this: texinfo sources are not installed, except (texinfo nodal-tree, which seems to have no correspondong check), but the Makefile.am of unit-tests has never been updated acordingly, and make check runs the guile-lib 'old' sxml and texinfo checks :) this does not explain why it pass here and not for you civodul, but I will change this so it does not check things it does not install :)