<n2>Hmm... Which function should I use that, given a list, an index, and a value, returns a new list with the nth element replaced by the new value? ***heroux_ is now known as heroux
<n2>Should I use map? I'm sure this is a common operation. ***darthlukan_ is now known as darthlukan
***michaniskin_ is now known as michaniskin
<n2>I'm having a pretty hard time finding Scheme documentation that makes sense to me. <n2>Wondering if (map (lambda ...) list) passes the iteration index to the lambda somehow, but have no idea where to look that up. <davexunit>in your case, you'd write a simple recursive procedure. <daviid>n2: look at srfi-1, split-at and build your own procedure using append, spit-at and friends, prety easy and a good exercise if you allow me to say so :) <n2>Uhm. ;;; <stdin>:1:0: warning: possibly unbound variable `split-at' <n2>Do I need to import a module? <madsy>Damn.. got guile almost building again, except for an undefined reference to clock_getcpuclockid when linking in libguile <madsy>Anyone got a clue why clock_getcpuclockid is used when building for Windows? gnulib doesn't implement that function. <madsy>And I don't remember how I solved it the last time <n2>I used take / drop instead of split-at because it seemed more intuitive to me. ***adhoc is now known as vk5fj
<n2>Would be nice to hear any feedback. <attichacker>n2: I commented on your gist with some feedback, I'm still a bit new to scheme so someone else might have a better solution :) <n2>attichacker: How nice of ya, thanks :D <n2>My head is spinning, lol. Sticking to purely functional functions is pretty hard for someone like me. <n2>I've actually always been quite romantic about state. <attichacker>Yeah I was quite shocked the first time I started learning haskell haha <attichacker>Have you read "The little Schemer"? Great book if you're getting started <madsy>Hah, I think I finally figured out why this MinGW toolchain had trouble with building guile. <madsy>Later versions of MinGW-w64 comes bundled with libwinpthread which tricks ./configure into thinking a bunch of POSIX stuff is available <attichacker>madsy: Is it a lot of work getting Guile to work on Windows? <attichacker>I'd like to use Guile for cross platform applications but I've heard it pretty difficult to get it built <madsy>attichacker: I had no luck whatsoever with guile from master or 2.1.1. So I tried to build 2.0.11 which was the last version I built successfully for Windows <madsy>2.0.11 finally built successfully here now. I have yet to test it in Windows though. <madsy>And yeah, it's a bit tricky. <madsy>Two things that stick out: Building libgc correctly for Windows is a nightmare until you figure out all the caveats <madsy>And the other is to ensure that ./configure finds all the dependencies, and does *not* accidentally pick up support for something Windows doesn't support, such as unistd.h and pthread_time.h <madsy>The latter happened with me this time. I have to get rid of winpthread somehow <madsy>guile uses gnulib to emulate certain POSIX functionality on Windows. It's just a wrapper. And that breaks if ./configure picks up actual support for POSIX by mistake <n2>attichacker: I haven't, but I'll give it a look for sure :) ***vk5fj is now known as adhoc
<sneek>Welcome back wingo, you have 1 message. <sneek>wingo, davexunit says: looks like I've found another interesting bug: (= (sizeof (list uint32 '* int)) (sizeof (list uint32 '* int int))) <wingo>sneek: later tell davexunit that seems to be introduced post-2.0.11 in 67d8ccc0e4cfd654b45a23264f55a420cf5fd863 <wingo>to an extent having so many people using guix is a bad thing; no one works against git any more :/ <nalaginrut>oh, I never know sizeof accepts a list, and I wrote a redundant thing for the same purpose... <madsy>wingo: I successfully got guile built for Windows again. I hope to make my linode server do automatic builds for the platform :) <madsy>And I think changes in guile 2.1.1 broke something for mingw cross-compiles. I'll try to investigate the reason <madsy>wingo: Just a question though, is it possible to get guile to statically link against libc and libgcc? <wingo>yeah could be. lots of changes there, hopefully nothing too bad tho <madsy>For my setup now, it's easy to get the shared libraries over when they are one of the main guile dependencies, such as libffi and libreadline. But for the libc and libgcc shared libraries, I have to copy them from some arbitrary directory on the build system. <madsy>To make an automated build really clean, it would be nice to get rid of dependences on libgcc-6.dll and such, so I don't have to copy them over <davexunit>wingo: I discovered that it wasn't actually a bug, and I've fixed the relevant code. I didn't test with guile built from git this time around because I didn't have 3 hours to build it. <sneek>Welcome back davexunit, you have 1 message. <sneek>davexunit, wingo says: that seems to be introduced post-2.0.11 in 67d8ccc0e4cfd654b45a23264f55a420cf5fd863 <amz3>What's the prefered hash table module ? <madsy>Ahh.. yeah. Got the unit tests working too :-) <madsy>wingo: 2.1.1 fails to build with MinGW because the new libguile/loader.c has an unfinished (?) conditional build path for systems that lack <sys/mman.h> <madsy>As that code is for loading ELFs, perhaps it shouldn't even be a part of a Windows build <wingo>that build path should work, probably a minor bug then <wingo>in 2.1.1 guile always compiles scheme files to ELF objects <wingo>it includes its own linker and loader <wingo>if mmap isn't available, it should be able to work without it <wingo>i tested that at one point but never on a system that doesn't have mman.h <amz3>hmm.. cooked a mutable graph.scm... <amz3>now let's have a look at this clutter thing... <amz3>this seems so massive... <amz3>héllo taylan, what hash table module do you recommend rnrs hashtable, srfi-69 or something else? <taylan>amz3: depends on your target really. if writing for Guile, any will do. if writing maximally portable code, SRFI-69 may actually be better than RnRS. <taylan>though I hope that rnrs/SRFI-126 will win out eventually (rnrs hashtables fix some issues in SRFI-69) <amz3>I will have a look at srfi 126 <taylan>amz3: it's not even finalized yet... though there's a Guile implementation already. <taylan>but it's a sample implementation and its inter-operation with other hash tables in Guile could be improved (specifically, it should be the same data type as '(rnrs hashtables)'.) <taylan>all in all I would advise against using it at this point <amz3>daviid: what's the purpose of (initialize) in guile-clutter? <amz3>actually, I'm trying to set the size of something dynamically, It seems like its canvas size is what I want but what is drawn is not what I expect <amz3>like I'm drawing a rect, but the result is a square <amz3>Also, actually I will need guidance more guidance on how to draw edges in my graph explorer <amz3>I planned to use bezier curves, but... wait... <amz3>ACTION looking at doc again <amz3>basically, the problem is that AFAIK I can set line thickness <amz3>hence I need to draw it myself, I just want to be sure I'm not missing something from the docs <amz3>I *can't set line thickness ***jmd` is now known as jmd
<daviid>amz3: will look asap, but not exactly now, be patient :) sorry I'm busy with something else... <VG234>Hi everyone. I'm using guile 2.0.11 on windows through cygwin64. Guile doesn't seem to understand cygwin paths in for form of: c:/User/userhome/filename.scm. Is there a way around this? <wingo>VG234: madsy might know, though i think he has been doing mingw <VG234>wingo, is madsy using on freedone? <VG234>wingo, sorry typo. Is madsy usually on freenode? <wingo>i don't know, can't speak to that, he's here now tho. that's all i know <VG234>wingo, Ah.. Should have checked the list first, thanks. <madsy>guile 2.0.11 has a bug with windows paths <madsy>Not sure if it is fixed in later versions <madsy>VG234: But I'm not sure if you experience the same bug as I do. It might be that cygwin itself doesn't like drive letters <daviid>amz3: obviously you should later move the edge functionality to a module, so it gets compiled... fyi, I was actually planning to add these [edges and bezier edges] to grip after the drop example which I'm working on... let's see <VG234>Sorry, I was writing code. :) <VG234>madsy, I've solved the problem within emacs. The way to solve this is to use the cygpath when feeding guile the file. <madsy>VG234: Yeah, sounds reasonable <VG234>Now I have a slightly different error. How do I chop the output so it looks normal? <VG234>#+BEGIN_SRC scheme :tangle yes <madsy>I built guile without cygwin, and it sometimes interpret paths as relative and sometimes as absolute <VG234>: ;;; note: source file /home/Steve/Learning/Programming/Org/CodeBlocks/yes <VG234>: ;;; newer than compiled /home/Steve/.cache/guile/ccache/2.0-LE-8-2.0/home/Steve/Learning/Programming/Org/CodeBlocks/yes.go <VG234>: ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0 <VG234>: ;;; or pass the --no-auto-compile argument to disable. <VG234>: ;;; compiling /home/Steve/Learning/Programming/Org/CodeBlocks/yes <VG234>: ;;; compiled /home/Steve/.cache/guile/ccache/2.0-LE-8-2.0/home/Steve/Learning/Programming/Org/CodeBlocks/yes.go <madsy>Paste on a pastebin, not in the channel <VG234>Opps sorry. I should have posted to link. <VG234>It's a good propram. You did a great job on it. <amz3>I will make this works with the graph datastructure I wrote <amz3>also I should add the ability to move vertices <daviid>amz3: 1 last thing: you should remove line 51, it's done by set-canvas in actors.scm <amz3>this is based on examples/bouncer file <daviid>that line, in bouncer.scm, was an attempt to refresh the canvas after a colour change, but that won't work for other reasons ... [yet] <daviid>amz3: yes, you don't need it here <daviid>amz3: but no big deal either :) it's a no op right now, but no arm either <amz3>ACTION should not delete code <amz3>I need to rewrite some graph algortihm to go through all vertices... <amz3>or maybe I should take it seriously and write a graph library in guile... <daviid>amz3: it's a bit of an exercise right? you could use graphviz, guile-graphviz ... <amz3>I'm convinced that a graph tooling will be helpful at some point for doing CS stuff... the real question is when... <amz3>they are people doing machine learning stuff using graph databases so it's already a thing in some circle <amz3>otherwise it's an exercices. <daviid>amz3: I added --debug to your example, so you can fire geiser and connect-to-guile ... 1970, and play with ... <amz3>ohh too high level for me <daviid>amz3: but that _is_ why we use guile :) to interact with our app, the sooner the better ... :) <daviid>so then you do (set-position *end* 400 150) and you see the edge is not folowwing ... <daviid>amz3: so, you can (define-method (set-position <edge> x y) (next-method) ...) <amz3>what's the purpose of (next-method)? <daviid>to let the work clutter does on any of its methods being done first, that's essential <daviid>amz3: hum, let me explain better, give me a sec <daviid>amz3: ok, I'll cook something and paste it here <madsy>Is there a way to only build the meta/bootstrap compiler? I don't see meta/guile as a Makefile target <madsy>Basically just to save build time, when I only need meta/guile for building guile for Windows <mark_weaver>meta/guile is not a bootstrap compiler. it's a shell script that runs guile after setting environment variables so that guile's files will be loaded from the build directory instead of the installed location. <mark_weaver>there's no short cut. guile 2's performance will be horrible until its compiler has been compiled. that's why it takes so long to compile files in the early stages of the bootstrap. <daviid>amz3: better a short example then a long talk. here is a working but incomplete version which will properly [almost in all cases reposition resize an dge when its start or end changed their own [position]. it is incomplete because it does not handle 2 cases for which the edge width or height becomes zero, left as an exercise for you :) http://paste.lisp.org/+6IW0/2 <madsy>mark_weaver: Ah, right. I thought it built just the bare minimum first <daviid>amz3: note that i on purpose added (set-background-color edge (get-colour "Black")), (set-opacity edge 128), line 157, 158, for you to see and for debugging purposes, you may comment later ... the 'new' code is between line 92 and 114 ... have fun <amz3>thx daviid I'll have look <daviid>amz3: so you can ./edge.scm --debug, M-x connect-to-guile, localhost, port 1970 and in the repl play with like (set-position *end* 400 200) ... <amz3>hmm... I'll try that later, I'm very tired <wingo>i was writing a blog post today on why guile was so slow to build but then got so irritated at it that i am trying somethign else to improve it