IRC channel logs

2016-08-02.log

back to list of logs

<daviid>ACTION thinks guile-gtk should be removed from guile's web pages, or clearly state it's an old binding and users should consider guile-gnome instead...
<dsmith-work>At one time, you could build guile-gnome with only the gtk parts configured.
<daviid>dsmith-work: you still can
<dsmith-work>Cool
<cmhobbs>i'm going to give gnome-guile another shot, how do i know what my guile prefix is? i installed it via apt
<cmhobbs>i guess i should build guile from source since apt only has 2.0.11 on jessie
<cmhobbs>oh, that's stabl
<cmhobbs>e
<cmhobbs>guile -c "(display (%global-site-dir)) (newline)"
<cmhobbs>magic
<daviid>cmhobbs: yes, it's all described on the web site and in the INSTALL file
<daviid>cmhobbs: I assume you grabed the very latest tarbll right?
<daviid>cmhobbs: follow the step very carefully, especially the guile-cairo 'notes', then you should be good in less then 15min
<daviid>*the steps
<cmhobbs>correct
<cmhobbs>working on it
<cmhobbs>i'm spoiled by things like ctan/cpan/rubygems
<cmhobbs>quicklisp
<cmhobbs>etc.
<daviid>cmhobbs: do you have, by any chance multiple guile version installed? I can't think of anything being the cause of your previous attempt and Gule not finding (gnome-2) after complete installation (assuming no failure...)
<daviid>cmhobbs: you can use guix
<cmhobbs>i don't
<cmhobbs>i want to use guix pretty badly but my local install is corrupted
<cmhobbs>i was going to toss guixsd on one of my border machines but the usb controller in it died
<cmhobbs>guix is great
<daviid>corrupted? that's pretty bad :-/
<cmhobbs>well, i couldn't resist tinkering :(
<cmhobbs>it wasn't guix's fault
<cmhobbs>i intend to just use guix the next time i install a clean copy of jessie but that'll be a while
<cmhobbs>i guess i could start using guix by default and slowly remove packages installed via apt
<daviid>cmhobbs: i recommend you install guile-gnome and deps in /opt, or anywhere else, but not in /usr, just an opinion
<daviid>could be in your own opt subdir
<cmhobbs>noted
<cmhobbs>bah
<cmhobbs>These wrappers failed their prerequisites and will NOT be built: cairo corba gconf gnome-vfs gtk libgnome libgnomecanvas libgnomeui
<cmhobbs>looks like i need to find and install some more deps
<daviid>cmhobbs: you need to add the $prefix/lib to /etc/ld.so.conf.d
<daviid>cmhobbs: wait, no big deal
<daviid>just apt-get install -dev packages of the wrappers you want
<cmhobbs>i was aiming for gtk and installed the -dev packages of 2 and 3
<daviid>cmhobbs: you don't need to install all, just as you wish
<cmhobbs>it doesn't seem to notice
<daviid>the list is on the web-page
<cmhobbs>it will build these, though
<cmhobbs> atk glib libglade pango
<cmhobbs>man, i just want to wrap some stuff in a gui
<daviid>you need gtk, i think
<cmhobbs>haven't been knee deep in deps like this since i was writing perl years ago
<daviid>and libgnome libgnomeui if you want to integrate your app in gnome
<cmhobbs>good to know
<daviid>cmhobbs: it's because you are manually installing of course, you wouldn't have to take care of this if we still had a debian package or if you use guix
<cmhobbs>i don't intend to integrate it but i'll make note of that
<cmhobbs>correct
<cmhobbs>i would prefer to use gix
<cmhobbs>guix
<cmhobbs>it's a bigger chore to clean up the mess i made, though :D
<daviid>anyway, it is spretty easy to add these with apt-get install ...
<cmhobbs>yep
<daviid>and you only have to do it once
<cmhobbs>well crap
<cmhobbs>i installed all the gtk stuff it requested but it still won't build for gtk
<cmhobbs>i'm going to try to make clean and reconfigure
<daviid>you mess *gtk-dev let me check
<daviid>apt-get install libgtk2.0-dev
<daviid>*mess/miss
<cmhobbs>libgtk2.0-dev is already the newest version.
<cmhobbs>i may just try to uninstall and re-install guix
<cmhobbs>clear out my old crap and start there
<cmhobbs>remove the apt-guile package if i can get guix running again
<daviid>cmhobbs: well, i think er are pretty close
<cmhobbs>gtk+-2.0 >= 2.10.0
<cmhobbs>is the requirement
<daviid>apt-get install libgtk2.0-0-dbg
<daviid>cmhobbs: yes, the proble is not that
<cmhobbs>libgtk2.0-0-dbg is already the newest version.
<daviid>try what I just pasted
<daviid>wow, then you have a debian distro problem
<cmhobbs>:(
<cmhobbs>alright, well i'll try to get guix reinstalled
<daviid>wait :)
<cmhobbs>?
<daviid>does it say you have gdk and gdk-pixbuf,
<daviid>edit your config.log to find out what is missing, what is the first missing ?
<cmhobbs>configure:13742: WARNING: not building gdk/gtk due to missing guile-cairo
<cmhobbs>there it is
<daviid>cmhobbs: then, you did not follow carefully the steps of the web pages and the INSTALL :)
<cmhobbs>i still need to get guix working ;)
<daviid>cmhobbs: could be but it will take a lot more time
<cmhobbs>eh
<cmhobbs>i'm ok with that
<cmhobbs>i want to use guix
<cmhobbs>before i started poking it, i had a perpetual locale warning and it didn't work in emacs
<daviid>fine, but if you wish I'm happy to finalize this debian as well
<cmhobbs>sure. i'm going to grab the bleeding edge guile-cairo and get it running
<daviid>so, git clone git://git.savannah.nongnu.org/guile-cairo.git
<cmhobbs>yep
<daviid>./autogen.sh --prefix=...
<daviid>make ; make install
<daviid>cmhobbs: did you install g-wrap ?
<daviid>make sure you remove the g-wrap debia package first! grab the tarball
<daviid> http://www.nongnu.org/g-wrap/download.html
<cmhobbs>great
<cmhobbs>before the g-wrap stuff, configure says it'll build gtk
<daviid>but did you install the latest g-wrap?
<cmhobbs>yep
<daviid>did you remove the debian package?
<daviid>ok
<cmhobbs>i never had the debian one installed
<daviid>great
<cmhobbs>make is running
<cmhobbs>fingers crossed
<cmhobbs>it'll take a while on this underpowered netbook
<daviid>cmhobbs: make check must pass for guile-gnome (if you install guile-lib, did you?)
<daviid>guile-lib from the tarball as well
<cmhobbs>i'll run make check. i'm pretty sure i installed guile-lib but that was two days ago
<cmhobbs>i wish i could use guix-sd on this netbook
<daviid>cmhobbs: great
<cmhobbs>hm, only one failing test
<cmhobbs>ah, it's gwrap
<daviid>what failed?
<cmhobbs>i've got it installed int he wrong place
<daviid>what $prefix did you choosed? you must add this $prefix/lib to /etc/ld.so.conf.d/ like adding opt.conf in that dir with the content being /opt/lib and run ldconfig as root
<daviid>(if you choosed /opt of course ...)
<cmhobbs>well, guile is in /usr/share, so i've been using that
<daviid>cmhobbs: do as i say :) guile-gnome, g-wrap .. add to the $prefix/lib, you _must let this known to debian
<cmhobbs>alright
<cmhobbs>i'm gonna have to hang this one up for a while. gotta get my kiddo to bed
<cmhobbs>daviid: thanks for the help so far
<daviid>cmhobbs: ok, welcome
<sapientech>hi all, curious how much the guile community uses packages like https://gitlab.com/groups/wak and https://github.com/ijp
<sapientech>I think they look interesting, and would be up for packaging them for guix if people had use for them
<sapientech>also, wingo im looking to get started on guile-emacs. given the lack of information online about the project, not sure if i should start on guile-for-guile-emacs or guile-emacs
<sapientech>one big todo is speeding up dynamic scope, which i imagine is a part implementation, part optimzation issue?
<sapientech>other seem to focus on guile-emacs related things, like buffer issues, etc
<wingo>sapientech: i think paroneayea knows most about the state of guile-emacs
<wingo>in guix there is a guile-emacs package that is reasonably up-to-date iirc
<wingo>i think there is some optimization yet to do, yes. let me know when you get guile-emacs working and we can talk about it
<civodul>Hello Guilers!
<artyom-poptsov1>Hello civodul
<civodul>hey, artyom-poptsov1
<civodul>how are you?
<artyom-poptsov1>civodul: Not bad, thanks. Preparing for the coming academic year (I'm teaching students now in a local college.)
<civodul>oh, nice
<civodul>computer science classes?
<artyom-poptsov1>Yes; mostly OOP and MCU programming.
<civodul>MCU?
<artyom-poptsov1>civodul: Microcontroller unit
<civodul>oh, cool
<brendyn>*sigh*. After 3 days, 60 lines of Scheme code, I still cannot make guile do this: `cat */*html |ack -o "Download.{0,15}\\('.{0,15}'\\)"'
<brendyn>Currently Emacs is locked up using 100% CPU trying to output A several MiB long list from list-matches
<brendyn>Which is actually not even the results, rather its a list containing a 3MiB string and a whole bunch of vectors corresponding to the regex's results
<brendyn>Whenever the matches come back #f, the code cannot deal with it, so it's seems I'll have to add even more conditions for dealing with that.
<brendyn>It's possible guile is actually trying to output something like 3 million factorial long list
<brendyn>It doesn't help that I'm getting #<unspecified> all the time too
<brendyn>Naturally this is all my fault of course.
<amz3>brendyn: good luck :)
<brendyn>amz3: I gave up and did in bash in 30 mins
<ArneBab>brendyn: it’s much easier to go for the route you already know
<ArneBab>and there are things bash excels at
<amz3>+!
<amz3>+1
<davexunit>brendyn: is this intended as a dig against guile? it sounds to me like your implementation is just too naive. ack is a very big program that surely has many optimizations so that it can work efficiently.
<davexunit>processing the entire file at once with a regexp is a surefire way to overload a system with a large enough file
<brendyn>I am just hating on myself for being dumb
<davexunit>I don't think you're dumb. you have encountered one annoying issue with emacs that I would like to see fixed.
<davexunit>I've frozen emacs by trying to print bytevectors that are really large
<davexunit>it's partly a guile/geiser problem, too. I wish there was some way of limiting the amount of characters that the printed representation of an object would use.
<davexunit>brendyn: anyway, I think working line by line would be an easy way to achieve a more efficient program.
<brendyn>My brain finds it really hard to understand what a recurisive procedure does
<davexunit>that way only a small part of a file is read at a time, keeping memory usage relatively constant no matter how large the file being processed.
<davexunit>unless of course the file is just one giant line.
<davexunit>brendyn: recursion can be tough to wrap your head around.
<brendyn>Actually, I think trying to use recursion and map was a part of the problem, because I was loading in inherently messy text files.
<davexunit>but once you get it, and you will get it, it becomes very natural.
<davexunit>yeah, map is probably not what you want to use since you're dealing with IO
<davexunit>which is a stateful thing.
<brendyn>This is my solution without defining any functions http://127.0.0.1:8080/ipfs/QmVf5XCkHw8UnMXVxLurGqDFFeby6QDv8wTTm5izhZUyCj
<davexunit>the (ice-9 rdelim) module has a read-line procedure that you may find useful
<davexunit>my IO loops usually look like this
<davexunit>(let loop ((line (read-line port))) (unless (eof-object? line) ... (loop (read-line port))))
<davexunit>brendyn: I can't open that URL because the host is 127.0.0.1
<brendyn>Oops, my browser redirected it
<brendyn> https://ipfs.io/ipfs/QmVf5XCkHw8UnMXVxLurGqDFFeby6QDv8wTTm5izhZUyCj
<brendyn>This is the poor mans way of hosting files :p
<davexunit>looks like you are scraping a web page
<brendyn>I just type ipfs add *sh; and a few seconds later anyone else can get my file. Only ugly bit is that the file name is an obscure hash.
<davexunit>using the htmlprag library might be a good idea
<davexunit>brendyn: pretty neat way of hosting files, though. I dig it.
<brendyn>Have you read about IPFS?
<davexunit>not really
<davexunit>quite ignorant there
<brendyn>I think it would be awesome for guix to use it once it is stable software.
<brendyn>It's basically like torrents with DHT only, but for individual files referenced by their hash.
<brendyn>so that link I sent you will only ever return that same file. (well, actually that's just a http gateway since you don't have ipfs installed)
<brendyn>Instead of having dedicated mirrors all over the world, guix could just sign a ipfs hash stating it to be the hash of a package and then users simply download dynamically from seeders nearby.
<brendyn>Becoming an "official" GuixSD mirror would be as simple as `ipfs pin add Qm...hashorepoIPNS/packages/
<davexunit>yeah things like ipfs and gnunet would we great for distributing binaries
<brendyn>It is quite an ambitious project, effectively intending to replace most uses of HTTP.
<brendyn>Once they have improved IPNS, it will be possible to have mutability, allowing for websites to have a stable url that can be updated.
<dsmith-work>Morning Greetings, Guilers
<davexunit>haunt now has built-in support for guile-commonmark :)
<cmhobbs>davexunit: i never could get haunt to work when i downloaded it from your site. i'm going to try from guix later this week
<cmhobbs>my env is pretty messy though
<davexunit>cmhobbs: what problems did you encounter?
<cmhobbs>davexunit: arbitrary stack trace
<davexunit>usually people just don't configure guile's load path correctly
<cmhobbs>it's been a while
<cmhobbs>not helpful
<cmhobbs>heh
<davexunit>well if you ever try again and run into issues, let me know.
<davexunit>I haven't hacked on it much lately, but a few passers by have thrown a patch or two at me that I've applied.
<davexunit>I should make a new patch release or something
<civodul>davexunit: \\o/
<civodul>how come we don't have a guile-commonmark package yet? :-)
<davexunit>I encouraged the author to write one ;)
<paroneayea>davexunit: ooh cool
<paroneayea>davexunit: I now have a few contrib modules snarfed from haunt in pubstrate ;)
<paroneayea>well, json.scm wasn't from haunt
<paroneayea>but web.scm and mime-types.scm are
<davexunit>:)
<davexunit>json.scm... that thing I never finished. sigh.
<paroneayea>what's the recommended way to refer to a path in your package?
<davexunit>is this a #guix question?
<paroneayea>nope
<paroneayea>is there a "location of this module" procedure? or should I use something autotools
<paroneayea>like, if I bundle some static assets
<paroneayea>with my web application
<paroneayea>and I want to serve them in devel mode and refer to them
<davexunit>oh that's pkgdatadir in autotools-speak
<davexunit>I can show you what I do in Sly
<paroneayea>davexunit: would be much appreciated!
<davexunit>here's the file that I have autoconf substitute: https://git.dthompson.us/sly.git/blob/HEAD:/sly/config.scm.in#l28
<davexunit>I use an environment variable so that I can override the asset path for development
<paroneayea>davexunit: perfect
<paroneayea>thank you :)
<paroneayea>pubstrate is going pretty well and pretty fast. I'm glad I switched over to Guile
<davexunit>here's the weird autoconf magic I did to create the "sly_datadir" variable https://git.dthompson.us/sly.git/blob/HEAD:/configure.ac#l15
<paroneayea>(with the exception that I had hoped to show something by today's meeting!)
<davexunit>stolen from Guix. super gross but works.
<davexunit>so, if you do something like './configure --prefix=/usr'
<davexunit>sly_datadir would be /usr/share
<davexunit>(or (getenv "SLY_DATADIR") "/usr/share/sly")
<paroneayea>davexunit: useful, thank you
<davexunit>np!
<paroneayea>ACTION adds another useful hack he doesn't understand to his autotools ball of mud :)
<davexunit>finally, the pre-inst-env wrapper script sets SLY_DATADIR https://git.dthompson.us/sly.git/blob/HEAD:/pre-inst-env.in#l30
<davexunit>in Sly, the 'data' directory has all the assets
<davexunit>paroneayea: at least you can always add more mud to a ball of mud :)
<paroneayea>davexunit: yup :)
<davexunit>I need to write a short presentation about Sly to deliver at the lisp games meetup happening soon
<paroneayea>\\o/
<paroneayea>oh man I'd love to go to that meetup!
<paroneayea>not gonna travel out for it tho ;)
<davexunit>yeah it's just a small gathering
<paroneayea>I'd love to go to a lisper usergroup in general
<davexunit>hopefully dto has the means to record the talks
<paroneayea>the only ones I've seen active are clojure ones
<davexunit>yeah :(
<davexunit>same
<paroneayea>hm
<paroneayea>ACTION thinks about a good place to put default state for people running development instances of his project
<paroneayea>too bad there's no ~/.state the way there's ~/.config
<paroneayea>maybe that's what ~/.local/ is
<paroneayea>yep looks like ~/.local/
<paroneayea>ok, maybe I'll give that a shot
<davexunit>is that where guile stores auto-compiled files?
<davexunit>nvm, that's ~/.cache
<paroneayea>yeha
<paroneayea>yeah
<paroneayea> http://askubuntu.com/questions/14535/whats-the-local-folder-for-in-my-home-directory it looks like I'm right
<amz3>héllo!
<ArneBab>davexunit: you ould also use automake: confdir = @datarootdir@/conf/
<ArneBab>could
<ArneBab>in Makefile.am
<ArneBab> @datarootdir@ = PREFIX/share
<davexunit>ArneBab: I *may* have had an issue with that, but I don't recall.
<davexunit>paroneayea: I would try ArneBab's suggestion and see if it works for you
<davexunit>if it works, less autoconf garbage
<paroneayea>ArneBab: thanks :)
<ArneBab>users can then do a user-local install via --prefix ~/.local
<ArneBab>paroneayea: glad to ☺
<paroneayea>ArneBab: I might not understand what you meant, though it looks like it still has references to "${prefix}" in the variable
<paroneayea>which makes it not easy to embed in guile
<paroneayea>but maybe I don't understand
<davexunit>I think that's why I didn't use it
<davexunit>and had to use that hack that removes things like that
<paroneayea>davexunit: it took me a bit to realize what that hack did. Pretty hacky :)
<davexunit>yup :/
<amz3>taylan: héllo, regarding scheme bytestructures, what's the correct way to work with the library given a pointer?
<amz3>Should I convert manually the pointer to a bytevector, using bytestructure-descriptor-size
<amz3>I am looking for something like: (define bs (bytestructure descriptor pointer)) then use the macro based API to access the different fields
<amz3>Also, I'm not sure what's the purpose of the unwrapper
<taylan>amz3: yeah you'd need to pointer->bytevector yourself in that case.
<taylan>the unwrapper is part implementation detail part convenience form for whatever purposes
<amz3>you mean that I don't need it?
<amz3>taylan: ^
<amz3>a small advice regarding the documentation, it would be helpful to have a examples that are "talking" like instead of 3x5 matrix use a 2d point of 3d points something like that
<amz3>I assume this --> (bs:vector 5 (bs:vector 3 uint8))
<amz3>is 5x3 matrix of uint8
<amz3>it's never written in the doc
<amz3>anyway, I will try with what I have thx!
<avoine>davexunit: I've made this little drawing program with sly + gtk/cairo http://paste.lisp.org/display/322001
<avoine>and I wanted to ask you if you have an idea for a way to manipulate data in a signal-fold from the cooperative REPL?
<avoine>and can replace the signal but I don't know how I could "call" one
<davexunit>avoine: interesting use of just (sly signal)!
<davexunit>leads me to think that maybe it should be its own separate library some day
<davexunit>let me think about your question
<avoine>ok
<davexunit>avoine: could you describe what you want to manipulate a bit more?
<davexunit>and what you mean by "call"?
<avoine>davexunit: I want to be able to add a circle in the alist this is in the forms signal
<avoine>davexunit: like simulating what the "c" key would do but from the repl
<davexunit>you can set arbitrary values by mutating the signal via signal-set!
<davexunit>(signal-set my-signal 'foo)
<davexunit>er, (signal-set! my-signal 'foo)
<davexunit>does that do what you need?
<davexunit>the problem there is that that value will be "lost"
<avoine>I'll try it
<davexunit>well, maybe not. need to look.
<davexunit>yeah, the value will be lost the next time the folding procedure is called
<davexunit>but that's only because of a flaw in my implementation.
<wingo>mew
<paroneayea>howdy wingo
<wingo>heya paroneayea :)
<paroneayea>heya wingo
<paroneayea>ACTION currently porting his WIP-federation-web-application from python to guile
<paroneayea>it's going pretty well!
<civodul>paroneayea: woo, didn't know you were taking that road, nice!
<paroneayea>civodul: :)
<paroneayea>yeah I was having trouble staying motivated on the python side, and it turns out the libraries I thought I needed from python weren't helping as much anyway
<paroneayea>so, back to guile
<civodul>i hope it'll be fruitful :-)
<paroneayea>:)
<paroneayea>seems to be going well so far
<wingo>paroneayea: fun!
<DeeEff[m]>What kind of web application are you making?
<paroneayea>DeeEff[m]: federated social network
<DeeEff[m]>Oh, similar to something like Diaspora I suppose? Not that I ever used any federated social networks...
<paroneayea>DeeEff[m]: yup, something similar to that
<paroneayea>but based on some w3c standards work I am involve din
<paroneayea>*involved in
<paroneayea>hm
<paroneayea>hashing algorithms and guile
<paroneayea>I guess I should just use the ffi and libgcrypt probably?
<paroneayea>ACTION considers snarfing guix's code
<amz3>is it possible to convert a vu8 into a vu64 ?
<amz3>basically I have an array of pointer termined by a null pointer
<amz3>I'd like to retrieve that array of pointer as scm pointers
<lloda`>davexunit: maybe you've looked it up already, but there IS a way to limit repl output by setting repl-hook and using the ~y specifier of (format). Lost the original link, but I have this as my .guile http://paste.lisp.org/+6WHC
<lloda`>unfortunately this is not enough as you need separate hooks for error printing so you can still be swamped in output. I tried to look into those hooks but I didn't get far. I think it can be done. Anyway, I hope this helps.
<davexunit>lloda`: thanks! I'll look into it more later
<paroneayea>hm
<paroneayea>civodul: I'm trying to snarf the libgcrypt stuff from guix, though I don't really understand how autotools finds the m4/guix.m4 in the first place
<paroneayea>if you don't mind enlightening me :)
<daviid>strange, M-x magit-status took 2 min (no joke, clock in hand) to start, anyone has faced this before? I feel I'm hacked!
<paroneayea>daviid: have you run "git gc" recently on the repo?
<daviid>paroneayea: autotool find because configure.ac specify to use m4
<daviid>paroneayea: no, tx
<paroneayea>daviid: ah you were right
<paroneayea>I hadn't seen this line
<paroneayea>AC_CONFIG_MACRO_DIR([m4])
<paroneayea>adding that fixed it
<daviid>yep
<civodul>exactly :-)
<paroneayea>ok cool
<paroneayea>I think that's enough to proceed :)
<amz3>I am using format to convert an array of bytes to an integer