IRC channel logs


back to list of logs

<kmicu>woof woof
***bmansurov is now known as bmansurovw`
***bmansurovw` is now known as bmansurov
<civodul>see like 'load-absolute' in boot-9 does not honor %fresh-auto-compile, does it?
<dustyweb>ArneBab: I wonder what it would be like to combine skribe (eg as used in Haunt and Skribilo) and Wisp
<dustyweb>ArneBab: I guess the thing that skribe adds is the [] text-quasiquote
<dustyweb>I'm not sure how it would be possible with wisp but it *sounds* appealing...
<daviid>lispaste is dead
<daviid>what do you use ?
<OrangeShark>we need a guilepaste written in guile
<davexunit>+1 to that
<davexunit>I have a syntax highlighting library that could be used.
<davexunit>hmm, maybe I'll write this someday...
<OrangeShark>ya, we should have most of the parts needed to build one
<davexunit>we have everything
<OrangeShark>except someone to make it :)
<bms_>Maybe it could make notifications to msg servers too. I'd be happy to write that functionality when I "finish" msg.
<OrangeShark>bms_: msg servers?
<bms_>A project of mine, written in Guile. Think federated, extensible IRC, designed for small servers and communities. Servers are easy to start and, if used on the scale expected, shouldn't require too much, if any, more computational power than clients.
<bms_>I'm still not sure federated is the right word. The idea is that there is no central server, just small communities. I'm uncertain whether or not I'll be able to link them together, but I think I may make functionality for server operators to do something of the sort.
<bms_>It's not quite designed to replace IRC, but it'll be a helpful self-hosted alternative.
<OrangeShark>bms_: oh nice :) I look forward to hearing more about it.
<OrangeShark>is there a website or repo that I can bookmark to check out later?
<bms_>Not yet. I'm very low on money, being a high school student with no job, but I do plan to submit to GNUeval eventually. For now, I hang around here and #guix just about daily, at least that's the plan. It might do good to start an IRC channel myself, but I'm not very far into development yet.
<numerobis>Hi! I am wondering whether there is a way of calling system commands from guile, because having to code 'mkdir -p' and 'rm -rf' every time I need them seems like a lot of effort for not much. Thonk you!
<OrangeShark>bms_: okay, be sure to share updates on here and on the mailing list.
<OrangeShark>numerobis: there is a "system" procedure in the posix section of guile
<davexunit>numerobis: gnu guix has a guile implementation of 'mkdir -p', and I think 'rm -r' too
<davexunit>making subprocesses for these things instead of using the POSIX API is an easy, but brittle, solution
<numerobis>OrangeShark: Thanks! I had been looking for it but hadn't found it. And yes, I have seen the implementations in the Guix source code, but they looked quite difficult for a beginner in scheme.
<davexunit>okay, just be aware that spawning subprocesses has significant drawbacks
<numerobis>davexunit: Thanks for the information. What kind of drawback, if I may ask?
<davexunit>you open yourself to a wider range of bugs and incur overhead
<davexunit>you lose guile's exception system and instead have to parse error codes for error handling
<davexunit>the process may crash or the desired program may not be on $PATH
<davexunit>and it's slower than doing the equivalent system calls yourself
<davexunit>for a one-off script, I don't worry much about these things. for software I release for others to run, I do.
<numerobis>davexunit: Thank you very much, that makes good sense. In my case, I need these commands for a quick script, so I think I'll use the 'system' procedure, but I'll keep your comments in mind for if I work on a larger project at some point.
<davexunit>sounds good
<amz3`>in python, it's slower to call the equivalent of rm -r, but I agree with error handling
<ArneBab>dustyweb: I’ve been thinking about a wispy skribe, too, but I didn’t find the right way to do it yet. It might be similar to the shakespeare stuff.
<ArneBab>dustyweb: unquoting to add tags is already working pretty nicely
<ArneBab>the main issue is all the stuff around it: you need to keep the indentation of the outer tags.
<ArneBab>so I didn’t yet find something which feels really right
<dustyweb>ArneBab: hmmm yeah
***bgamari- is now known as bgamari
<ArneBab>dustyweb: so why I think "yes, we should do this! it’s a perfect match!", I don’t have the perfect concrete vision for realization yet ☺
<dustyweb>ArneBab: I agree that the indentation issue is a challenge!
<dustyweb>it almost feels like you would need to *strip out* indentation in this system!
<dustyweb>which almost sounds alarming
<dustyweb>as an example
<dustyweb>to write it is to see all the problems
<ArneBab>You could define content sections and then re-use them in deeper indentation, just like you refactor code to not be too deeply nested
<dustyweb>regardless, it's not as much a "simple fit" as I first thought ;)
<dustyweb>because whitespace is significant in wisp only to define structure
<ArneBab>yes — in wisp the line is the central element while in prose it is typically the paragraph
<dustyweb>but whitespace, in a quasiquote string situation, raises the challenge that strings do really care a lot about their whitespace
<dustyweb>so now you've mixed up structure and content
<dustyweb>hence the confusion
<ArneBab>in HTML strings don’t actually care about their whitespace
<dustyweb>but in xml they do :)
<ArneBab>except with <pre> and similar
<ArneBab>argl …
<dustyweb>in xml <foo> <bar/> </foo>
<dustyweb>the spaces there are each individual objects!
<dustyweb>" "
<dustyweb>text nodes
<dustyweb>which is of course one of the big complaints about xml ;)
<dustyweb>ArneBab: thorny territory.... thanks for talking about it with me though :)
<ArneBab>multiple spaces are still collapsed into one, right?
<ArneBab>dustyweb: gladly ☺
<dustyweb>ArneBab: the answer is no!
<dustyweb>ArneBab: not in xml, and not even in html's DOM
<dustyweb>it's only in the *rendering* that the nodes "disappear"
<ArneBab>how far the web has come …
<ArneBab>…but then, what the site cares about is the user.
<ArneBab>though JS tools are a challenge
<dustyweb>as an aside
<dustyweb>speaking of quasiquote!
<dustyweb>you know what I really wish we had in our quasiquoe?
<dustyweb>`(foo bar ,?((test?) 'baz))
<dustyweb>in this case, if (test?) evaluates to true, we'd get '(foo bar baz)
<dustyweb>but if not, we'd get '(foo bar)
<dustyweb>now why do i want this?
<dustyweb>because I need this kind of thing *all the time* in sxml templating
<dustyweb>instead I do this terrible workaround
<dustyweb>`(foo bar ,@(if (test?) '(baz) '()))
<dustyweb>which is just exhausting
<dustyweb>I'd also like ,@?
<dustyweb>which does the same but inlines it like ,@
<civodul>dustyweb: i've found myself doing that very often too!
<dustyweb>civodul: whew! glad I'm not alone :)
<civodul>maybe we could add such a construct in gexps :-)
<dustyweb>and in normal quasiquote
<dustyweb>or at least provide a module that adds these to quasiquote
<dustyweb>it would make my sxml templating life, which is normally beautiful until I hit this
<dustyweb>extra beautiful :)
<civodul>yep :-)
<dustyweb>quasiquote is not extensible I think in guile right? I guess I will need to extend the reader to prototype this?
<dustyweb>maybe I should look at gexps to find out how :)
<dustyweb>I have been doing soooo much sxml lately between getting and going lately :)
<dustyweb>I feel like came out nicely :)
<ArneBab>dustyweb: couldn’t you implement ,(?(test?) 'baz)
<ArneBab>or rather ,@(?(test?) 'baz)
<ArneBab>by defining the procedure ?
<daviid>the terrible looks rather ok to me
<daviid>ACTION hides
<daviid>* terrible work around
<daviid>but then I don't even use cut :), yet ...
<daviid>ArneBab: while you write wisp, there are people writing hy, in't that funny?
<daviid>nobody is ever happy :)
<ArneBab>daviid: yes! ☺
<ArneBab>we are forever trying to optimize our tools to be able to better tackle the next set of problems
<daviid>have to run, bbl
<dustyweb>ArneBab: hm I think it would have to be a macro!
<dustyweb>but maybe it would be ok.
<dustyweb>scheme@(guile-user)> (define-syntax-rule (? test body)
<dustyweb> (if test
<dustyweb> (list body)
<dustyweb> (list)))
<dustyweb>scheme@(guile-user)> `(foo bar ,@(? #t 'baz))
<dustyweb>$8 = (foo bar baz)
<dustyweb>I suppose that's not bad
<ArneBab>dustyweb: (define (? use-content content) (if use-content content '()))
<ArneBab>you don’t need a macro if it’s OK for you that the test is evaluated directly