IRC channel logs


back to list of logs

<str1ngs>hello, I'm trying to create a syntax rule. I'd like match a variable lenght of arguments. my syntax rule looks like this ((~ . args) #t) the rule matchs something like (~ "
<str1ngs>matchs something like (~ "bar" "baz") but I can't seem to do much with args
<str1ngs>is args a list? or does it just get expanded out?
<daviid>str1ngs: i recommend you (debian or tor friendly) paste your definition, together with a comment explaining what you are trying to acheive ... otherwise, it is difficult to help
<str1ngs>I basically need to use args matched by this syntax rule. ((~ . args) #t) I'm not sure if that warrants a whole paste :)
<daviid>str1ngs: I pushed a series of patches to fix the gtk iter problem, and as matter of fact any C struct 'semi-opaque' args (see the logs for a descrition if you are iterested, but as a user, you may skip that if you wish) - here are two ways you can get your had on a gtk iter (among other ways):
<daviid>*your hands
<str1ngs>daviid: this is great, actually easier then the C api. will test this out ASAP
<wleslie>sneek: seen mark_weaver ?
<sneek>I last saw mark_weaver on Jan 13 at 04:29 am UTC, saying: :).
<wleslie>sneek: botsnack
<lloda>posix has log2 which seems exact for arg = 2^n, guile should have that
<lloda>I had somewhere (define (log2 x)
<lloda> (* (log x) 1.44269504088896340735992468100189213742664595415299))
<lloda>which is broken
<lloda>as in (log2 8) -> (define (log2 x)
<lloda>as in (log2 8) -> 2.9999999999999996
<civodul>not great
*civodul prepares a guile-gcrypt release
<jcowan>lloda: SRFI 144 is portable and has all of math.h
<lloda>jcowan: thanks
<heisenberg-25>any csv libraries guile?
<rain2>amz3: hello what do you think abotu the new ML? for persistence
<dsmith-work>Morning Greetings, Guilers
<amz3>rain2: very good idea
<amz3>rain2: I subscribed.
<rain2>amz3: maybe I should post about serializable closures
<amz3>rain2: you should do it. hga was trying to convince to add stored procedure to okvs or nstore
***pankaj__ is now known as nikola_i
<rain2>OK and I think serializing records is valuable to discuss
<rain2>but it would need a lot of preparation
<rain2>maybe someone has done a review across implementations already actually
<amz3>IIUC gambit has serializable closures
<str1ngs>daviid: gtk-text-buffer-get-start-iter looks to work now. though when trying to move a text view's cursor like so. both gtk-text-iter-forward-chars and gtk-text-buffer-place-cursor segfault
<str1ngs>daviid: this is complete paste
<lloda>what is preferred out of GUILE_PGK(), GUILE_PKG([3.0 2.2 2.0]) or GUILE_PKG([2.0 2.2 3.0])
<lloda>no arguments seems to check 2.0 1.8
<lloda>so start from the highest?
<str1ngs>lloda: I've always seen it start from the highest. I guess use the versions that your program supports
<spk121>lloda: lately, most of my stuff is 2.2 only, since I'm not testing 2.0, and waiting for 3.0 to be official
<lloda>thx str1ngs spk121
<lloda>I was trying guile-dsv linked above and I had to patch it because it used GUILE_PKG([2.2 2.0]) and I use 3.0
<lloda>well 2.0
<lloda>well 2.9
<lloda>tbh I don't understand the guile-lib install logic :-(
<lloda>for example guile-sqlite installs to prefix/share/guile/site/3.0/ if I give prefix
<lloda>but that's not enough for guile-lib, it installs to prefix/guile-lib if I just pass prefix (!)
<lloda>it's annoying
<daviid>lloda: afaict, guile-lib and other packages i (co)maintain offers the best and certainly most complete set of options so things are installed where you want ... but then may be there i a bug? i recently chnged guile-lib for you, so to speak, i'm very surprised to hear 'now' that it is annoying ... what is missing?
<daviid>str1ngs: tx, will look into this
<daviid>lloda: what you describe here above is exactly what one should expect when 'only' passsing prefix - if you want to install the source modules in guile's tree, and the go file in guile's ccache tree, you must pass --with-guile-site=yes, wether or not you used prefix ...
<daviid>which is listed by the configure step, so users are aware ...
<daviid>it is totally wrong, imo, to install in the guile's tree 'by default' and will never ever do that, sorry
***nikola_ is now known as nikola_i
<daviid>lloda: and what is it that you constantly have to reinstall guile-lib? this is 'funny'
<lloda>daviid: I remember having this chat before, and also that you fixed things
<lloda>maybe it's guile-sqlite that is at fault
<daviid>options are listed at the end of the configure step
<lloda>still I'm not sure why prefix isn't enough to install everything under prefix/
<lloda>sorry if I asked this beforef
<daviid>it is enough, but source and go file will be installed there as well ... the you'd have to adapt guile load path and guile compile path ... of course ...
<daviid>'but source and go file will be installed there' is exatly what you should expect
<daviid>to install src modules and gofile using guile ste vars, you must ask for that so it happens ... using --with-guile-site=yes
<lloda>ok, I see what you mean
<daviid>i don't co maintain guile-sqlite, but if it installs in guile's tree by default, then it is wrong
<lloda>it doesn't install in guile's tree though
<daviid>imo at least
<lloda>it installs in prefix/share/guile/site/version-number/
<lloda>which is what I expected guile-lib to do when I passed prefix/
<lloda>but it's ok
<daviid>lloda: it will if ypu pass --with-guile-site=yes
<daviid>lloda: last and nt least, where things ar einstalled is also listed at the end of the configure step
<daviid>so there is zero surprise
<lloda>I get that now - I'll make a note because I'm likely to forget it by next time
<lloda>daviid: yes, I saw the notice
<lloda>sorry for the trouble :-|
<daviid>lloda: answering your previous quiz, i'd start by listing the first major.minor numbers that your package needs, then following in ascending order if/when your package allows 3.0 ...
<daviid>meaining 2.2 required, 3.0 allowed ...
<lloda>daviid: then it's strange that when you pass no arguments, it tries 2.0 1.8 in descending order
<lloda>to me, best to worst makes sense
<lloda>and I'd expect most-recent = best
<daviid>that's the default in guile.m4 ...
<daviid>you can patch ...
<daviid>but i don't trust these defaults anyway, so explicitly list as decribed above ...
<daviid>how could guile know what your pkg needs, version wise... would be 'magic' :)
<lloda>daviid: you're right
<lloda>I guess packages need to be updated to support 3.0 is all
<dsmith-work>lloda: What guile-sqlite ?
<dsmith-work>lloda: Thanks
<bsima>rekado_: what did you mean here by "recovering haskeller"?
<bsima>i'm just curious, as i do haskell+nix for work and scheme for fun
<manumanumanu>Ok, I am having a weeeird issue. I have a cond clause that looks the following: ((char? newline) (eqv? ch newline)). If I change that around to be ((eqv? newline ch) #t) it doesn't trigger. This _should_ be the same, no?
<manumanumanu>this is in 2.9.4+
<manumanumanu>the latest master
<manumanumanu>Yay! I think I have found a bug!
<manumanumanu>Trying to create a simpler example makes the code work
<manumanumanu>Am I missing some edge case of eqv?
<manumanumanu>Disregard everything I wrote above.
<ArneBab>manumanumanu: can you still explain what happened?
<rekado_>bsima: oh, I used to be into Haskell a lot. Used it everywhere I could.
<rekado_>but now I almost exclusively write Scheme.
<rekado_>I still appreciate Haskell for what it did to my brain, but now I just look at it from a distance.
<wingo>good evening
<wingo>civodul: afaics guile does not have translations. is that correct?
<wingo>i.e. guile itself is not localized
<wingo>file under ignorant questions from anglophones
<wingo>and do you think G_ is a good recommendation for a gettext alias?
<wingo>other answers welcome too
<wingo>i mean answers from other people :)
<spk121> wingo: libguile/guile.c doesn't have a bindtextdomain call, so it isn't translated, as far as I understand it
<wingo>tx spk121
<wingo>do you use gettext with guile spk121 ? if so did you run into problems with 2.2 and (define _ gettext) ?
<wingo>(the issue being that defining a local binding for _ prevented syntax-rules / syntax-case / match from recognizing _ as the catch-all pattern)
<spk121>wingo: oh gosh... In original guile-ncurses, I did try to do gettext, but, I eventually pulled it out because it was half-baked. I'm not the programmer that is likely to go big on syntax case, so I don't recall problems on that front
<spk121>but I probably wouldn't use '_' because it looks weird. More likely would have abbreviated gettext to something shorter
<wingo>i understand that _ is the conventional abbreviation tho
<wingo>like in C they recommend #define _(x) (gettext(x))
<spk121>True. Have used in _ in C. But C is C.
<spk121>Not obvious to me exactly how problematic _ would be in scheme, tho.
<wingo>yeah that surprised me
<wingo>i like _ as the catch-all pattern and it wasn't apparent to me that using it as a gettext alias would be incompatible somehow
<janneke>you're probably aware that guix uses G_, i think that's okay
<wingo>janneke: yeah, i guess i was just looking to see if that has worked out fine
<wingo>in the guile manual we should recommend a convention i think
<wingo>(G_ "...") is fairly unidiomatic scheme but perhaps that's a virtue
<janneke>yes, i have used _ in the past, but that was before i used match or macros :-)
<janneke>yes, i think that's a feature... it stands out, more than constructs with a lower case g (g...
<manumanumanu>ArneBab: I'd prefer not to :) ((char? newline) (eqv? ...)) returned either #t or #f. I replaced it with a cond clause that only triggered if (eqv? ...) which meant that the case was only triggered if (eqv? ...) was true, which meant all other cases went unhandled.
<manumanumanu>Rather embarrassing
<manumanumanu>ArneBab: I have written a DSV (delimiter-separated values) parser that is slightly faster than guile-csv, but with more features :D
<manumanumanu>It allows for configurable escape characters, configurable newlines, configurable delimiters and soon also for trimming values! :D
<manumanumanu>guile-csv is probably the prettiest little parser I have ever seen.
<sneek>So noted.
<manumanumanu>it also has a streaming interface that lets you read one line at a time.
<jcowan>wingo: _ is an auxiliary keyword of syntax-rule
<jcowan>__ would work for me
<manumanumanu>ArneBab: Code is really ugly now. It will be faster and prettier in a little while.
<amz3>sneek: what is guile-csv
<sneek>Someone once said guile-csv is probably the prettiest little parser I have ever seen.