IRC channel logs

2014-02-01.log

back to list of logs

<taylanub>My above question can be safely ignored, I seem to have implemented nonsense. :-) Execution is way too late to do that, it has to work on syntax keywords too obviously...
<taylanub>Eh, on the other hand it obviously needs to pass through execution if it will be the output of a procedural macro; I guess I have to pass raw code all the way through and not variable objects. Wonder if I'm even going anywhere with this ..
<taylanub>Gee, I'm going around in circles, I think I could just output variable objects after all, plus a couple special cases for non-macro special-forms .. I better stop my monologue now until at least my mind is clear.
<zacts>hi, is guile-1.8 upwards compatible with guile-2.0?
<zacts>like if a program depends on 1.8 is it safe to have it use 2.0 instead?
<taylanub>zacts: IIRC not but I'm not fully sure
<nalaginrut>morning guilers~
<mark_weaver>zacts: we tried to maintain compatibility in 2.0 for programs written for 1.8, and most programs do continue to work just fine. however, switching from an interpreter to a compiler, and modernizing various things inevitably led to some breakage for some projects that made too many assumptions about how Guile 1 worked internally.
***jao` is now known as jao
<zacts>mark_weaver: ok, thanks. that's what I needed to know. ^_^
<zacts>just fyi, I'm working on porting guile-2.0.9 to FreeBSD ports.
<zacts>I got it to build and I'm almost done with the port.
<zacts>next is pkgsrc
<zacts>and OpenBSD ports
<mark_weaver>zacts: excellent, that's very useful!
<zacts>I'm trying to port schemes to various alternative OS. Also, I hope the OpenBSD-libre project gains some momentum
<mark_weaver>I guess you probably already know that you need to have to link to -lgc-threaded instead of -lgc
<mark_weaver>(or something like that)
<zacts>mark_weaver: I actually disabled threads in guile for now
<zacts>let me double check something
<zacts>but yeah if possible I would like to share my porting efforts with you guys.
<zacts>in case we notice any problems
<zacts>yep
<mark_weaver>it would be much better if you could get it working with threads. I helped someone else with FreeBSD 9.1 a while back, and here's what we found: you need the 'boehm-gc-threaded' package, and pass BDW_GC_LIBS="-L/usr/local/lib -lgc-threaded" to Guile's configure.
<zacts>I'll do that
<mark_weaver>thanks!
<zacts>I found the boehm-gc-threaded. I currently used boehm-gc but I will use threaded
<zacts>(but that was for a non port build, directly from the tarball source.
<zacts>)
<zacts>also there are #! bugs
<zacts>with #!/bin/sh being replaced by #!/nixstuffhere/bin/sh
<zacts>install.sh for example
<mark_weaver>yeah, that was a bug in Guix, which civodul used to make the 2.0.9 tarball. that will be fixed in 2.0.10.
<zacts>neato
<zacts>mark_weaver: how is progress with guix going?
<mark_weaver>obviously, those should just be changed back to /bin/sh
<zacts>mark_weaver: yep, I did that
<zacts>I'm on #guix now
<mark_weaver>Guix has a lot of buzz around it these days. lots of activity, many contributors.
<zacts>that's cool
<zacts>mark_weaver: another question, is there a way with gnu utilities to see all of the files that are installed for guile-2.0.9 when I do gmake install?
<mark_weaver>I vaguely recall that there are some hacks around to try to keep track of that, but the most reliable method I know is to ./configure with a --prefix that's an empty directory somewhere, and make install, and see what ends up in that directory.
<mark_weaver>Guix always installs into a prefix that's empty, so I could give you the list of files from my Guix install, but it might be slightly different on FreeBSD, dunno.
<zacts>ok, that's helpful. cool.
<zacts>mark_weaver: does guix rely upon job control in any way?
<zacts>oops
<zacts>guile
<zacts>minix3 doesn't implement job control quite yet.
<zacts>and sorry for the flood. :/
<mark_weaver>I don't know.
<mark_weaver>I doubt that it depends on it in any fundamental way.
<mark_weaver>if at all.
<mark_weaver>but I wouldn't be surprised if some part of the build system, or the test suite, makes use of it somewhere.
<zacts>I know shells like bash usually rely on it. that's why I ask, but I'll see what happens when I try the build.
<zacts>anyway, thanks. I'll check back with you guys. and sorry again for the flood.
<mark_weaver>I suspect that some things might need to be fixed for Minix3, but it should be doable.
<mark_weaver>no worries. thanks for working on the ports. that's useful for.
<mark_weaver>*useful work.
<whmark>hello, is there a safe way to call `eval-string'? so that if there is an error guile won't exit?
<mark_weaver>yes. use 'catch' to catch the exception. something like (catch #t (lambda () (eval-string ...)) (lambda (key . args) ...))
<whmark>ok thanks!
<mark_weaver>there's a convenience macro 'false-if-exception' that simply returns #f if there's an exception. if that's suitable, then (false-if-exception (eval-string ...))
<whmark>yeah that would be perfect
<mark_weaver>you're welcome! are you the author of guile-xcb and guile-wm?
<mark_weaver>(just a guess :)
<whmark>no but Im glad to hear of a guile-wm :)
<mark_weaver>it's in the early stages, but looks promising.
<mark_weaver>your nick is vaguely similar to his name, so I thought maybe.
<whmark>just making an IRC bot as my first Scheme project. I wanted it to be able to parse expressions but not die when there's an error
<mark_weaver>neat! lots of people seem to be writing IRC bots these days.
<mark_weaver>sneek: seen ijp?
<sneek>I last saw ijp on Jan 15 at 02:10 pm UTC, saying: who is also apparently at utah.
<whmark>thats nice!
<mark_weaver>out of curiosity, where are the strings coming from? (the ones that you'll pass to 'eval-string') ?
<whmark>well if a user says: ,( ... ) it will use that
<mark_weaver>just beware that it's a security hole. if a user can pass an arbitrary string to 'eval-string', then they can do anything that the UID running Guile can do.
<whmark>yeah I was thinking of writing an interpreter that can only do basic stuff
<whmark>could be fun a Scheme interpreter written in Scheme :)
<mark_weaver>yes, that's a relatively easy thing to write. it's called a "meta-circular interpreter". Guile 2.0's interpreter is written in Scheme, in fact. Its compiler is also written in Scheme, but compiles to bytecode run by a virtual machine.
<mark_weaver>SICP has a chapter on it: http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-4.html
<mark_weaver>modern hygienic macro expanders are a bit trickier.
<whmark>I have a bought a copy of that book. should be here tommorrow (I prefer physical books)
<zacts>whmark: books++
<mark_weaver>that's good! it's an excellent book. changed my view of programming.
<zacts>I purchased the book also, I now own it.
<mark_weaver>I have two physical copies of it. an old first edition copy, and the second edition.
<zacts>mark_weaver: you should get the teacher's edition to complete your collection
<mark_weaver>heh :)
<whmark>I accidentally bought the "Instructor's Manual To Accompany SICP" the first time
<whmark>if thats what you mean
<mark_weaver>it's aimed at fairly talented engineering students, though, so not appropriate for everyone.
<mark_weaver>(people who are weak at math tend to have trouble with SICP)
<zacts>mark_weaver: that's why I started with Scheme and the Art of Programming
<zacts>while I review my math this semester
<mark_weaver>ah, okay. I've heard about that book, but never looked at it.
<mark_weaver>The Little Schemer, The Seasoned Schemer, and The Reasoned Schemer are also excellent books.
<zacts>mark_weaver: it's neat. I like it a lot better than when I tried to read HTDP and couldn't get passed the first ch. I like a more traditional textbook approach, than images, and things like that.
<zacts>mark_weaver: I own those too
<whmark>zacts: You mean Knuth's The Art of Programming? I have Vol 1-3 (haven't read them yet though)
<zacts>s/passed/pass/
<mark_weaver>whmark: those are different books.
<zacts>I'm a bit tired..
<zacts>oh well..
<zacts>past
<zacts>:D
<mark_weaver>zacts: what time is it, where you live?
<zacts>mark_weaver: 10:40pm
<zacts>I live in mountain time U.S.
<zacts>I'm a student at a community college taking online and afternoon in class sessions.
<zacts>and hope to transfer to my university spring 2015
<mark_weaver>cool!
<mark_weaver>how did you discover Scheme?
<zacts>mark_weaver: I can't remember. probably through emacs
<zacts>my first lispy tutorial was the elisp intro
<mark_weaver>ah, makes sense.
<zacts>then I found out about SICP probably from irc or reading a tutorial somewhere
<zacts>I finished reading the Simply Scheme book a while back.
<zacts>and it really explained why scheme is awesome to learn about abstraction, and the stuff that matters.
<zacts>which is 90% not syntax that matters, but all the other stuff. like chess moves.
<mark_weaver>well, you're lucky to have discovered the Lisp world early on. I was stuck in the C/C++ imperative programming style for almost 20 years before I came to discover SICP, Scheme, and other programming styles.
<mark_weaver>anyway, it is 00:46 here (U.S. Eastern), which is usually not too late for me, but I didn't get much sleep the last couple of nights, so I'm ready to collapse. Happy hacking!
<zacts>happy hacking!
<dsmith>Haven't read through all the scroll log, so sorry if it was already mentioned, but for a simple check to see what's going to be installed, use DESTDIR=foo make install
<dsmith>everything installed ends up in foo
<zacts>oh thanks dsmith
<dsmith>zacts, np. And you don't need to mess with changing your --prefix and recompiling or anything.
<dsmith>www.gnu.org/prep/standards/html_node/DESTDIR.html
<zacts>hi
<zacts>any guile developers awake. I have a gmake test log for FreeBSD I'm trying to decipher.
<zacts> http://pastebin.mozilla.org/4154531
<zacts>hm.. I'll have to repaste later, it's missing 1/2 of the log
<mark_weaver>zacts: I see no failures or errors in that log fragment. if there were failures or errors, can you show us just those?
***sethalve_ is now known as sethalves
<taylanub>Why does ,trace sometimes show a bare # in place of some object ?
***Fuuzetsu is now known as Guest51482
***Guest51482 is now known as Fuuzetsu`
***Fuuzetsu` is now known as Fuuzetsu
<mark_weaver>taylanub: it uses 'truncated-print' to keep the output to a fixed width. it removes parts of the output to make it fit.
<mark_weaver>annoying sometimes, but if it never truncated anything, sometimes the output would be huge.
<taylanub>I see .. maybe I can do something about it in my record-type printers. Thanks.
<mark_weaver>what do you suppose you could do in the record-type printers?
<taylanub>Some of my objects have lists as a part of them whose printing I could suppress if those lists grow very large.
<mark_weaver>well, sometimes that's not wanted.
<mark_weaver>'write' and 'display' automatically take care of this, where it's wanted.
<mark_weaver>they support something called "print states", which get combined with the 'port'. in the code I looked at, used for backtraces (and maybe for tracing too), it sets up a print state which says how many levels deep to go, and also how long lists can be, and then it repeatedly prints to a string port, with different values of those parameters, until it fits.
<mark_weaver>I might have some of those details slightly wrong, but that's the basic idea.
<mark_weaver>the relevant code is 'display_frame_expr' in backtrace.c
<mark_weaver>(for backtraces anyway)
<taylanub>BTW we don't have an edebug style (or otherwise) code-stepper, do we ? Do we have any good alternatives to ,trace and `pk' for inspecting program flow ?