IRC channel logs

2017-10-10.log

back to list of logs

<ArneBab>(with-error-to-string (λ()(write "hello" (current-output-port))))
<ArneBab>(with-error-to-string (λ()(write "hello" (current-error-port))))
<Apteryx>sneek: later tell civodul, I've posted a repro script for the Geiser issue here: https://github.com/jaor/geiser/issues/83
<sneek>Will do.
<Apteryx>ArneBab: thanks :) It's not in Guile's manual index it seems.
<Apteryx>In fact there is no string "with-error-to-string" in the Guile's user manual
<Apteryx>are srfi-9 records homoiconic? I.e., can I print those to a file and reload them later?
<xkapastel>that's not what homoiconic means
<xkapastel>i imagine you can find a way to serialize them though
***hydraz is now known as sigint
***sigint is now known as hydraz
<dustyweb>Apteryx: they don't serialize via write / read by default
<Apteryx>dustyweb: OK. So I'd have to define a custom printer / reader to do that? Doesn't seem very hard; I can output them to a list and read them using an ice-9 match
<Apteryx>Can I use output redirection when using system or system*? like, (system* "gzip" "-c" "-d" "/my/file.tar.gz" ">" "/my/unzipd/file")
<ArneBab>Apteryx: I often simply try REPL tab completion (did you activate readline? If not, please do)
<ArneBab>(to your question from yesterday)
***micro`_ is now known as micro
<amz3`>o/
<OrangeShark>hi amz3`
<amz3`>OrangeShark: hi!
<amz3`>tx for +fav on my project :)
<OrangeShark>no problem. I want to look more into it later today.
<ArneBab>I finally implemented nice doctesting, using a property of the procedure instead of string parsing, and it feels great! → https://bitbucket.org/ArneBab/wisp/src/299795dbb3fecea91dcdde480817b36fc45ccc5f/examples/doctests.scm?at=default&fileviewer=file-view-default
<ArneBab>^ complete implementation, parsed to scheme, drop-in ready.
<ArneBab>to use it (example, 14 lines): https://bitbucket.org/ArneBab/wisp/src/299795dbb3fecea91dcdde480817b36fc45ccc5f/examples/doctests-testone.scm
<amz3`>so... at last I cycle back to my search engine work
<dustyweb>I don't suppose there's something like module-add!/module-set! that also allows you to append a syntax form / macro to a module?
<civodul>dustyweb: you could add a syntax form, but it wouldn't be used
<dustyweb>civodul: aha, ok...
<dustyweb>civodul: I ask because I'm implementing more or less the W7 security kernel stuff
<dustyweb>on top of (ice-9 sandbox)
<civodul>oh oh!
<dustyweb>so
<dustyweb>if we want to allow modules to define new macros that they then "pass into" child modules that are then run
<dustyweb>like the (enclose) form
<dustyweb>there has to be some way to put them in there, but I don't know we have something
<dustyweb>all I need is to enable myself to define a macro here, and then in the new module I'm defining allow it to be something users of the other module can "use"
<dustyweb>civodul: does that make sense?
<dustyweb>it's maybe not important
<civodul>hmm dunno!
<civodul>W7 is very much a "run-time" thing
<dustyweb>yes
<civodul>macros are very much compile-time
<dustyweb>it may be that macros don't make sense in that world
<dustyweb>except for ones defined out the system
<civodul>they make sense within a "module", i suppose
<dustyweb>well and what if you want your module to be available to other modules
<dustyweb>as in explicitly you're packaging up some of your features for general use
<dustyweb>it seems like macros just aren't very usable for w7 I guess except "within the same module"
<dustyweb>oh well!
<dustyweb>ok I'll give up on macros for now :)
<dustyweb>we'll just need to rely on lambda, the ultimate ;)
<dustyweb>otherwise I think I have this working!
<dustyweb>I'm getting in a last minute paper for Rebooting Web of Trust on how to use W7'ish scheme for "smart signatures"
<dustyweb>this mechanism I'm writing up wouldn't be used long term
<dustyweb>but it turns out that (ice-9 sandbox) has enough to define the whole system as a prototype :)
<civodul>heh, sounds exciting!
<civodul>though "smart" sounds like "cloud" to my ears ;-)
<dustyweb>yes :)
<dustyweb>civodul: all this "smart contract" stuff really means
<dustyweb>is you have a sandboxed script that's effectively a predicate
<dustyweb>at some future point, is the contract fulfilled?
<dustyweb>that's all.
<dustyweb>that demystified a lot of the etherium stuff people are talking about :)
<civodul>right, and i think that's a very useful construct, as ethereum indeed shows
<dustyweb>also it turns out there are currently some attacks possible against some of these systems
<dustyweb>and I'm pretty sure W7 is just the system needed to fix it
<dustyweb>lambda, the ultimate!
<civodul>definitely :-)
<dustyweb>but it wouldn't use guile's VM long term
<dustyweb>though it may use guile's compiler tower
<dustyweb>because crypto people want the final version to write out native code that can obscure the current operation against side channel attacks
<dustyweb>eg recording cpu noise and figuring out keys
<civodul>are they ok with using a Turing-complete language for that?
<dustyweb>yes, it just has to have constraints in space and time
<dustyweb>so that's another thing that would have to be done
<dustyweb>it would have to be *deterministically* constrained in space and time
<dustyweb>not in terms of seconds for example
<dustyweb>but each operation would have a cost, and effectively the code would halt if the total operation count is exceeded
<dustyweb>so if you have space/time constraints, and you have capabilities that don't permit mutating the outside world
<dustyweb>it should be safe and deterministic!
<dustyweb>that also means that the cost of each operation needs to be recorded in a manner that's uniform
<dustyweb>across implementations
<dustyweb>civodul: if you can surmise a reason why a turing complete language within those constraints is still not sufficient, let me know :)
<civodul>dustyweb: i guess you're right, if it's properly constrained in time and space, it should be good