IRC channel logs

2016-08-17.log

back to list of logs

<ijp>doesn't look straightforward, there is a lot of macros in that code
<taylan>zv: can you paste the exact snippets?
<zv>taylan: (test-assert (equal? 1 1)) && (test-equal 1 1)
<zv>test-equal simply adds no new items to the test runner, test-eq throws an assertion error, test-eqv works fine
<zv>when I say adds no new items to the test runner, it's as if it never happened
<zv>although the code itself is clearly running
<taylan>zv: is this a custom test runner?
<zv>taylan: i have tried with both the default and my own test runner
<taylan>(well, I don't really see that making a difference)
<taylan>zv: test-eq erroring is normal because eq? isn't guaranteed to work on numbers
<zv>i am on 2.0.12
<taylan>so it's test-equal that doesn't work as expected, correct?
<zv>yeah
<zv>i didn't know that though, that is good info
<taylan>as a rule of thumb, I'd recommend to just use eqv? instead of eq? unless you know what you're doing
<taylan>I was going to check the definition of test-equal in the upstream SRFI 64 implementation, then it reminded me of why I reimplemented SRFI 64 from scratch, ugh
<zv>:)
<taylan>zv: in any case, I can't reproduce the issue in a simple test case (in the REPL, importing the stock SRFI 64, running (test-begin "foo"), then (test-equal 1 1).)
<zv>i'll take a further look and see if i can get a minimal case for you taylan
<mark_weaver>zv: eqv? and equal? on numbers might not do what you expect. for numbers, they test for "operational equivalence", which is different from numerical equality (=). For example, (= 1 1.0) is true, but (eqv? 1 1.0) is false (and ditto for equal?)
<mark_weaver>(the difference between 1 and 1.0 is that the first is "exact", and the second is "inexact")
<mark_weaver>and there are some other differences between numerical and operational equivalence as well.
<mark_weaver>operational equivalence is what you need when memoizing, among other things, and numerical equivalence (=) is what you probably want in most other cases
<ijp>I don't understand why equal? isn't = on numbers, it makes no sense
<ijp>you can't make an expense argument, because equal? does cycle checking, and has to behave correctly on collections
<mark_weaver>it's not about expense
<ijp>it can't be about memozing for equal? either
<mark_weaver>eqv? tests for operational equivalence. that was spelled out clearly in R3RS.
<ijp>I have no problem with the behaviour of eqv?
<mark_weaver>it's too bad they got rid of the language in the later standards
<ijp>(well, not in this instance anyway)
<mark_weaver>equal? is what you need for memoizing
<ijp>how can it be?
<ijp>well, if you argue that equal? is merely eqv? but expanded to collections it can be
<mark_weaver>well, for one thing you generally have multiple arguments to look up in a memoizing table, but even if not for that, if the arguments are structures containing numbers, operational equivalence of those numbers is what you need to test to determine whether the structure as a whole is operationally equivalent.
<ijp>equal? doesn't test for operational equivalence
<ijp>equality is just needlessly complicated
<mark_weaver>equal? tests operational equivalence based on a different set of assumptions of how the functions in question may behave.
<mark_weaver>e.g. one of the assumptions for 'equal?' that is not made for 'eqv?' is that the structures will not be mutated
<mark_weaver>so eqv? needs to distinguish between two mutable strings with the same contents, but equal? can consider them equivalent.
<ijp>which is not a distriction that people frequently make
<mark_weaver>ditto for pairs
<mark_weaver>the bottom line is that in practice, I can memoize a large and useful category of functions using an equal?-based hash table keyed on the list of arguments.
<mark_weaver>and if you were to change 'equal?' to use = on numbers, then that would not work anymore.
<mark_weaver>and consider another case: removing duplicates from a list
<mark_weaver>operational equivalence is generally what you want to look at to determine if two structures are redundant.
<mark_weaver>operational equivalence is the simpler, equality operator of more general applicability and fundamental importance
<mark_weaver>numerical equality is the messy one, specific to numbers, and incidentally only differing from operational equivalence for inexact numbers, which are admittedly a can of worms.
<mark_weaver>without inexact numbers, numerical equality and operational equivalence would be the same thing.
<daviid>hello guilers. anyone familiar with guile o MacOS? I'm trying to help someone (the author of coot) woh'd like to try guile-gnome on RedHat 64, MacOS and Windows. So far, after guile-cairo autotoolchain patches (I still need to send upstream) it is ok (guile-cairo) on RedHat 64, but fails on MacOS, which I'm not familar with. Here is the error log: http://paste.lisp.org/+6XJ5 it actually seems to be related to guile and bdw-gc rather
<daviid>then caito itself, I don't know, help suggestion welcome, thanks
<mark_weaver>daviid: that looks like fallout from clang pretending to be GCC and yet not supporting GCC features
<daviid>mark_weaver: ok thanks, let me post this to him and let's see
<mark_weaver>daviid: adding "-Wno-error,-Wunknown-attributes" to the compile flags might work, or else he should try using the real GCC instead
<mark_weaver>but I guess that it's okay to ignore those warnings
<daviid>mark_weaver: I'll suggest he use the real gcc, but will pass thisinfo as well, thanks1
<mark_weaver>the more proper fix would be to modify bdw-gc to check for clang and arrange for GC_ATTR_ALLOC_SIZE(argnum) to expand to nothing when using that compiler.
<mark_weaver>(although it's quite annoying to have to work around clang's pretending to be GCC)
<daviid>I agree
<daviid>let's see: this means he's gona have some work compiling gcc, recompiing guile... I hope he's brave :)
<mark_weaver>maybe he should switch OSes while he's at it :)
<daviid>:) I think he wants coot on these 3 platfroms
<mark_weaver>ah, sure
<daviid>mark_weaver: he's currently using guile-1.8 and guile-gtk :)
<mark_weaver>ouch!
<daviid> http://www2.mrc-lmb.cam.ac.uk/personal/pemsley/coot/
<mark_weaver>well, thanks for helping him update
<daviid>thanks to you too: it would be good, I don't think anyone else has ever compiled guile-gnome on MacOS and Windows (don't know which Win by the way, reaaaaaally not my domain)
<mark_weaver>oh, looks nice!
<daviid>yep! i really want to have this on guile-gnome if ossible
<daviid>let's see
<nalaginrut>morning guilers~
<webshinra>hi
<mark_weaver>Amynka: I'm glad to hear the patch did the trick. Thanks again for your help!
<janneke>morning!
<amz3>héllo :)
<amz3>n-for-each-par-map is doing good so far :)
<amz3>I use it to download multiple files in parallel and write it into a single file
<amz3>here is the paste http://paste.debian.net/789984/
<amz3>curl is simply a wrapper around the curl command
<amz3>curl -is to be exact
<amz3>maybe 8 threads is not enough
<mark_weaver>amz3: you should limit the number of connections to any given server to a small number.
<mark_weaver>http pipelining can make efficient use of a single connection
<mark_weaver>e.g. in browsers derived from firefox, see the network.http.max-persistent-connections-per-server preference in about:config, which is set to 6
<fantazo>guile libraries tend to feel like being stuck in the time before github. a lot of stuff hosted on savanah, one of the shittiest hosting sites for code.
<fantazo>then you need get the code from somewhere, sometimes I need to double check if the project is actually a GNU project, because I don't immediately find the source download link.
<mark_weaver>github is very problematic for various reasons
<fantazo></rant>
<mark_weaver>in order to get an account, you need to agree to a rather draconian agreement
<mark_weaver>which among other things says that they can change the agreement at any time without notifying you, and if you continue using the service, you are bound to the new terms, even if you aren't aware of them.
<fantazo>lovely.
<mark_weaver>and there's also an indemnification clause that essentially says that you promise to pay their lawyer fees in connection with any legal complaints about your code made by a third party, regardless of whether you did anything wrong or not.
<mark_weaver>those are the two things I remember from the last time I read their legalese.
<fantazo>mark_weaver, I looked at the github terms of service and I couldn't find any of those things about which you are complaining.
<mark_weaver>fantazo: the first one is in the third paragraph of the ToS, and the second one is in F3
<mark_weaver>of https://help.github.com/terms
<fantazo>F3 is basically about self-protection. this is something every damn company on the planet does.
<mark_weaver>interestingly, government users are granted more favorable terms regarding my first complaint.
<mark_weaver>fantazo: I've managed to avoid ever agreeing to such a thing
<mark_weaver>and savannah is a site that I can join without agreeing to any such thing
<mark_weaver>(or at least I haven't agreed to anything like this in the last 18 years or so, since I've been paying attention)
<fantazo>you are too damn sure in this regard, I doubt that your memory is THAT better than mine.
<mark_weaver>no, I am quite sure. this is an issue of major importance for me. I actually try hard to read and understand any legalese that I'm asked to sign.
<sneek>So noted.
<fantazo>lacking an agreement doesn't mean that there isn't some law-mumbo-jumbo savanah needs to protect itself.
<mark_weaver>I have no idea what you mean by that
<fantazo>the GPL for example is only THAT long (people complain about its LENGTH) because of the law-mumbo-jumbo people need to put into it so that it's of any real value.
<mark_weaver>savannah never asked me to make unreasonable promises to register an account there, and I'd be very surprised if it does now, given what I know of the FSF
<mark_weaver>if you think otherwise, present your evidence please
<mark_weaver>fantazo: I don't find anything in the GPL objectionable, personally.
<mark_weaver>if you have a concrete complaint about some clause that you find draconian, then please present it. all I'm hearing is a bunch of vague hot air
<fantazo>it's not "hot air" you are hearing. and I didn't complain about one clause of the GPL. all I wrote was that it's a longer license.
<fantazo>and that is objectively true when you compare the GPL with other shorter licenses out there.
<fantazo>and I also wrote WHY that is. because to be legally defendable it must include proper definitions of what stuff is talked about.
<mark_weaver>yes, of course. that is not the basis of my complaint against the github ToS
<fantazo>and it's not that the GPL is THE LONGEST license out there, it's just not the shortest out there.
<fantazo>and all that is because of the Github Terms, were I meant that they need to put stuff in there because they don't want to get down.
<fantazo>that F3 about which you are complaining also has a) b) c) sub-points on of which need to be fulfilled before the whole paragraph actually holds.
<fantazo>actually not one of which, they are concatenated by "and" so all of them need to be fulfilled.
<fantazo>So what happens if savanah is legally targeted by some lawyer? will the whole site go down?
<mark_weaver>their requirement to fulfill a b c doesn't change the fact that I'd be promising to pay github some unknown amount of money regardless of whether the court found me guilty or not..
<mark_weaver>savannah doesn't require me to make such a promise
<mark_weaver>so I'll choose savannah over github any day
<mark_weaver>and anyone who cares about their freedom should avoid making such promises to github or anyone else
<mark_weaver>and I notice that you haven't responded to my first complaint, which is by far the more severe one, since it's essentially giving them a blank check
<mark_weaver>and interestingly, government users get a far better set of terms on that issue, but the rest of us get the screw
<mark_weaver>(see section G.17 of the ToS, and section F.1 of the linked amendment
<mark_weaver>)
<mark_weaver>fantazo: as for "what happens if savanah is legally targeted", the FSF is very well-known and respected, with top-notch pro-bono lawyers like columbia professor eben moglen, not to mention allies like the EFF, SFLC, and others.
<mark_weaver>savannah has been up for about 15 years, and no one has knocked it over yet.
<mark_weaver>and they've managed to do this without asking their users to make unreasonable promises.
<mark_weaver>in fact, it's not clear to me that you need to agree to *anything* to get a savannah account.
<fantazo>well, you stated "which among other things says that they can change the agreement at any time without notifying you". but exactly that is not what the third paragraph says.
<fantazo>it says "we will notify you by email or by posting a notice on our site before the changes are effective"
<mark_weaver>right, I translated it into something that can be understood plainly
<fantazo>so in my opinion you are wrong.
<mark_weaver>the "or" means that they don't need to notify you by email
<fantazo>it's good and correct to be against github. but your points are not what I find correct or valid.
<mark_weaver>"posting a notice on our site" doesn't say anything about how prominent the notice is.
<mark_weaver>that does not constitute "notifying", hence my claim that they can change the agreement without notifying you
<mark_weaver>the point is, unless you are careful to re-read the agreement very frequently, or set up some daemon to fetch the ToS and perform diffs on it, you can't be the least bit confident that you will be aware of changes of the ToS
<fantazo>point for you. right.
<mark_weaver>and the fact that government users get a better set of terms here indicates that I'm not the only one who is troubled by this. government agencies are more clueful about this than you are, and they know better to accept such terms.
<mark_weaver>*than to accept
<mark_weaver>okay, thanks
<wleslie>ACTION grumbles, thinking about github's awful UI
<wleslie>unconfigurable keyboard bindings that only make sense to vim users
<fantazo>what is better savanah? who is enjoying using that site?
<fantazo>well, end of discussion. it doesn't matter what my personal feelings are about a gnu project site, which is in my opinion a pain in the but and my frustration around it.
<mark_weaver>fantazo: what is the nature of your frustration over savannah? how is it a "pain in the but" ?
<mark_weaver>it's not that your feelings don't matter, it's just that I consider my freedom to be far more important than whatever inconveniences you might be referring to.
<mark_weaver>unfortunately, people are in the habit of neglecting freedom issues when making decisions, e.g. the legally-binding promises that they must make are literally not even considered. most people don't even skim, let alone read or understand the promises they are making. they just click "I agree" without reading.
<mark_weaver>that last fact just blows my mind.
<mark_weaver>in this context, github looks awesome and savannah looks lame.
<mark_weaver>and I haven't even broached the subject of vendor lock-in via pull requests and the like..
<fantazo>well, with free software you can have also a free-lock-in when you include GPL software in your project.
<fantazo>if I would be that consequential in legal terms I wouldn't use any computers. on each step there things I don't agree with/or don't know of.
<mark_weaver>how does the GPL grant anyone "free-lock-in" ?
<fantazo>and this has to do with complexity. besides stuff isn't open.
<fantazo>when you use GPL libraries your code automatically becomes GPL too, as long as you use it. iirc.
<fantazo>that's why there is the LGPL.
<mark_weaver>that is not "lock-in", that's guaranteeing freedom for users.
<mark_weaver>specifically the four freedoms of free software.
<fantazo>that's rephrasing it. yes, you can say it. but you can also say the opposite.
<fantazo>it has two perspectives.
<mark_weaver>what is the opposite that you can say?
<fantazo>opposite: it's a lock-in.
<fantazo>that was what I meant.
<fantazo>that's the reason why there is the whole BSD-License is more free than GPL is dispute.
<fantazo>some people feel in my opinion rightly that's a kind of lock-in. because it is.
<mark_weaver>the "lock in" that I'm interested in preventing is being locked in to a particular provider, e.g. github.
<fantazo>that there are good reasons for it is another point.
<amz3`>FSF definition of free is in line with the definition of free in the Universal Declaration of Human Rights
<amz3`>BSD is not more free, it's a different definition of free which doesn't not comply with UDHR
<fantazo>amz3, ok that's new to me.
<mark_weaver>there are different kinds of freedom. my freedom to swing my fist ends at the tip of your nose.
<amz3`>fantazo: liberty of one ends where the liberty of another starts that's UDHR definition of liberty
<amz3`>s/liberty/freedom
<fantazo>amz3, noted.
<fantazo>for later arguments. with some people to like the BSD definition of freedom more.
<mark_weaver>BSD is preferable if it's important to you to deny other people the four freedoms.
<fantazo>so, I need to look up the definition of the universal declaration of human rights.
<fantazo>mark_weaver, so you are saying that you use BSD when you want to make stuff less "free"
<mark_weaver>it's true that by deriving your software from components covered by the GNU GPL, you must commit to passing along the freeoms associated with the GPL to the users of your software.
<fantazo>normally it's touted as the exact opposite.
<mark_weaver>well, actually, what I wrote above is not right. you don't have to commit to anything.
<mark_weaver>more precisely: if you don't pass along the same rights to your users, then you are not granted the right to redistribute the GPL-covered software.
<mark_weaver>the extra freedom provided by BSD is the freedom to deny your users freedom.
<mark_weaver>that's not a freedom I'm interested in promoting.
<Guest26458>mark_weaver: I answered Paul, he answered as well, here is both emails: http://paste.lisp.org/+6XKE wdyt? it sounds to me that even if he has a lot of pepenencies with the previous config (guile-1.8/guile-gtk) I should still recomment he gets bdw-gc, g-wrao, guile-cairo and then guile-gnome compiled with a real gcc, but I'm a bit lost here ... yur opinion would be helpfull, thanks
<mark_weaver>Guest26458: you are daviid?
<Guest26458>mark_weaver: I'm totally unable to provide support for compiling guile-gnome, neither bdw-gc, guile ... using clang, fwiw
<mark_weaver>Guest26458: he can make it work with clang, just add the flag I mentioned to CFLAGS
<mark_weaver>"-Wno-error,-Wunknown-attributes"
<Guest26458>mark_weaver: oh, yes, must have miss typed my passowrd
<Guest26458>ok, will foward the info
<mark_weaver>passing "CFLAGS=-Wno-error,-Wunknown-attributes" as an argument to ./configure should work, I guess.
<mark_weaver>maybe -g -O2 should be added as well.
<mark_weaver>i.e. "CFLAGS=-Wno-error,-Wunknown-attributes -g -O2"
<mark_weaver>(hopefully that syntax is right)
<daviid>ok, will suggest so: but I still thing he should try to install gcc, and 'just' compile bdw-gc, guile, g-wrap, guile-cairo and guile-gnome using gcc ... he will anyway have to rewrite a lot of code wrt guile-gtk, I think
<daviid>mark_weaver: and I think he should use the 'same' gcc on all platform, but I understand he's 'afraid' (216 pkg dependencies is a lot!), of god, users still using guile-1.8 is not cool :)
<daviid>*/of god/oh god ...
<mark_weaver>well, it depends on how much extra burden he can bear.
<mark_weaver>I'd be glad for people to use gcc, but at the same time we should not imply that someone needs to recompile 216 packages with gcc in order to fix this rather minor problem.
<mark_weaver>if it weren't for
<mark_weaver>if it weren't for -Werror being added as a CFLAG somewhere, this would have just been a warning, and one that could be safely ignored.
<daviid>ok, I will answer with your suggestion, let's see, thanks a ton
<mark_weaver>the expedient solution is to avoid treating that warning as an error
<mark_weaver>okay, thanks
<daviid>mark_weaver: it's just that I'm not competent wrt bdw-gc and these macro expansion on the C side, so I would not have been able to answer in the first place
<daviid>mark_weaver: thanks to you!
<mark_weaver>glad to help
<daviid>I post and let you know
<daviid>it would be coll to have coot using guile-gnome
<mark_weaver>daviid: one more thing: although we intend for guile to work with clang, guile is certainly far less tested on clang, and so if he wants to avoid any problems connected with that, compiling guile with gcc would be advisable
<mark_weaver>but that doesn't mean he needs to recompile anything else using gcc
<mark_weaver>it's okay to link objects compiled by clang with objects compiled by gcc.
<daviid>mark_weaver: exactly: I don't understand why he can't install gcc and compile dbw-gc, guile ... to work on his next release
<daviid>mark_weaver: would you mind if I copy my answer to you (email I mean)?
<mark_weaver>having said this, guile *should* work when compiled by clang, and in fact I have committed several fixes for clang to guile.
<mark_weaver>daviid: sure, that's fine
<daviid>mark_weaver: I thing he did compile guile with no problem, it is guile-cairo
<daviid>ok
<daviid>thanks
<daviid>mark_weaver: this is your email still right? mhw at netris dot .org
<mark_weaver>yes
<daviid>cool, I'll email asap, you'll have a copy
<mark_weaver>(I make no promises, though)
<daviid>of course
<daviid>neither do I actually :) just trying to help
<mark_weaver>*nod*
<amz3`>I'm super happy today that my HackerNews dump is in the work
<amz3`>thanks to Guile, doing that with Python would have been kind of painful
<daviid>mark_weaver: I just answered, you shuld receive a copy, tx again
<janneke>daviid: any chance of getting my guile-gnome patchset applied?
<daviid>janneke: oh man, I admit I forgot! but could you ping wingo wrt your patches? he definitely has a deeper knowledge, still, and I'd prefer he reviews before to commit, please ping him once more and let's see!
<daviid>janneke: I remember he once said he would review your patches, iirc
<daviid>janneke: afaic, you could even aski him to be added as a commiter
<janneke>daviid: thanks, let's do that
<daviid>janneke: I'm not going to do much more on guile-gnome now, I want to concentrate on G-Golf https://savannah.gnu.org/projects/g-golf/ (it is a mockup still, but I'd love to have some review and help ... I feel like the more I know the less I know ... :))
<daviid>janneke: g-wrap does not compile with 2.2, would you be able to help? it is due to most goops C functionality been rewritten in scheme in guile 2.2 ...
<janneke>daviid: ouch...
<janneke>not sure, i'm willing to have a look to see if i can help
<daviid>janneke: yes! we need to compile g-wrap with 2.2, g-golf will take at least a year before it1s usable
<janneke>daviid: re golf: that's great!
<daviid>janneke: thanks, please help! :)
<daviid>mark_weaver: it would be awsome if you could have a lookas well ... ^^ as times allows of coure
<janneke>daviid: do you have a guix archive with failing g-wrap ready for me to look at?
<daviid>janneke: no, I don't use guix (yet)
<daviid>janneke: just git clone git://git.sv.gnu.org/g-wrap.git and http://www.nongnu.org/g-wrap/developers.html for some hints ...
<daviid>janneke: I did ping wingo wrt this, he said he added it in his todo list, but I think he's too busy with 2.2 ... but if you do look into it, let him know when he's here ...
<daviid>janneke: carefully read the 2.2 (2.1.2, 2.1.3) NEWS for goops related entries before to start anything on this
<janneke>daviid: OK
<janneke>also, you really want to check-out guix/guixsd ;-)
<daviid>janneke: I'm vry much used to git clone everything I'm working on, guix would not make any diff on this side. but i read the devel and #guix ...
<janneke>daviid: guix could make a big difference
<janneke>i'm writing/copying a guix.scm file for g-wrap as we speak
<janneke>and adding it to the g-wrap repo
<janneke>using `guix environment -l guix.scm' I get a reproducible build environment
<daviid>janneke: but i have a clone, I patch, make, make check, make distcheck... how would thatbe diif using guix?
<daviid>janneke: going afk for a while, talk later...
<janneke>daviid: lat0r!
***paule is now known as Guest84127
<ajh92>hello. is in gnome gtk something like 'container?' ?
<ajh92>or even better a find-child-widget-by-name function?
<OrangeShark>morning #guile
<amz3`>no GHM for me, again!
<dsmith-work>{appropriate time} Greetings, Guilers
<janneke>hi!
<dsmith-work>janneke: You are the winner of the 2^7 prize!
<janneke>dsmith-work: yay!
<paroneayea>hm
<paroneayea>I wonder how on earth you'd i18n'ify a non-stringly-typed program
<paroneayea>eg, if you had stuff in sxml
<paroneayea>`(p "click " ,(a (@ (href ,go-url)) "here") " to get your stuff")
<paroneayea>in a "stringly typed" system, you'd do it like
<paroneayea>gettext("<p>click <a href=\\"%s\\">here</a> to get your stuff") % go_url
<paroneayea>but you don't have that option
<paroneayea>throwing s-expressions at translators may not be an option.
<paroneayea>You can't do "lego" seetences, because you don't know the syntaxtic order of the language of where the link should appear depending on sentence order of whatever language
<paroneayea>tricky..
<davexunit>I think the problem is the same
<davexunit>probably using "click <a>here</a>" isn't good for translation
<davexunit>having translators edit markup in the first place sounds like a bad idea
<paroneayea>davexunit: it's not really, but it's what actually happens in my experience
<paroneayea>well
<paroneayea>translators usually don't have too much trouble with html
<paroneayea>I guess you could also use guile-lib to parse html with markers in it
<paroneayea>but that doesn't seem very good
<davexunit>you'd just need the translators to translate literal strings
<paroneayea>davexunit: what do you mean?
<paroneayea>you need tht link there in the middle of the sentence
<davexunit>translators couldn't inject code
<davexunit>nor should they
<paroneayea>right, though in practice, you need a way to say "link goes here"
<paroneayea>and again, you can't lego sentence things
<davexunit>I think you'd just design your document such that this problem doesn't occur
<paroneayea>so you really do need the link inlined *somewhere* in the sentence
<paroneayea>davexunit: it's really not possible to do that for many cases
<davexunit>the link is the same regardless
<davexunit>okay
<paroneayea>in my experience anyway
<paroneayea>eg, lots of the creative commons licenses
<paroneayea>had translations
<davexunit>okay well I dunno then
<paroneayea>but there had to be links in the middle of the stuff people were translating
<paroneayea>sorry davexunit I'm not meaning to be dismissive!
<davexunit>I personally wouldn't allow translators to inject code into my programs
<paroneayea>davexunit: I agree
<davexunit>so I dunno what the solution is, but I think it involves designing differently
<paroneayea>yes
<davexunit>rather than trying to force the above code to be translatable
<davexunit>if it were my project I'd forbid inline markup
<paroneayea>davexunit: I still feel like you need a way to mark the sentence, but maybe you need a way to actually inject the markup *for* the translator in the middle
<davexunit>but you could allow it and just parse it
<paroneayea>so maybe you have something minimal like this
<davexunit>(translate-html (get-translated-string "click <a>here</a>"))
<paroneayea>right
<paroneayea>davexunit: and it has to expect the same structure
<paroneayea>replacing the <a> and foo
<paroneayea>could also put a parameter on it like maybe
<paroneayea>(translate-html (get-translated-string "click <a trans-id="click-link">here</a>"))
<davexunit>that sounds more complicated than I could implement
<paroneayea>heh :)
<paroneayea>yeah maybe
<paroneayea>I'm just looking at a lot of the templates I'm writing in pubstrate
<davexunit>you're inventing a new language that needs it's own parser
<paroneayea>and thinking "hoo boy, this is going to be a mess when it needs to be translated"
<paroneayea>we ran into this problem at CC also when we used ZPT for translations, which like sxml had a very rigid and smart structure
<davexunit>I think it's a price worth paying for not having string-based templating
<paroneayea>and we had to do some *terrible* hacks to inject the links in
<paroneayea>anyway
<paroneayea>stuff to think about :)
<paroneayea>relatedly in the w3c group I'm in we struggled a lot with how to handle RTL languages right in the activitystreams markup
<paroneayea>"strings aren't strings any more"
<paroneayea>i18n makes things hard :)
<paroneayea>but it's important!
<davexunit>I know nex to nothing about i18, but it could be that simply translating strings just doesn't cut it anymore.
<mark_weaver>paroneayea: good question!
<davexunit>i18n*
<paroneayea>mark_weaver: :) if you have ideas...
<davexunit>ideally, the translated sections of an SXML document would be SXML.
<mark_weaver>it would be a shame to force sxml back to strings in order to support i18n. there must be abetter way.
<davexunit>kept right in the codebase, and the program would dispatch the right template based on language.
<paroneayea>davexunit: so, don't use gettext?
<davexunit>the immediate practical problem there is that your translators need to at least understand the basics of s-expressions and SXML, which raises the bar for translation.
<paroneayea>unfortunately most translators translate via "translation services" and UIs like Pootle (or formerly Transifex) and most of them are not programmers
<paroneayea>but
<paroneayea>they are able to understand html markup
<mark_weaver>maybe we need a gettext macro that operates on s-exprs instead, and converts the s-expr to a string using 'write', translates that, and then 'read's it back and substitutes it at the s-expr level.
<paroneayea>it would be evil, but you *could* ask that translators to fill in s-expressions in pootle/transifex/etc
<mark_weaver>but that doesn't address davexunit's concern about translators being able to inject code.
<paroneayea>right
<paroneayea>that's the tricky part
<paroneayea>though!
<paroneayea>translators often can in the stringly typed thing too
<davexunit>mark_weaver: if the s-expressions are just read but not eval'd it would be fine.
<paroneayea>if you consider html
<mark_weaver>*nod*
<paroneayea>"<script>evil_thing();</script>"
<paroneayea>and that would be true for sxml too, though
<davexunit>so the translatable sections of the SXML template would have the limitation of being static expressions
<paroneayea>yeah and you might want to run it through the same kind of cleaner/validator
<davexunit>I'm not as concerned with markup injection as I am with code injection
<paroneayea>that you use for incoming user content
<paroneayea>davexunit: right
<paroneayea>I think having "just read with (read)" would be okay
<davexunit>I think you some basic trust in your translators
<davexunit>or some review process
<paroneayea>yes
<paroneayea>well, often there's little review process
<paroneayea>but
<paroneayea>there's an "apply to be part of the team"
<paroneayea>so, trust
<paroneayea>it's like giving a very limited commit access
<mark_weaver>we could have a modified quasiquote macro that supports i18n, and limits it to the static part.
<paroneayea>in the projects I've worked on, anyway
<paroneayea>davexunit: mark_weaver: anyway, I think this is generally the right direction
<paroneayea>thanks for thinknig about it with me :)
<davexunit>yw
<mark_weaver>modified quasiquote macros are on my mind now, since I just wrote one to support more powerful and intuitive nested quasiquoting
<paroneayea>it also means I don't need to throw away anything about my existing approach
<paroneayea>mark_weaver: oh interesting :)
<davexunit>ACTION goes back to implementing a pooled memory allocator for primitive structs
<paroneayea>davexunit: ooh also interesting!
<mark_weaver>actually, maybe the standard quasiquote macro would be fine here, and we just need a procedure that would be called within unquote's
<mark_weaver>well, this will require more thought than I have time for at the moment.
<mark_weaver>but I'll keep it in the back of my mind :)
<paroneayea>mark_weaver: :)
<amz3>interesting problem
<amz3>note for myself, next time I create a long running process I must log something meaningful... right now my terminal is filled with ones '1' and I have no clue of the progress, except that it's advancing
<dsmith-work>heh
<amz3>TIL: you can use a cut inside another cut (srfi 26)
<amz3>TIL: you can compose streams e.g.
<amz3>scheme@(guile-user)> (stream->list ((compose (cut stream-map (cut * <> 2) <>) (cut stream-filter odd? <>)) (stream-range 0 20)))
<amz3>$6 = (2 6 10 14 18 22 26 30 34 38)
<amz3>which looks nicer that the equivalent code which does not use compose
<amz3>ahah
<stis>evening guilers
<catonano>in which module is the "acons" procedure ?
<stis>(@ (guile) acons) ?
<mark_weaver>catonano: it's implemented in C, in libguile/alist.c
<catonano>ah yeah, I had mistyped it without realizing and it wasn't found. Sorry
<davexunit>acons is implemented in C? wow.
<dsmith-work>stis: Hej
<mark_weaver>yeah, remnants of a bygone era
<amz3>I now have 50K urls of possibly interesting CS articles :)
<amz3>much better that yesterday's 300
<OrangeShark>amz3: nice, are these taken from hacker news?
<amz3>OrangeShark: yes
<ajh92>hi. what is the default way to replace "\\n" with "" in a string? guile string manipulation only works with single chars.
<OrangeShark>ajh92: you mean to replace the newline character with the empty string?
<ajh92>OrangeShark: yes
<davexunit>well a newline *is* a single character
<davexunit>do you mean to replace the literal string "\\n"
<davexunit>?
<ajh92>i mean newline
<dsmith-work>As in '\\' and 'n'
<davexunit>expressed as a Guile string "\\\\n"
<davexunit>ajh92: #\\newline is the character object for the newline character
<amz3>ajh92: here is a procedure that replace newline with a #\\space https://framagit.org/a-guile-mind/hyper/blob/master/src/hyper.scm#L72
<ajh92>thx
<amz3>ajh92: does is works for you, or you really want to remove newlines?
<amz3>because this is different
<amz3>ajh92: there is also a `string-filter' procedure that will allow you to remove newlines instead of replacing them with space
<sirgazil>paroneayea: Oh the s-expression i18n problem... I'm currently using ,@(interleave rgx str . sexps) in my website... Don't laugh :D
<amz3>OrangeShark: the creator of whoosh (a search engine written in Python) does use some kind of Enron dataset to experiment with its SE but I feel like using a dataset that I know something about
<amz3>OrangeShark: ... is better
<OrangeShark>ajh92: ya, you probably want string-filter like amz3 mentioned
<OrangeShark>or string-delete
<dsmith-work>$1 = "this\\nis\\na\\ntest\\n"
<dsmith-work>scheme@(guile-user)> (string-delete #\\newline test-string)
<dsmith-work>$2 = "thisisatest"
<OrangeShark>amz3: yeah, it helps you understand whether the results are something you can agree with or not
<paroneayea>sirgazil: :)
<paroneayea>ACTION has to parse RFC3339 dates as part of pubstrate
<ajh92>it works thx
<paroneayea>tempted to use irregex for that, but that's probably pretty egregious
<paroneayea>I *could* use normal regexes :)
<ijp>rfc3339 is the one true date format
<janneke>evening Guilers
<davexunit>yo janneke
<janneke>daviid: i compiled g-wrap with guile-2.2, i'm not sure what the problem is
<daviid>janneke: really? I'll try again here and paste
<janneke>i see deprecated funtions being used, had to configure with --disable-Werror
<daviid>janneke: ah ok! very good news, I'll try that thanks
<janneke>daviid: this may be what i meant to say about guix earlier...
<janneke>with guix it is trivial to provide an exactly reproducible build environment between machines/developers
<amz3>so my server is at full capacity, it means I can go to sleep peacefully :)
<janneke>that can be very helpful to get on the same page between developers
<daviid>janneke: but I can use --disable-Werror here too... I see guix a win from a user point of view, I fail to see it from a developer side
<janneke>daviid: https://gitlab.com/janneke/g-wrap
<davexunit>I use guix to make development easier every day
<daviid>davexunit: really? I must miss something then
<janneke>daviid: if you fetch my g-wrap patches, you see there's a guix.scm
<daviid>ok will look, tx
<janneke>using that, you can do two very nice things:
<janneke>1. build a guix package: guix build -f guix.scm
<janneke>that is a reproducible action if you have the same guix
<janneke>but also:
<janneke>2. prepare build environment: guix environment -l guix.scm
<davexunit>it's a huge win to be able to easily work on different projects with conflicting dependencies
<janneke>after that, you can build g-wrap from your git clone...but you can be quite sure that your build environment matches mine
<janneke>davexunit: yes, that too!
<davexunit>and just generally have a way to reproduce your work on other machines or even just next week on the same machine ;)
<janneke>exactly: or have other people reprocuce your success/errors
<janneke>*reproduce
<daviid>davexunit: janneke I really need to look into it, but i clone a source, patch, push, ask you to pull, if deps are satisfied, is this not reproducible?
<janneke>what i like very much, is that such a reproducible build environment can be set-p quie easily on different systems, whether debian, fedora or GuixSD
<daviid>janneke: these warnings triggering errors were what I faced here too, I just did not try no-error...
<janneke>daviid: OK
<janneke>as I said: i'm not sure if these are problems now, or when these will become problematic...
<davexunit>daviid: reproducibility is about repeating builds with the *exact* same dependency tree.
<daviid>davexunit: ok
<janneke>daviid: you may have another version of automake, autoconf, python, environment settings, whatnot
<janneke>seemingly insignificant changes, things you may not think of, can change a build; guix can ensure the build environment and the results are identical
<daviid>janneke: yes, but if >= to the list in prereqs it should not make a diff
<OrangeShark>ya, guix is neat for development. I was using guix environment to try and test my guile package in both guile 2.0 and guile 2.2
<daviid>if it makes a diff, there is a bug somehwre
<daviid>anyway i cloned guix, but never compiled it yet :)
<janneke>daviid: i used to run debian unstable to suffer breakage for new tools as one of the first people, so other devs would not encounter problems...
<janneke>daviid: what os are you running?
<daviid>janneke: debian testing
<amz3>janneke: are you running guixsd?
<janneke>daviid: you may want to look at: https://gitlab.com/janneke/debian-guix
<daviid>gitlab is horribly slow here, compared to cgit on savannah it is a nightmare (I hope guix and gnu projects will never go away from patch mailings and savannah (my 2c about this discussion they have ...))
<janneke>you can easily install guix as a deb package with that
<janneke>amz3: yes
<daviid>janneke: thanks, will look at it asap
<janneke>daviid: it's not mine, i just made some small changes to it to update it to guix-0.10 ... it should be updated to v0.11 :-)
<janneke>amz3: i ran guix on top of debian for about 4 months in which i gradually moved all my development and work into guix environments until the switch was almost painless
<daviid>janneke: i'm not having guile installed as a debian package, so this recipe would not work for me. and I prefer to install from source, pull, compile instll when I need to benefit from a patch ... but tx again. then i need to understand why a daemon? (if just guix, and not guixsd)?
<amz3>I will install guix for sure
<daviid>janneke: my bad i see at the end "... recipe will clones the guix repository..." good
<enderby>n00b question: i installed guix over the weekend, and when i ran the install hello package command, it took like 4 hours to build/install everything. is that normal? is there not a faster way? and if not, does this process take less time for subsequent packages (like, if they require dependencies that are already installed)
<janneke>the daemon is providing the package build service, it needs to be root (and therefore a daemon) atm for technical reasons
<daviid>janneke: ok, does it consumes a lot of ressource?
<janneke>enderby: yes that is to be expected, however it's not the normal, advised way to do it
<daviid>enderby: you prob want to ask that on #guix instead
<davexunit>enderby: sounds like you didn't enable substitutes
<janneke>enderby: guix provides prebuilt binaries but you have to enable that ^^^
<davexunit>if you don't do that then you build *everything* from source.
<enderby>gotcha, sry. (i'm normally just chilling in both channels and accidentally sent to the wrong one)
<enderby>ic, sounds good, i will look into that then
<enderby>thank you
<janneke>enderby: see `Substitutes' in the manual
<janneke>daviid: the build daemon? i don't think so.
<paroneayea>I notice that civodul added (ice-9 match) in just 2010, not *too* long ago
<paroneayea>other nice things by the same author are fmt and irregex
<paroneayea>I kind of feel like it would be nice to have both of those libraries bundled with guile too
<paroneayea>especially in the war against stringly typed systems :)
<daviid>janneke: while talking about guile-gnome (and deps), chris vine reported a bug (the author of guile-async) and subsequently I did write a series of test and sent an email to andy, here: http://paste.lisp.org/+6LP8
<daviid>janneke: do you have some skill in this area? you obviously have more C knowleddge then I... I'd love to fix this, but I need help ...
<daviid>janneke: fi, this came out of this thread: https://lists.gnu.org/archive/html/guile-user/2016-02/msg00107.html
<stis>I made a blog post about an advanced set datastructure, enjoy: http://c-lambda.se/set-mania.html
<janneke>daviid: ugh ;-)
<janneke>daviid: i figure this is the most interesting snippet to look at: https://lists.gnu.org/archive/html/guile-user/2016-02/msg00109.html
<daviid>janneke: this correspond to test-4 in my summary for andy ...
<daviid>janneke: so, for that one, you already have an strace :) http://paste.lisp.org/+6LP8 and below is a C code which works fine, it never fails...
<daviid>janneke: just drop the script as g-idle-add.scm, chmod a+x, ./g-idle-add.scm and ... crash :)
<daviid>using 2.0.12, it crashes as well (last time i tried i was still using 2.0.11), but it can take a while ... just let it run till ...
<janneke>yeah, 5 minutes here...ugh
<daviid>I wonder if it will crash using 2.2: now that i can compile g-wrap I will try (later)
<janneke>yes, i was wondering too
<daviid>janneke: " ... this example makes a new <gclosure> and a new (g-idle-source-new), sets and attach the source ... every call: I guess the problem is they are are not freed/released, or at least not 'properly' ? I don't know ..." is what I wrote while talkng with Cris, for info ...
<daviid>by the way folks, for info, coot's author successfully compiled guile-gnome on MacOS, which I think is good news...
<janneke>ACTION -> zZzzz