IRC channel logs


back to list of logs

<rain1>sorry - what I meant is you need to introduce the symbol HERE before you can use it
<cojy>you would need to use some kind of tricky macro that i don't know is possible in guile to define something from a string
<jmarciano>I guess I will not solve that today
<jmarciano>I am looking at this function here:
<jmarciano>that is different.
<jmarciano>am I right, that if I introduce unknown number of variables to make-string-template function, that it will not work? Or is there way to have template with unknown number of variables?
<jmarciano>looks like bad design to me
<jmarciano>(define st (make-string-template "hello ${name}" #:name "unknown")) -- this works well
<jmarciano>(define st (make-string-template "hello ${name} ${something}" #:name "unknown")) -- this does not
<jmarciano>never mind, going to bed... good night
<cojy>what should it put in place of soemthing?
<cojy>good night
<jmarciano>${name} shall be replaced with #:name "unknown"
<jmarciano>good day
<jmarciano>I wish to make this work (use-modules (gnu packages "emacs"))
<jmarciano>I wish to know how to convert string "emacs" to emacs in the: (use-modules (gnu packages "emacs"))
<jmarciano>(eval `(use-modules (gnu packages emacs)) (interaction-environment) ) -- something like this could work
<jmarciano>but is not...
<jmarciano>(define pac "emacs") tried to load like: (eval `(string-append "(use-modules (gnu packages " pac ")" ) (interaction-environment) )
<iyzsong>'use-modules' is a macro in boot-9.scm.. I don't know to play with macro yet.
<jmarciano>ah, is emacs in (gnu packages emacs) a symbol?
<jmarciano>as I found "string->symbol"
<civodul>Hello Guilers!
<iyzsong>so, how to pass variable module name for "use-modules"?
<iyzsong>civodul should know it :-)
<jmarciano>like (define var "some") (use-modules (var)) -- this is idea
<civodul>iyzsong, jmarciano: not possible
<civodul>there are ways to achieve this, but i wouldn't recommend that
<civodul>unless you're 100% sure you want it :-)
<jmarciano>separate need for me, is how to load all guix package names, so that I can do at all times (package-name package)
<civodul>the (gnu packages) module exports a 'fold-packages' procedure
<civodul>you can use it to iterate over the list of packages
<civodul>like: (define all-the-packages (fold-packages cons '()))
<jmarciano>yes, that one I wrote down already
<jmarciano>so there is no quick way
<civodul>for what?
<jmarciano>then again I have similar to learn: (define pac "emacs") (package-name pac) is not working
<civodul>'package-name' applies to package objects, whereas "emacs" is a string
<civodul>ACTION goes grab coffee
<jmarciano>maybe there is way to convert string to package object?
<iyzsong>jmarciano: I think 'specification->package+output' is it.
<jmarciano>I probably don't have it
<jmarciano>it is maybe in some module
<iyzsong>jmarciano: yes, it's in the '(gnu packages)' module.
<jmarciano>I got it: (package-name (specification->package+output "emacs")) thanks
<jmarciano>what is best way to load configuration like .somerc consisting of scheme, is there something like load-file simply?
<jmarciano>found load-from-path
<jmarciano>Is there way to quickly comment the rest of the file, like in Perl, __DATA__ and everything below that remains basically untouched, could be used as data
<jmarciano>that would help me in converting scripts
<lloda>how do I generate the HTML version of the manual?
<roelj>lloda: texi2any --html guix.texi
***Fuuzetsu is now known as Guest52926
<lloda>sorry, from Guile git, I don't have guix installed
<lloda>oh I see
<df_>I do: make html
<lloda>df_: aha, thx
<lloda>although make install doesn't install the html product :-/
<civodul>lloda: right, you have to run "make install-html"
<lloda>I see, thanks
<lloda>have to say, I'm dissatisfied with the info->html conversion. All of the @math{} gets ignored...
<lloda>straight from the manual @math{e@sup{x}} gives me 'Unknown command `sub' :-/
<lloda>s/sub/sup, anyway
<df_>"The @math command has no special effect on the Info and HTML output. makeinfo expands any @-commands as usual, but it does not try to use produce good mathematical formatting in any way (no use of MathML, etc.)."
<df_>patches welcome I guess :)
<df_>oh, or does that mean that stuff that is written specifically for TeX output won't work at all for html?
<lloda>I know, I know
<lloda>it looks wrong so you're encouraged not to write it I guess
<civodul>i wasn't aware of this limitation
<civodul>not good
<jmarciano>what to do, when I get error: ERROR: In procedure dynamic-link: file "file", not found?
<jmarciano>maybe I need to add it to some path?
<jmarciano>OK, I had to add: LD_LIBRARY_PATH...
<jmarciano>what is meaning of _ ?
<jmarciano>like mostly for gettext?
<wingo>see the gettext manual
<jmarciano>but _ is in guile, I found some references "common shorthand", so it could be for different things, right
<jmarciano>ok it is just nothing special, it is just used commonly for things
<dsmith-w`>[appropriate time] Greetings, Guilers
***dsmith-w` is now known as dsmith-work
<rain1>guten tzag
***[csed] is now known as csed
<fhmgufs>Is there a nice way in Scheme to create a new list like with map but with less items?
<fhmgufs>I mean to just add the item to the mapped list, if it fulfills a special condition.
<civodul>fhmgufs: 'filter'!
<fhmgufs>Ok, thanks! :)
<civodul>yw :-)
<fhmgufs>Hi daviid!
<fhmgufs>How can I specify arguments for signals?
<fhmgufs>#:gsignal '(name ... ?
<paroneayea>davexunit: heya
<davexunit>hey paroneayea
<paroneayea>how do you feel about making a 0.0.1 release of guile-syntax-highlight?
<davexunit>paroneayea: I can do that sometime
<paroneayea>or even 0.1
<davexunit>paroneayea: does it work okay for your needs?
<paroneayea>davexunit: honestly I don't know yet! About to test it :)
<davexunit>it's another one of my slapped together experiments without sufficient documentation.
<davexunit>paroneayea: if it works for you, then I will release. if it doesn't, then hopefully it can be patched easily enough and then released.
<paroneayea>davexunit: cool, well I'll test it :)
<davexunit>the Scheme lexer has successfully highlighted the code for all of my blog posts that have Scheme source snippets
<davexunit>so I'm hoping you'll have good luck, too.
<paroneayea>davexunit: you okay with your syntax highlighting css being contributed to 8sync's site's css, dual licensed GPLv3+ and CC BY-SA 4.0?
<davexunit>paroneayea: go for it
<davexunit>(fun fact: I inspected the faces in my emacs buffer and used a lot of those colors ;)
<paroneayea>davexunit: that's a good idea :)
<paroneayea>davexunit: hm, should highlights->sxml add newlines as <br />?
<paroneayea>or something?
<paroneayea>I'd think it would...
<paroneayea><pre> is what I should od
<paroneayea>of course
<paroneayea>there we go.
<davexunit>you've got it :)
<paroneayea>screenshot of current state of 8sync site
<paroneayea>I'm pretty excited about how it's looking.
<davexunit>paroneayea: looking good!
<davexunit>nice to see my syntax highligher in action :)
<paroneayea>davexunit: heresy I guess but the whole 8sync site will be in a fixed with font (inconsolata)
<paroneayea>because I liek it, and why not
<fhmgufs>daviid: How can I specify arguments for signals?
<fhmgufs>... in guile-gnome.
<fhmgufs>like #:gsignal '(name ... ?
<daviid>fhmgufs: you want to add your own signals?
<fhmgufs>daviid: I already did that, but I want to pass arguments to my signal handler.
<daviid>fhmgufs: if that's so, look for the tic-tac-toe example
<fhmgufs>daviid: I already have the signals. But I want to pass something to the signal handler.
<fhmgufs>I thought that this #f stands for sth like that.
<daviid>fhmgufs: i dont create signal myself, so far I did ot, can only point you to this example, tic-tac... which does exactly that
<fhmgufs>Mm, ok. No problem, It doesn't matter. :)
<daviid>going afk for half an hour or so, bb
<fhmgufs>Thanks for all your help!
<daviid>fhmgufs: but if you have difficulties, I can look but uou'd have to make a workable example, paste it to lisppaste...
<paroneayea>hey davexunit
<paroneayea>patched haunt so that atom can take a #:news-prefix argument
<davexunit>paroneayea: great
<davexunit>maybe call it post-prefix?
<davexunit>or just prefix?
<davexunit>either way :)
<davexunit>would accept
<paroneayea>davexunit: prefix doesn't work because you already use it on the tag one!
<paroneayea>(define* (atom-feed #:key
<paroneayea> (file-name "feed.xml")
<paroneayea> (subtitle "Recent Posts")
<paroneayea> (filter posts/reverse-chronological)
<paroneayea> (max-entries 20)
<paroneayea> blog-prefix)
<paroneayea>wrong one
<paroneayea> (prefix "feeds/tags")
<paroneayea> (filter posts/reverse-chronological)
<paroneayea> (max-entries 20)
<paroneayea> blog-prefix)
<paroneayea>for atom-feeds-by-tag
<davexunit>ah okay
<davexunit>sounds fine then!
<davexunit>how about making blog-prefix default to the empty string so that we don't need special logic for it?
<davexunit>we can just string-append without a type check
<paroneayea>davexunit: could do that, sure
<paroneayea>davexunit: btw, one thing I'd also love
<paroneayea>I like urls like this:
<paroneayea>not .html
<paroneayea>which would mean writing out a directory with an index.html
<paroneayea>however, how to do that cleanly with the present systme
<paroneayea>I'm not sure
<davexunit>well, that shouuuuuld be possible
<davexunit>will need some tweaking
<davexunit>probably changing something hard-coded into a user defined procedure whose default is the current behavior
<paroneayea>davexunit: that'd work
<paroneayea>davexunit: would also mean supplying that to the atom things
<paroneayea>could even replace the prefix stuff.
<davexunit>yeah, perhaps it could also replace the configuration for how to make slugs
<mark_weaver>paroneayea: alternatively, configure the web server to know that the file is html without the file extension.
<davexunit>that's also something
<mark_weaver>ACTION doesn't really like the trailing slash either
<davexunit>by default, haunt would make something like:
<mark_weaver>but maybe it's a pain with popular web servers, dunno :)
<davexunit>seems possible
<paroneayea>I like the slash but I've gotten used to urls with a / at the end :)
<paroneayea>I suppose it's not necessary though
<paroneayea>partly because /blog/item -> /blog/item/
<paroneayea>we know about that rule
<paroneayea>/blog/item/ -> /blog/item goes whaaa
<paroneayea>hi wingo !
<paroneayea>I see skips the / :)
<davexunit>either way, I think we might be able to consolidate this whole post->uri-path thing
<davexunit>the site config could probably just hold onto it
<davexunit>and the blog and atom feed builders will have access
<paroneayea>davexunit: for an atom related commit, should I prefix the title line of the commit with "builder:" or "atom:"?
<davexunit>builder: atom: Foo the bar
<mark_weaver>I appreciate that y'all are trying to make nice URLs though, in a day when so many web sites have crap URLs
<davexunit>mark_weaver: what kind of crap URLs?
<davexunit>ACTION tries to think of what you might mean
<davexunit>ones with lots of crazy stuff in the query string because you're talking to a dynamic web app?
<davexunit>heh :)
<davexunit>wingo beat me to it
<mark_weaver>yeah, stuff like that
<mark_weaver>although I would even count URLs that end with .html as being suboptimal
<davexunit>static websites have clean URLs because there's no web application involved
<davexunit>I am certainly guilty of the .html thing
<mark_weaver>well, me too sometimes
<rain1>what is wrong with .html ?
<davexunit>just slightly ugly
<rain1>The thing that frustrates me a lot is the imgur website
<rain1>they have .png but its a .jpg
<rain1>and if that wasn't bad enough invented a new extension .gifv which is actually just a video or something?
<davexunit>the issue with leaving off the .html part is the web server not knowing what mime type to serve it as
<mark_weaver>and then you have URLs that end with .shtml and .php
<mark_weaver>even though the mime type ends up being HTML
<wingo>ah, haunt generates static files that the web server has to assign a mime to. i see
<davexunit>haunt's built-in development web server just matches the file extension to get a mime type
<mark_weaver>internal implementation details leaking out into public URLs. not so good.
<davexunit>in production, nginx or whatever can be configured smartly
<davexunit>mark_weaver: yeah that happens a lot for php sites
<davexunit>because php is terrible
<mark_weaver>yeah, php really needs to just die
<davexunit>a world where every request starts a new interpreter, reads in *all* of the code it needs, then processes the request
<davexunit>it's a bummer that most of the great free software web applications are written in PHP
<paroneayea>davexunit: sent
<paroneayea>davexunit: twice even!
<paroneayea>I forgot my (c) the first time
<paroneayea>davexunit: let me know if/when you apply it :)
<davexunit>paroneayea: will do!
<davexunit>maybe tonight if I get some hack time.
<paroneayea>in sillier news, I liked
<paroneayea>even though by introducing monads, I stopped understanding burritos!
<davexunit>I'll apply this and then hack on my AVRs some more.
<davexunit>paroneayea: hahaha