IRC channel logs

2014-02-10.log

back to list of logs

<lloda>rest parameters go into a list and if you don't give them then the list will be empty. Is this what you mean?
<lloda>#:optional parameters that are not set will be SCM_UNDEFINED in C.
<madsy>lloda: Ah, okay. So an empty list then
<madsy>Heh.. strange. (equal? #f '()) returns #f here
<madsy>Shouldn't that return #t?
<ArneBab>mark_weaver: another small status update: wisp now supports [] as well as {}. It does not do consistency checks on them, though: stuff like "{[}]" is pushed through unchanged.
<ArneBab>mark_weaver: and wisp now has a more beautiful repository page ☺ → http://draketo.de/proj/wisp/
<ArneBab>(just wanted to share the late-night results - bbl)
<lloda>madsy: in [Scheme] that's #f.
<madsy>lloda: Ahh, right. I sometimes confuse Lisp semantics with Scheme's
<madsy>So to test for the empty list in Guile, I have to use SCM_EOL
*dje42 is opening a Guinness before checking in guile support to gdb.
<lloda>madsy: there's scm_null_p iirc
<lloda>or maybe better C Function: int scm_is_null (SCM x)
<mark_weaver>madsy: yes, to test for it, use scm_is_null
<mark_weaver>that will return true for both () and #nil
<mark_weaver>(#nil is just for interoperability with emacs lisp)
<mark_weaver>ArneBab: your new web site looks nice!
<davexunit>hey guilers.
<davexunit>how does one deal with configure variables like pkgdatadir in guile programs? I have a file or two that I want guile-2d to load like a default font.
<dsmith>davexunit, Scheme perhaps?
<davexunit>dsmith: well I'm trying to figure out what needs to be done.
<davexunit>the value of pkgdatadir depends on the system
<davexunit>but at runtime my library needs to know where to load things from.
<davexunit>but I've got to go now. see ya.
<nalaginrut>morning guilers~
<dje42>guile scripting in gdb: http://tinyurl.com/o3bvqpk
<mark_weaver>woohoo!! :)
<dje42>:)
<mark_weaver>so it will be in 7.8 then?
<dje42>yep
<mark_weaver>sweet!
<b4284>wow, that's pretty cool
<nalaginrut>Anyone played Go? Is it possible goroutine was implemented with something similar with delimiter-continuation? Or they are different?
<nalaginrut>Maybe it's a wrong opinion to mention delimiter-continuation for a total different language?
<nalaginrut>well, goroutine is M:N, seems more complicated than I can imagine...
<zRecursive>git push
<zRecursive>sorry, type error :)
<civodul>Hello Guilers!
<artyom-poptsov>Hi civodul
<civodul>hey, artyom-poptsov
<civodul>i have yet to try the latest Guile-SSH
<civodul>it's on my to-do list ;-)
<artyom-poptsov>So... Does it work as expected? :-) Or you have not tried it yet?
<artyom-poptsov>I did some testing of Guile-SSH on my machines before the release, but I suppose that some bugs can be lurking there.
<civodul>not tried yet
<civodul>i started uprading it in Guix, but there were test failures, possibly due to the build env.
<civodul>i should be able to look into it sometime this week
<artyom-poptsov>Thanks!
<civodul>well, thank you :-)
<ArneBab_>mark_weaver: thanks ☺ the new website is actually a static Mercurial repository created with my staticsite extension ☺
<ArneBab_>mark_weaver: I was sick of big hosters who try to create a walled garden around DVCS, so I created a static repository exporter which allows serving a Mercurial repository from any commodity server
<ArneBab_>mark_weaver: and the new design is actually the new default design I added to hg site over the weekend: http://draketo.de/proj/hgsite/
<ArneBab_>mark_weaver: so anyone can have that design easily
<ArneBab_>(the design is mostly ported from stevelosh.com — I loved the site when I first saw it, and in the last weeks I discovered that Steve had licensed his whole site under MIT)
<ArneBab_>mark_weaver: from what I see, all that’s still missing at the moment are multiline comments
<ArneBab_>(for wisp)
<wingo>moin :)
<ArneBab_>moin wingo
<wingo>brb
<civodul>oh, Guile 2.0's birthday is in 6 days!
<civodul>potluck anyone?
<wingo>neat!
<wingo>yeah why not
<wingo>civodul: want to send the mail? :)
<civodul>i could do that yes :-)
<civodul>not sure i'll have energy to hack, but email is fine ;-)
<wingo>yeah, who knows :)
<wingo>i wonder if i could do a little native compiler for a subset of things that i can completely inline and that don't need gc...
<civodul>oooH!
*civodul prepares the messages
<civodul>-s
<civodul>sent!
<wingo>sweet :)
<taylanub>Already been a whole year since the last birthday ? O_o
<add^_>taylanub: really?
<add^_>wut
<add^_>wow, read the backlog or whatever I should call it. Yeah
<add^_>civodul: I dunno if I'll have either the time or energy for a potluck, but I can try!
<add^_>I'll try making something more useful this time..
<add^_>lol
<add^_>Unlike my crappy unfinished guile-haiku
<add^_>oh well
<add^_>Not sure if I want to make it only for guile though, want to make it runnable between different scheme implementations
<add^_>Maybe I should just skip that for now?
<add^_>and go ahead and make something for just guile anyway..
<add^_>wingo, civodul: is there a way to have _standard_ r6rs keywords for define?
<wingo>what?
<add^_>Like define*
<add^_>But by the standard
<wingo>no idea what you mean, sorry
<add^_>I thought define* was nonstandard..
<add^_>ok
<add^_>Oh well
<add^_>I'll try and figure it out..
<taylanub>add^_: R6RS doesn't have keyword symbols, does it /
<add^_>taylanub: probably not
<add^_> I was thinking of #:key in the lambda forms
<add^_>but that's probably an extra feature for guile
<add^_>like #:optional
<taylanub>add^_: Yes, that's a Guile extension, along with `define*'. Though it looks like SRFI-88 and SRFI-89 standardize both; you just need to (read-set! keywords 'postfix) and perhaps be careful to conform to some restrictions that SRFI-88 and 89 have which Guile doesn't, or vice versa.
<add^_>ah ok, I'll look at it
<add^_>thanks
<lloda>wingo: on top of ra0 1a51415615fbe0f0fce4cd97437b846b82894d9a
<lloda>uniform-vector? -> f64vector?
<wingo>lloda: go ahead and push a fix to that branch if you like, otherwise i'll handle it when i get to it (maybe tonight)
<taylanub>Since we have typed arrays, let's implement ASM.guile!! :P
***vicenteH` is now known as vicenteH
<lloda>wingo: can I amend & push or do a patch on top?
<wingo>lloda: either way is fine for me
<lloda>hm, I get a git error: unpack-objects abnormal exit (??) I'll leave the fix to you...
<mark_weaver>lloda: it sounds like your local git repo has become corrupted.
<mark_weaver>or that you have a buggy version of git or something.
<mark_weaver>it's certainly not a bug in Guile that's causing that. wingo won't be able to fix that for you.
<mark_weaver>I just did "git pull" on master and all's good here.
<wingo>mark_weaver: were you able to build on your intel machine?
<lloda>I wasn't expecting that. 'I'll leave the fix' means uniform-vector? -> f64vector?
<wingo>mark_weaver: not just now, i mean :) any time after your 11 hour thing
<wingo>lloda: ok
<mark_weaver>wingo: I haven't tried recently.
<wingo>cool
<wingo>i should change the page size at some point...
<mark_weaver>well, I rebuilt master on the intel machine a week or so ago.
<wingo>what is the maximum page size on mips again? 64kB or 16 kB?
<mark_weaver>mostly I use my MIPS based machine.
<mark_weaver>64kb.
<mark_weaver>wingo: here's the thing that I got stuck on: the obvious patch means that the linker declares that something has to be aligned on a 64kb boundary.
<mark_weaver>and then the loader sees that and just calls 'mmap'.
<mark_weaver>but 'mmap' doesn't actually guarantee that it will be on a 64kb boundary.
<wingo>hmm
<mark_weaver>I guess it doesn't matter in practice though.
<mark_weaver>I tried doing a patch that was more proper, but it crashed.
<mark_weaver>I guess I made a mistake somewhere.
<wingo>could be, there's a bunch of dragons there
<mark_weaver>I didn't have time yet to track it down.
<mark_weaver>*haven't had
<mark_weaver>wingo: btw, I finally read that DJB post on entropy attacks. thanks very much for the pointer. very interesting, and good to add to my knowledge.
<wingo>you're welcome :) i also found it to be yummy food for thought
<mark_weaver>fyi: here was my attempt at a more proper page size fix: http://www.netris.org/~mhw/0002-Link-using-a-fixed-64KB-page-size-load-using-the-run.patch
<mark_weaver>the first patch imported 'getpagesize' from gnulib.
<mark_weaver>but I've updated gnulib since then, so it would have to be redone obviously.
<wingo>i think getpagesize is already imported
<wingo>it might not be on the list but it's required by something else
<mark_weaver>well, it might be imported indirectly, but not directly.
<mark_weaver>if we use it directly, I think it should be imported directly, no?
<wingo>yes agreed
<mark_weaver>anyway, the patch produced a totally broken guile :-(
<wingo>i use it in vm.c i think, to figure out how much memory to give back from the stack
<wingo>on gc
<wingo>which, btw, seems to be doing well now, no?
<mark_weaver>yeah, last I checked hydra seems happy :)
<wingo>phew :)
<wingo>i think i must have had a size_t underflow that ended up returning the entire address space to the kernel :)
<wingo>la la la
<mark_weaver>yikes!
<mark_weaver>anyway, I have to go afk for a while, and then offline for a while after that. I hope to be online later today.
<mark_weaver>happy hacking!
<wingo>likewise :)
<mark_weaver>(I wouldn't be surprised if that patch shows my ignorance of ELF; I confess I don't yet understand the finer points)
<cluck>:)
<madsy>davexunit: Did you figure out your config path thingie?
<madsy>Hey mark_weaver :)
<davexunit>madsy: no not yet.
<davexunit>madsy: do you know anything about how to best store the pkgdatadir in a guile program?
<wingo>davexunit: i write it in to a config.scm file usually, at install-time...
<davexunit>thank you, wingo
<mark_weaver>davexunit: see guix/scripts/guix.in
<davexunit>and thanks mark_weaver
<mark_weaver>davexunit: configure uses it to generate guix/scripts/guix, substituting in some variables.
<wingo>right, that would be a good example
<davexunit>I was having trouble finding the prior art. :)
<mark_weaver>and then there's some simple code in there to expand out the variable references.
<mark_weaver>feel free to copy it. (I wrote it)
<wingo> http://git.savannah.gnu.org/cgit/guile-cairo.git/tree/cairo/Makefile.am for similar things
<wingo>see config.scm and install-data-local
<mark_weaver>hey madsy! I'm going offline very soon for a while, but a little I'd be curious to hear about how your code worked on guile on windows.
<wingo>probably there are better ways that use more guile-ish things :)
<civodul>dje42: congrats on the recent GDB commits! :-)
<civodul>i think that lays the foundation for neat birthday potluck hacks ;-)
<dje42>thx
<madsy>davexunit: Try calling (%package-data-dir%)
<davexunit>madsy: I believe that get's the package data dir that guile was built with.
<davexunit>this is for my own library.
<madsy>Can't you put your own library there?
<davexunit>that has its own data files in /usr/share or wherever.
<davexunit>madsy: the scm and go files, sure.
<davexunit>but this is extra data
<davexunit>fonts and such.
<davexunit>that need to be loaded at runtime.
<davexunit>I'm going to make a config.scm file.
<add^_>davexunit: you could look at wingo s configfile for guile-figl
<madsy>davexunit: What is package-data-dir for if not data?
<davexunit>add^_: wingo gave me a few examples. I guess that would be another example. :)
<davexunit>madsy: I'm afraid you've left me confused.
<davexunit>(%package-data-dir) yields guile's data dir. I have a datadir for my own application that needs to be baked into my application at make time.
<madsy>Why can't your application's data directory be a path which is relative to one of guile's many config paths?
<madsy>Sounds like I misunderstood your problem. Ignore me.
<davexunit>madsy: it's okay. :)
***Fuuzetsu is now known as Guest76126
***Guest76126 is now known as Fuuzetsu
***Fuuzetsu is now known as Fuuzetsu`
***Fuuzetsu` is now known as Fuuzetsu
<foeniks>when I import a module in the repl using use-modules, I do not get line and column information with lexing/parsing errors
<wingo>try with --auto-compile=fresh and see if there is a difference?
<wingo>lloda: ping :)
<lloda`>it's me, I have erc open at work...
<wingo>oh hey
<wingo>i was going to ask you to take the patches from here but actually i'm just applying them
<wingo>should be finished shortly
<lloda`>the next five patches or so go together and are a near complete rewrite of scm_ramapc.
<lloda`>ah ok :)
<lloda`>I started fixing edge case bugs (empty arrays, etc) and then I thought I could unroll in more cases, etc.
<lloda`>there's a fair amount of testing attached so I think it holds up
<wingo>yeah i see that, that's great
<lloda`>some of the commit messages don't make much sense after all the work on uniform-, etc.
<lloda`>or the compiler things
<wingo>right, working on that
<wingo>lloda: ok, pushed
<wingo>lloda` rather :)
<wingo>thanks a lot for this patchset!
<wingo>and now you have commit access so hopefully we won't get in this situation again
<wingo>some notes though
<wingo>(1) please check your commit log format; see ludo's for the best example. there are emacs modes to help, and I'm sure other things as well.
<lloda`>thanks!
<wingo>(2) use complete sentences and capitalization in comments, usually
<lloda`>(1) right, I noticed that later :o/
<wingo>(3) interface changes are delicate :) please get buy-in from guile-devel before changing things in .h files, or other publically-visible changes
<lloda`>(2) right!
<lloda`>(3) in my defense ;p what I got from the ml wasn't super-constructive
<lloda`>so I just started anyway to see where I'd get
<wingo>(4) these restrictions notwithstanding, please feel very free to hack on guile :) if what you are committing looks obvious to you, just post to the list, wait a few days, and if there's no comment go ahead and push
<wingo>feel free to push tests or bugfixes without such a wait, i think, though sending patches to the list is nice
<wingo>and in our defense of (3), there were quite some changes and managing the deprecating story between 2.0 and 2.2 was a bit delicate... but anyway, that part at least is behind us now :)
<wingo>it's wonderful to have someone care about the arrays code :)
<lloda`>(4) noted and thanks again. I'll try and be careful, as I use this part of Guile heavily mysef.
<lloda`>/sef/self/
<davexunit>wingo: what emacs modes do you know of for commit logs?
<wingo>davexunit: I use magic, pressing C on patch hunks
<wingo>*magit
***altphi_ is now known as altphi
<davexunit>wingo: whoa, didn't know magit had that feature. awesome!
<lloda`>me neither, obviously! :-O
<wingo>there are probably better solutions...
<wingo>anyway, got to get away from this machine :) thanks again and good night!
<lloda`>good night!