IRC channel logs
2015-11-20.log
back to list of logs
<paroneayea>going to try to build an irc client with this async loop I've written <daviid>paroneayea: i-sink maybe ? [like I do/can sink to man...!] <daviid>or i-sinc, k-sink, k-sinc [kitchen...] <paroneayea>if you (or someone else knowledgeable about guile's select) is around, I have a question about (select) <paroneayea>sneek: tell mark_weaver how do we distinguinsh between ports that work with (select) and those that don't? Is there a way to add new port types that fit with (select) if useful? <sneek>mark_weaver, paroneayea says: how do we distinguinsh between ports that work with (select) and those that don't? Is there a way to add new port types that fit with (select) if useful? <paroneayea>sneek: later tell mark_weaver how do we distinguinsh between ports that work with (select) and those that don't? Is there a way to add new port types that fit with (select) if useful? <paroneayea>ports are working nicely with this even tloop implmentation <polyphagia>if i'm using embedded guile in a C program for configuration, what's the best way to change that file from the C program? <taylan>polyphagia: what do you mean with "change that file"? <taylan>do you mean e.g. setting the value of a Guile variable, which contains the file's path, to a different Guile string, from C? <taylan>or do you mean editing the file somehow? <polyphagia>i'm planning to use guile for a configuration file for game controls, but i want the user to be able to map them in the C program <taylan>isn't that a C programming question then? :) or do you need advice on the overall strategy? I imagine there's many ways to do it... I think I would declare a configuration data structure, which could be a Guile record type, and saving the config would entail writing the values in the data structure into the file. all this could be implemented in Guile, and C code could just invoke Guile <taylan>(it could also be a plain alist, or hash table, instead of a record type...) <polyphagia>so how do i go about writing the values? just a format string? <taylan>(pretty-print the-alist file-port) <taylan>from the module (ice-9 pretty-print) <taylan>pretty-print uses 'write' style by default it seems. that should be correct. can you give an example? <taylan>oh you mean like (quote foo) instead of 'foo maybe? <taylan>'foo is equivalent to (quote foo) anyway for the reader... <taylan>what's output by 'pretty-print' (or 'write') should be input via 'read' <taylan>then it will work, unless an "unprintable" object was in the output, like a procedure, record type, or hash table, which are written in some human-recognizable way but can't be read back in exactly <taylan>yeah read/write is really amazing :) <polyphagia>this is much easier and more robust than just rolling my own config garbage <mark_weaver>paroneayea: sneek just delivered to me your question about ports that work with 'select' on #guix. <mark_weaver>I guess that file and socket ports are the only ones that currently work with select <mark_weaver>specifically, ports that have an underlying POSIX file descriptor <mark_weaver>but, it occurs to me that it may be theoretically possible to create custom ports that can also work with 'select', and that it may be important in some contexts to be able to do this, although I imagine it may also be a bit hairy to implement such a thing, and worse, the API may be hairy. <wingo>ACTION has unboxed 64-bit integers working in a dev branch <paroneayea>mark_weaver: I have the basics of the async loop library working btw <paroneayea>I'm going to try to write an irc bot today to test it <paroneayea>and then add some licensing stuff and push it to a repo <davexunit>wingo: is there anyway that floating point ops can be unboxed on 32 bit platforms? <davexunit>I've been getting more into ARMv7 stuff lately <mark_weaver>paroneayea: at present, the 'fileno' procedure, which returns the POSIX file descriptor underlying a port, can be used to determine whether a port can be used with 'select'. <mark_weaver>if it can't, then 'fileno' will raise an exception, so you can do (false-if-exception (fileno port)) <mark_weaver>but that won't take into account any future custom port types that we may add that would support 'select'. <paroneayea>mark_weaver: okay, excellent, thanks for clarifying <mark_weaver>anyway, that's great news about the async loop library! <paroneayea>mark_weaver: so the first version I used all internal guile datastructures, including mutable queues, so the first version does rely on imperative mechanisms <paroneayea>mark_weaver: but I'm planning on starting a branch that uses all functional datastructures, maybe from pfds <mark_weaver>it's okay, everything that runs on existing computers uses imperative mechanisms at some level. <paroneayea>yeah, well the goal of that is it could maybe give us cool features like time-traveling debugging like in Elm (and in the future, Sly) <mark_weaver>to my mind, the more important thing is whether the API promotes or hinders functional programming above it. <mark_weaver>(e.g. traditional hash tables are an example of an API that hinders functional programming above it) <wingo>davexunit: on the stack at least. if they escape from loops or whatever they are boxed on the heap, same as now <paroneayea>ACTION needs to add docstrings still to the whole thing, but has a reasonable number of tests so far <wingo>but in master all heap slots are 64 bits wide <rekado>dear Guilers, for FOSDEM 2016 we currently only have four talks for the Guile devroom. <paroneayea>civodul: hm, could you make a post to the guile blog calling for guile/guix talks at fosdem? <rekado>civodul: does chop-backup support garbage collection or deletion of chunks that are unique to a single backup version? <paroneayea>I'll submit now, and again if another posting for talks goes up. <rekado>I'd really like to use chop-backup instead of my brittle rsync "backup", but ultimately I have limited space on the external disk and I'd like to be able to prune the backup store once in a while. <rekado>civodul: is this by design? Is it possible to remove? Is there some sort of reference counting? <civodul>no currently there's no reference counting <civodul>it's actually harder to add a GC à la Git <civodul>so you can't tell which blocks are referenced and which are not <civodul>you could think of it as one of these backup tapes <rekado>that's a bit of a problem for me, because I don't know where to safely store this ever-growing append-only mass. <rekado>I use full disk encryption on my backup disks. Maybe I can assemble my own non-encrypted, reference-counting backup pipeline with the tools libchop provides. <mark_weaver>I currently use 'rsync -aP' along with 'cp -al' to keep multiple backups with sharing (deduplication) via hard links <mark_weaver>my only real complaint with this method is that it requires running 'rsync' as root on the machine that's only storing the backup. <civodul>rekado: i wouldn't claim chop-backup is production-ready, so care must be taken <mark_weaver>another system that looks promising to me but I haven't yet tried it is "obnam" <civodul>i think content-addressed storage is better suited <civodul>Ugarit does that too, and it's written in Chicken Scheme <rekado>I like Ugarit but we currently don't have a working Chicken Scheme in GuixSD ... <rekado>I want to use a CAS-based system because I have multiple machines each holding a subset of all files. <rekado>my laptop only holds a fraction of all files, but I also sometimes do things on my desktop machine, so I cannot just overwrite everything with what I have on my laptop. <rekado>so backing up the latest versions to an external disk by rsync'ing becomes very difficult (I want to use --delete as I often move around stuff and remove unused files). <rekado>with a CAS I could just back up all machines to the shared storage, without having to worry about accidentally overwriting files. <csed>I'm basically sending this to every IRC channel I'm in. <mark_weaver>csed: with javascript disabled, I can't even *read* that article. that's obnoxious :-( <civodul>mark_weaver: i think it's just empty, which is the funny part <csed>Huh. Anyone ever try setting up Guix on an RPi? <amz3>AFAIK RPi requires blobs to be fully operational <daviid>csed: #guix would be more appropriate for these quizz <csed>Nevermind. But amz3, yeah. Requires blobs. <daviid>csed: not that it is a problem, but more people will be abble to help you wrt any guix guixsd releated quizz, in #guix :) <csed>daviid: Yeah, agree. Forgot which channel I was in. <paroneayea>YESS delimited continuation support in loopy is working <mark_weaver>civodul: oh, I see. okay, I agree, that's amusing :) <paroneayea>which kind of conflicts with the main library's (async) <paroneayea>I guess if people hit conflicts, they can import namespaced <daviid>paroneayea: i would rename it too, fwiw <paroneayea>well the synchronous things use (run) so maybe I should do (run-free) ;) <paroneayea>(parallel) doesn't work, because it isn't really parallel <daviid>dsmith-work: your good at finding names ... where are you ? :) <daviid>i used 9 for ice-9 of course, what would be 8 for? <daviid>what is a pun ? [sorry ot native speaker here] <paroneayea>daviid: ah, a joke that involves words or how you pronounce things <paroneayea>but I bet people would type (async) instead of (%async) a lot as a mistaked <daviid>i think it's a good name , what other people think ? <daviid>well you can alwasy amke a not [the % is on purpose ... or something like that <paroneayea>I just worry I'll so (async (run-this)) a lot and get confused :) <daviid>hum don't know i prefer %async, but then ... <paroneayea>it's a nice compromise, and at least it has a little joke in it :) <daviid>not good at this, but f-async sounds good to me <daviid>with all due respect better then %sync :) <daviid>paroneayea: did you use the code or some of it from cris vine ? <paroneayea>daviid: though inspired by learning about SICP and Sly <daviid>i'd have to read it again, gone out of my poor mem :) <daviid>good! i'm curious how your solution compares to criss one <daviid>dsmith-work: paroneayea is looking for a name for his module doing async ... i thought you may join the attempt to find a good name ... <daviid>f-async is my prefered, paroneayea prefers %sync <paroneayea>it's for the macro that calls code asynchronously <daviid>ah %async is better then sorry misunderstood :) oh man must be tired <paroneayea>daviid: well it's not all purely functional yet, and it does use a parameter to find the default async loop (unless you pass it in) <dsmith-work>daviid: I'm quite terrible at naming things. You'd be shocked at some of them. <paroneayea>I have to say, it's pretty nice being able to do <daviid>dsmith-work: ok, i had the opposite idea that you were good atthis <paroneayea>and have it return with that value, but in a non-blocking manner <dsmith-work>daviid: I've had some fun coming up with backronyms in the past... <dsmith-work>Something to consider for a good project name is uniqueness. <dsmith-work>So global internet searches actualy retunr useful matches <paroneayea>that might be a good unique name for this project, better than "loopy" <paroneayea>and then I can use (8sync) and not feel bad about it :)