IRC channel logs

2021-04-27.log

back to list of logs

<davexunit>rekado: guix pack would have made for a massive download
<davexunit>the binary bundle I threw together is admittedly just grabbing libraries from ubuntu + the guile deps that I built
<davexunit>it worked on the only other machine I could test on, but of course nothing is easy so it blows up in fun ways elsewhere :(
<civodul>wingo: the "guix build" command above ran to completion though Guix compilation was slow (i was missing the env var), and it triggered a couple of test failures in Guix having to do with source location that i'll have to investigate
<davexunit>rekado: since you have guix, that's the best way to do. ignore that bundle entirely.
<davexunit>way to go*
<rekado>heh, okay :)
<rekado>I thought it was a guix pack, so it was a surprise to see it fail
<rekado>I wonder if you could speed up the build of the patched Guile by adding Guile to the inputs, so that it doesn’t need to bootstrap.
<davexunit>rekado: oh maybe. I was also told of a way to skip building guile altogether.
<davexunit>haven't had time to implement it, though.
<davexunit>back to work this week and very busy
<zzappie>leoprikler: "Digital Deluxe Tarball $200 USD" :D
<daviid>can a pythonist tell me, out of curiosity, if the python default repl and raised exception printers truncate their outlput? like ny
<daviid>hum hit enter before ending my quiz ...
<daviid>but anyway, like numpy?
<zzappie>daviid: From my experience no... Only time I saw truncated output was outputing recursive structures eg "l = ["recursion->", 0]; l[1] = l"
<daviid>zzappie: so, you define a vector of 20 millions floats, it displays the 20 millions floats in the python repl
<zzappie>daviid: im dooing it righ now
<zzappie>... 19999997, 19999998, 19999999] well yep
<zzappie>but it could easily do weird things that are not well documented in other cases... Im saying haven't came accros such feature as guile's ",set print" in python
<daviid>zzappie: ah tx - pythonist do not use emacs ... but still, it surprises me - i guess pythonist who daily work with large structures do configure the repl and raised exception printers to truncate though ... but don't worry, i was just curious
<daviid>fwiw, in guile, the backtrace printer(s) do(es) truncate (by default) ... it is just unfortunate our repl and raised excpetion printers don't do that by default as well ...
<zzappie>daviid: according to stats pythonistas are the most common emacs folk kind ;)
<zzappie> https://emacssurvey.org/2020/
<daviid>zzappie: ah, then those emacs users do not use large structures ... ot there is an easy way to configure both the python repl, raised exception and backtrace printers to truncate ...
<daviid>zzappie: did you succeed in configuring guile for this matter? last thing i remember is you complained it was not working in geiser, which i responded it does ... then had to leave and forgot to follow ...?
<zzappie>daviid: yep! I got it working, but I already forgot what was the issue...
<zzappie>Ah now I remember. Setting it in .guile has no effect on geiser. But doing in geiser repl does
<daviid>zzappie: that is the symptom of another problem
<daviid>zzappie: did you patch (ice-9 boot-9), as recommended in guile-cv's manual?
<daviid>for the error printers i mean ...
<zzappie>daviid: no I didn't do that one, cause I generally dont get big error outut. I usually hang emacs by accidentally printing guixes operating-sysstem structures or guix derivation building outputs.
<zzappie>but I taken notes :)
<zzappie>thank you for pointing out
<daviid>zzappie: ok - because the guile-cv manual describes the steps to edit the file, but lloda wrote a patch, one for 2.2 and one for 3.0, so now it is quite easier
<daviid>quite easier then manually edit (ice-9 boot-9) i mean - but still very inconvinient, granted ... if you need help ping us, lloda may help as well ...
<daviid>zzappie: now, that a guile session 'in geiser' doesn't load your $HOME/.guile content is not normal -
<zzappie>I usually go through early cycle of emacs config complications and rewrite... Maybe I just misconfugured something
<daviid>does it loads the .guile file if you launch guile in a terminal (not emacs)?
<zzappie>daviid: yes
<daviid>ok, and what about in an emacs terminal, no geiser, just M-x shell, then guile
<zzappie>works
<daviid>ok, so M-x run-guile (which should start guile in geiser) fails?
<zzappie>Yep only geiser repl doesnt truncate
<daviid>hum, are you using repl-default-option-set! 'print ...
<daviid>or anotehr way maybe?
<zzappie>exactly: (repl-default-option-set! 'print (lambda (repl obj) (truncated-print obj) (newline)))
<daviid>zzappie: and you do import (use-modules (ice-9 pretty-print) (system repl common)) before that call right?
<daviid>in the .guile file i mean
<daviid>zzappie: in your .emacs, do you have (setq geiser-guile-load-init-file-p t)
<zzappie>yes, I do import (use-modules (ice-9 pretty-print) (system repl common)) but I didnt set this variable
<daviid>ok, please try that and restart an fresh emacs
<daviid>or execute in *scratch*
<zzappie>Works! but the repl is soo sloo now :)
<daviid>really? i never noticed it was slow
<zzappie>restarted emacs, same thing geiser-guile-load-init-file-p causes repl to take charecter per second
<zzappie>zero net game...
<daviid>when you type something? that does not make sence either
<daviid>:)
<daviid>here, the geiser session is a fast as it can be, instantaneous
<zzappie>just runned the profiler seems the reason for slownes is company-mode
<zzappie>wihout company mode its snappy again
<daviid>zzappie: ah, don't know what company mode is
<zzappie>its completion framework https://company-mode.github.io/
<daviid>ok i see - well geiser completes for you anyway
<zzappie>i think geiser uses its backend to company mode if company mode is enabled
<daviid>maybe you can ask an emacs 'pro' how to disable that mode in geiser, and scheme eiditing files, but not in other buffers ...
<daviid>zzappie: fwiw, #geiser the author is jao, very nice and responsive ...
<daviid>not an emacs nor a geiser config expert ... but i am glad we solved your geiser loading .guile problem
<zzappie>daviid: Thank you for helping out! The time will come when Ill see <#operating-system # ...> in repl and wont have to restart emacs :)
<daviid>zzappie: welcome - whenever you have some time, you may patch guile for the raised exception printers ...
<daviid>zzappie: then you can even use guile-cv :):)
<daviid>which is in guix :) - but don't try it unless you patch the raised exception printers as well ... which i'm not sure how one does that in guix - maybe guix could offer a pre patched guile with lloda's patch
<zzappie>its pretty -- easy you can inherit package and specify patch file
*zzappie going to zzz
<daviid>ok good night
<rlb>wingo: do we promise that a SCM value can always make a safe round trip through a "void *" (via SCM_UNPACK/PACK)?
<leoprikler>Unless there's something in between, that should be the case.
<rlb>In between?
<rlb>You mean unless something messes with the void pointer?
<leoprikler>It probably just depends on the bits of the pointer, but I'm not too sure what happens if you mess with the SCM it was generated from
<leoprikler>Certainly, if you do get the messed SCM back, then expect that mess
<wingo>rlb: it is a good question :) two factors: aliasing and size. guile compiles with -fno-strict-aliasing so no problem there; i have never been sure about users but they should be less exposed to the internals of SCM, so less of a risk
<wingo>as far as size -- not sure. on mingw64, pointers are 32-bit, but we want to allow 64-bit fixnums
<wingo>but that part of the mingw patch hasn't landed yet i think
<wingo>fwiw SCM_UNPACK / SCM_PACK converts to scm_t_bits, the question is really about whether sizeof(void*) >= sizeof(scm_t_bits)
<rlb>wingo: ok, well if there's any question now (or wrt what we might want to do the future), then my answer is "no" :)
<wingo>:)
<rlb>And thanks. The reason I asked is because I could make some slightly more general (internal) helpers for utf8 if I could have a "void *data" argument to a C function (callback loop) that could be provided either an SCM or some C struct (to be interpreted by the provided callback). But I can always do "something else". Could either provide a pointer to a pointer to an SCM, or provide to flavors, or...
<rlb>"pointer to some C struct, or whatever"
<wingo>moo
<civodul>hey wingo!
<wingo>hi :)
<qrpnxz>howdy folks, trying to import a library i made with the r7rs syntax. Doing `(import (example library))` but guile doesn't seem to understand. What is the correct way? Thanks
<leoprikler>qrpnxz: i think (import) in this way is only legal inside a library form
<qrpnxz>so in guile if i want to import i have to put main in a library or smth? how does that work?
<leoprikler>oh, wait, it seems the repl eats it even without specifying r7rs
<qrpnxz>i'm running `guile --r7rs` is that helps
<qrpnxz>`guile --r7rs filename.scm` rather
<wingo>qrpnxz: is it a path issue?
<wingo>i assume you have an example/library.scm somewhere?
<qrpnxz>i import in the same file i define it, though i'd like to know how it searches for files as well
<qrpnxz>mm, i'll try that
<wingo>ah. for that i would think it would work if you define the module before using it
<wingo>but not otherwise
<leoprikler>-L . if you have it in your local tree at example/library.scm
<qrpnxz>it was able to import if i put it in such a file and used -L i think
<qrpnxz>though the lib itself didn't work, was trying to do smth like (define-library (qrpnxz func) (export (lambda func))) to rename lambda but no dice hahaha
<qrpnxz>define-syntax also didn't work for some reason
<qrpnxz>i'm not even able to (import (scheme base)) within a file so that's weird
<qrpnxz>no problem in the interpreter however
<wingo>sounds... weird :)
<qrpnxz>`import` is not bound when i run a file
<qrpnxz>define-syntax also works fine on interpreter
<qrpnxz>interesting! after doing define-library on the interpreter, i'm also not able to import anymore. On the prompt, "guile-user" is replaced with the library name
<qrpnxz>it's like it's doing some weird scoping thing idk
<qrpnxz>not sure what the "guile-user" is supposed to indicate, perhaps guile just doesn't allow other stuff in the same file as a define-library? idk
<wingo>don't you have to explicitly declare all imports in the define-library form?
<wingo>"import" is a purely syntactic thing in r7rs iirc, has to be in the define-library form
<wingo>if you want the macro version you have to import it from guile
<qrpnxz>the imports in the define-library are scoped in the library tho no? like it defines what stuff you can use within the definition of the library
<qrpnxz>import can be used outside in r7rs, that's how you use libraries
<wingo>only at the beginning of a program tho, right?
<wingo>like there are "programs" and "modules"
<wingo>libraries rather
<qrpnxz>don't think so since The Library Example in the standard has some libraries define and immediately after uses them
***sneek_ is now known as sneek
<wingo>and import is still just syntactic in programs iirc -- guile allows it anywhere in a program but that's an extension
<qrpnxz>see page 29 of https://small.r7rs.org/attachment/r7rs.pdf
<qrpnxz>import decl are on p25
<qrpnxz>not sure what this is getting at: `unexpected syntax in form ()` i get it from
<qrpnxz>(define-library (func)
<qrpnxz> (export func)
<qrpnxz> (begin
<qrpnxz> (define-syntax func
<qrpnxz> (syntax-rules ()
<qrpnxz> ((func args ...) (lambda args ...))))
<qrpnxz> ))
<qrpnxz>from importing this that is
<qrpnxz>bruh it's telling me `begin` is not bound wtf?
<qrpnxz>lol i had to import (scheme base) for basic stuff like `define`, how unexpected
<qrpnxz>alright, works
<qrpnxz>well, using it right after on the same file doesn't work, but importing it and using it works
<qrpnxz>probably because of that weird context switch thing
<wingo>generally speaking multiple r6rs / r7rs modules in one file are not well supported -- see https://www.gnu.org/software/guile/manual/html_node/R6RS-Incompatibilities.html
*wingo notes a couple of updates to make to that page
<qrpnxz>it looks like guile doesn't support (begin) in libraries, instead what you do is define all your stuff at the beginning and then have a define-library at the end of the file
<qrpnxz>ah nice link thanks
<taw10>Is it possible to use Guile's Dynamic FFI for accessing C++? The stuff I want to use is idiomatic C++, not the C subset (i.e. I need to call at least one constructor with a double colon in its name). Or, should I just write a thin wrapper with libguile?
<taw10>My feeling from reading the manual is that it's possible under non-portable assumptions about what the actual symbol names in the C++ library are, and that it'd be better just to write the wrapper
<leoprikler>taw10 if you write a C header, you should be able to use everything as-is. Otherwise consider using something that's specific to C++ like Schmutz
<apteryx>any way to debug a .scm file not being prefered to a stale .go file?
<apteryx>I have this weird situation where a .scm file is newer than its corresponding .go file (which live in the same tree) doesn't prevail
<apteryx>s/ is//
<leoprikler>If you don't want to trace Guile's resolve-module, you could copypasta the code and instrument it.
<leoprikler>then call (my-resolve-module '(bad module))
<leoprikler>of particular interest might be the file-is-newer? check
<apteryx>Thanks for the hints
<lloda>what's the deal with build-aux/config.rpath? It got updated with gnulib but it seems autogen writes over it. Should it just be removed from git?
<wingo>i don't recall
<wingo>if it was added recently and autogen writes it, it can be removed
<lloda>testing
<lloda>yeah looks like. Ok i'll remove it
<dsmith-work>UGT Greetings, Guilers
***ecraven- is now known as ecraven
<manumanumanu>Can I use guix to build the current master of guile??
<leoprikler>You need to add some additional inputs for the bootstrap, but yeah
<wingo>good evening :)
*wingo pokes guile release
<civodul>woohoo!
<daviid>wingo: any news on the #47084 'front'?
<wingo>no, haven't gotten to it yet
<daviid>ok
<lampilelo>how can I mark a bug report as having patch available on debbugs? i realized just now that i submitted a patch along with a bug report like 5 months ago and there wasn't any response
<lampilelo>ah, wait, it's been merged already
<lampilelo>i guess i don't understand debbugs
<lampilelo>shouldn't it be removed from the list then?
<lampilelo>ok, it seems i'm very confused, it hasn't been merged, i just have it applied locally
<lampilelo>it's late, don't judge
<cheim0>lampilelo: https://debbugs.gnu.org/server-control.html
<cheim0>specifically, the tags command
<lampilelo>do i need any special permissions?
<cheim0>not as far as I know. I closed a bug once and I haven't gotten in trouble yet ;)
<lampilelo>ok, thanks
<lampilelo>i'll try to use it tomorrow