<enderby>noob question: how do I display lines of text and pause 1 sec between each display command? Whenever I do a while loop 30x with like (sleep 1), I have to wait 30 seconds to see the whole output, instead of it updating every second <ijp>writes are buffered, so you'll need to flush <ijp>unless the port line buffered, in which case just writing a line should do it <ijp>anyway look up force-output <rlb`>wingo, mark_weaver: I was wrong about the placement of that "paper over" sleep hack. It was in call-with-repl-server, but just before (proc client-socket), not before run-server. ***rlb` is now known as rlb
<mark_weaver>rlb: fyi, civodul wrote the test, and I wrote almost everything else. <amz3>guile-bytestructures is really awesome! <amz3>for instance, you can declare a struct which contains another struct <amz3>guess what, when you ref the struct inside the other struct it return a bytestructure instead of somekind of pointer <amz3>bytestructure is basically the most relevant object in scheme-bytestructure <amz3>the other interesting object, is bytestructure-descriptor which is constructed with e.g. (define position (bs:struct `((x ,int) (y ,int))) <amz3>you feed that struct descriptor to `(bytestructure descriptor)` and you get a proper bs object which is supported by a bv <amz3>then you can edit the struct instance (the bv) via (bytestructure-set! bs 'x 42) (there is also a macro API) <amz3>when you are finished editing the bv, you can turn into a pointer <amz3>and pass it to some ffi call <amz3>the reverse operation is also possible, ie. you can turn a pointer into a bytevector then into a bytestructure (without any copy!) <amz3>Also on another topic, I have implemented side effects in my scheme mini framework for doing web frontend <amz3>(sorry there are some cosmectic change in this commit but it should be readable) <amz3>(the README is not updated, but the commit message should be enough) <amz3>I can walk a git tree :') <amz3>OrangeShark: how are you doing? <amz3>I'm wondering how to advance the bindings <amz3>OrangeShark: btw did you look into artanis vs guile web? <amz3>or did anywork regarding gitweb replacement? <amz3>or did you do anything regarding gitweb replacement? <OrangeShark>well I was having issues with artanis so I decided to just use the built in guile web and just use match as a router <amz3>OrangeShark: did you commit somewhere? I think it would be a nice addition to guile-git repo? <OrangeShark>no I have not. It doesn't do much yet. I wanted to have some basic stuff, but haven't had a chance to implement them <amz3>the issue I have is that with gitweb I would easily be able to know what to bind next... easy as looking up the interface what's missing. With only the code it's hard to see... <amz3>OrangeShark: can I (re) start the gitweb replacement in guile-git repo? <OrangeShark>amz3: do you want to do it in the guile-git repo or in its own repo? <amz3>OrangeShark: I prefer to use guile-git repo* <amz3>OrangeShark: are you ok? <amz3>please add tests if you add something :) <janneke>amz3 or write something in README or HACKING ;-) <OrangeShark>amz3: sorry, was in a meeting. I will talk to you more after lunch :P <amz3>Ark! gitlab is very slow at this very moment <OrangeShark>amz3: sure, we can use the guile-git repo, it does make it easier to develop the gitweb replacement when you can directly go fix the git bindings and reload them. <OrangeShark>amz3: sure, we can use the guile-git repo, it does make it easier to develop the gitweb replacement when you can directly go fix the git bindings and reload them. <OrangeShark>when I get home, I can move the stuff over to guile-git <amz3>soon enough you will see a screenshot in this very place with a good looking gitweb from the dark side of the moon ;) <OrangeShark>should it be in an example directory or something else? <amz3>I think we have everything for making gitweb except diff/delta stuff <amz3>also the API to browse the files (aka. the tree API) is painful <OrangeShark>ya. I was looking into gitlab and they would actually use the git binary ontop of their libgit2 bindings... <amz3>in tests/tree.scm there is a very simple example, but basically (tree-walk tree GIT-TREEWALK-PRE (lambda (root entry) (pk root entry)) will output ;;; ("" "README.md") <amz3>basically the entry parameter is *only* the filename <amz3>and AFAIK you can't easily "open" a directory <amz3>you have to tree-walk the thing and filter the sub components <amz3>OrangeShark: really? what for? <OrangeShark>amz3: to list files in a repo, sort of like what you are talking about <amz3>I will create a git-ls-files replace something like (tree-list-files tree) <OrangeShark>ya, we should definitely try to provide some higher level procedures. Some of these C functions are pretty low-level <amz3>exactly. That's why created a branch-list procedure to avoid the pain of going through the iterator <amz3>not sure about the naming <amz3>it's best to have something like (tree-fold (lambda (filepath prev) ...) init tree) <OrangeShark>amz3: ya, we should try to keep it as closely named to familiar scheme procedures <daviid>amz3: OrangeShark: you should look and snarf all these file system related procedures from guix, probably everything you need has been written already ( i even think we should ask guix guys to make a module with al these and add them to guile-lib ... not me though, I'm overloaded already :)) <amz3>daviid: we are talking about libgit2 <amz3>daviid: yes you are correct about moving some of the stuff to guile-lib <amz3>daviid: what about filesystem procedure? <daviid>amz3 tree-list-files, tree-fold ... all these are in guix already, I beleive <amz3>daviid: basically the libgit2 API returns an iterator over (dirname, basename) <daviid>amz3 you also refered to naming, guix will be a great source of inspiration aswell, they are cumulating a titanesque experience wrt that ... ***berndj-blackout is now known as berndj
<daviid>amz3 I'm pretty sure applying an iterator over a dirname basename is part of guix <amz3>I'm having a look at guix <amz3>I'm not good at tree traversing in scheme <daviid>amz3 yes, I use nftw thoufh, mainly because '... nftw is safe against circular linked directory structures ...' <OrangeShark>daviid: the trees amz3 are talking about are git trees <MoronicAcid>Does anyone know why statprof-display procedure keeps printing "No samples recorded"? <wingo>MoronicAcid: what guile are you on? <wingo>the statprof procedure is generally the right interface, if you can use it. but maybe your program just didn't run long enough. <wingo>or maybe you have signals disabled somehow <paroneayea>rust can expose a C API/ABI and allows you to maintain C API/ABI compatibility? <janneke>i just found that .go files are not reproducible...what's up with that? <wingo>the syntax expander generates guid's in various circumstances <wingo>see the docs for syntax-session-id <wingo>at least to allow for some builds to be reproducible <janneke>i was just thinking, with guix and all... <OrangeShark>paroneayea: ya, that is one of the features they wanted if I recall <MoronicAcid>wingo: The manual is not really descriptive, when calling statprof-reset are the seconds and microseconds added to get the polling interval? <MoronicAcid>There we go, just had to decrease polling interval form 50ms to 1ms. <wingo>but i guess it could describe things that are only in master <janneke>figure that there's more to it than the bug says? <MoronicAcid>When computing (expt 10 (expt 10 8)) takes less time to compute than to print... <janneke>for 2.0 even...i'd be quite happy with 2.1 :-) <MoronicAcid>Dumb test for stat-prof, but I needed something that ran sufficiently long. <wingo>janneke: i left it with mark i think, he proposed the patch but said he wasn't confident in it yet <wingo>i have removed the need for thread cleanup handlers <wingo>i think i am going to remove them without a deprecation period; civodul you have any thoughts there? <wingo>they appeared in 2.0 for the first time <wingo>but are a pretty weird interface; setting a cleanup handler effectively overrides the thread's return value <wingo>and they are better handled with a dynamic wind on the scheme side by the thread creator <wingo>or on the c side with a pthread key destructor <wingo>they call back into guile mode after leaving guile when threads stop <wingo>first appeared in a commit whose log is " Changes from arch/CVS synchronization" :P <janneke>mes> (define-syntax m1 (lambda (x) x)) <janneke>error:#f:(~a ~s invalid syntax lambda) <janneke>ACTION can write his own define-syntax macro and insert a primitive-eval...then it works for simple cases <civodul>wingo: no idea, would need to think about it <civodul>we were using 'ChangeLog' files at the time :-) <wingo>civodul: in parallel i removed them. i can revert, v happy to do so if that is the right thing <wingo>but maybe the patch is more concrete and reviewable that way too