Summer of Code Recap

2017-08-28 Thread Ian Price
ll likely be true till December, but I will make an effort to keep up with guile-user and be on the IRC Channel to help the daring souls who want to give this a go. My priorities will be documenting the ILs, filling in missing builtins, and improving jslink. I especially want to see basic IO and MiniKanren up and running, and for it to be convenient to use Guile's builtin libraries. Happy Hacking, Ian Price (This is a crosspost to guile-user of my blogpost [Summer of Code Recap], but please comment on this list, rather than there) [Summer of Code Recap] https://shift-reset.com/blog/2017/8/28/Summer%20of%20Code%20Recap/

Compilation to JS [Update]

2017-08-09 Thread Ian Price
Hello Guilers, I am long overdue an update on the state of affairs of guile-js (the last was at the end of June). Last time I spoke, I had completed task 1 (cps old -> cps soup), and was starting work on task 2 (port boot-9[1]). I made a lot of headway on this task, and would categorise it as "ne

Re: Compilation to js [Update]

2017-06-20 Thread Ian Price
I would like to be able to access Javascript functions from Scheme, possibly with a (system foreign) type API, but this is not a priority at the moment. Getting as much of Scheme as possible working is the main thing. On my list, you could put it as the unspoken 5th stage. As for residualisation,

Compilation to js [Update]

2017-06-20 Thread Ian Price
Hello guilers, I figure it's time for an update on what I've been working on for the past two weeks. I have mainly been working on updating the compiler to go from the old cps representation to the new cps-soup representation. This had a few false starts, but on the third attempt, I think the ap

Compilation to JS

2017-06-05 Thread Ian Price
Hello Everyone, This summer I am following up on the work of two years ago to compile Guile to JS. As some of you may remember from irc back then, I was making good progress until personal circumstances intervened. This year I intend to get it into shape where we can consider including it in Guile

GSOC: First update

2015-06-07 Thread Ian Price
utput of "guild compile --to=javascript foo.scm" can be found between the comments. -- Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"

ANN: pfds v0.3

2014-07-12 Thread Ian Price
u can get started by reading https://github.com/ijp/guildhall/wiki/Getting-Started I have not been the most active maintainer of guildhall/dorodango, and for that I apologise. -- Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"

Re: Where is the backtrace?

2014-01-03 Thread Ian Price
x27;s free for anyone who wants to, to hack on. See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11215. (As for Racket, I suspect you would get better info in the gui than the console version.) -- Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it well is

Re: Where is the backtrace?

2014-01-03 Thread Ian Price
fine (h) ((lambda x (cdr x (h)) (g)) $2 = (define (f) (cdr '())) So, yes. Though not relevant to this case, there is also another important factor in your code, which is that all function calls are tail calls. So even if you turned off optimisation, you would not see a complete backtra

Re: Unquote syntax

2014-01-01 Thread Ian Price
less) Try a few scheme implementations and see how many error on `#(1 2 3 unquote foo) because of implementing vector quasiquotation under the hood as list quasiquotation. -- Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"

Re: and-let* is not composable?

2013-11-02 Thread Ian Price
Ian Price writes: > This version of define-macro still fails on the original macros as > posted by Panicz Maciej Godek, but gives the "right" result using stis's > ck macro version. > > At 2:30am, I'm not liable to get to the bottom of why till tomorrow, but

Re: and-let* is not composable?

2013-11-01 Thread Ian Price
Ian Price writes: > The problem is one that occurs when hygienic and non-hygienic macros are > mixed. Here, and-let* is the non-hygienic one. Basically, in a hygienic > macro, you carry around a bunch of context to allow you to refer to the > right variable names. Then defmacro

Re: Uniq list in Guile

2013-10-26 Thread Ian Price
resorting to C hacking? Without an actual benchmark, no. -- Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"

Re: guile 2.0.9 make check error, in bit-operations.test, elisp-compiler.test and eval-string.test

2013-10-23 Thread Ian Price
at gives an error, you should hopefully get an error here too. Then you can use the command ,bt to get a backtrace. -- Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"

Re: guile 2.0.9 make check error, in bit-operations.test, elisp-compiler.test and eval-string.test

2013-10-20 Thread Ian Price
You'll need to hit ,bt when you get the prompt. Cheers. -- Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"

Re: Guile vectors

2013-10-18 Thread Ian Price
> Patch attached that changes api-compound.texi. I split the paragraph to > make it easier. Well, it's been a bit over a week, so I just pushed this. -- Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it well is the opportunity to do it ag

Re: Guile vectors

2013-10-09 Thread Ian Price
i-compound.texi. I split the paragraph to make it easier. -- Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled" >From ddda4d53e588441e15b39c36033ed7f425fa3895 Mon Sep 1

Re: and-let* is not composable?

2013-10-05 Thread Ian Price
it makes a lot of references to Racket, and Racket specific ways of doing things. Much of it can be fixed for Guile and other Schemes, but you'd still need to gut around half of it. There haven't been any patches yet, but that doesn't mean I haven't been spending time thinkin

Re: Doctest for guile

2013-09-17 Thread Ian Price
#x27;t like these sorts of modules. Automatic checking of an example in a docstring is fine, but putting all the tests in a docstring makes the docstring too big to be useful, and you lose any compile warning time warnings guile can give you on the code. Just my 2¢, but glad it works for yo

Re: and-let* is not composable?

2013-09-11 Thread Ian Price
tting a chain of 2-argument > functions) Indeed, I wasn't sure whether or not I should have mentioned it, but I was told this is the "correct" name for that feature on comp.lang.scheme a while back. I think it might have been Will Clinger, but I'd need to double check. -- I

Re: and-let* is not composable?

2013-09-10 Thread Ian Price
. Currying refers to the process of turning a function of n arguments into an n-nested set of 1 argument functions. Partial application is, well, not supplying all the arguments to a function. You can have partial application without currying, as your macro shows. -- Ian Price -- shift-reset.com "

Re: and-let* is not composable?

2013-09-10 Thread Ian Price
uit for new contributors. > Anyway can I suggest a Bug report where we Then add it to the tracker :) 0. syntax-rules is fine, modulo al petrofsky/oleg style craziness -- Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it well is the opportunity to do it

Re: Syntax-rules generate symbol

2013-09-10 Thread Ian Price
13.5.1. > but on the other it would be nicer if the compiler could trace the > usages of continuations and figure out whether a given one is > ever being re-entered, and optimize accordingly. Well, it can sometimes, but it's a hard analysis in general. -- Ian Price -- shift-reset.com

Re: Syntax-rules generate symbol

2013-09-10 Thread Ian Price
, but there is still one obvious issue with your macro. "exp ..." means 0 or more expressions. If you had intended one or more, as is more usual in this type of macro, you'll want to say so explicitly with something like "exp exps ...". Cheers -- Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"

Re: is (web client) ready for use even for the simplest task?

2013-09-10 Thread Ian Price
encoding header, then the server should not expect a body. I will note, in particular, that not sending a message is a distinct operation from sending a message of length 0. -- Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"

Re: and-let* is not composable?

2013-09-09 Thread Ian Price
to be hygienic, that's pretty easy, but I'm not sure what you can do about this in general. It's not like you can pass in the gensymed name, because that will break the way people who for some reason still right defmacros expect them to work. Dunno, maybe I'm just missing some insight here. -- Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"

Re: Are `eqv?' and `eq?' the same?

2013-08-25 Thread Ian Price
ect program will ever be broken by using it and the efficiency gains if eq? are marginal. -- Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"

Re: Define in let

2013-08-20 Thread Ian Price
it any workaround? It's not a limitation, but a misunderstanding. Define creates a binding in the _current_ scope, not the top level one. -- Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"

Re: guile-redis 0.1.0 released

2013-07-15 Thread Ian Price
d up never getting released, after getting bogged down with some detail in larceny. C'est la vie. Which reminds me, I should have an official release for my memcached library, since I've been sitting on that since February -- Ian Price -- shift-reset.com "Programming is like pinb

Re: Guile 100 #6: CGI and MySQL

2013-05-03 Thread Ian Price
t > to the client. I've just reread your file on this, and you are right. My brain must have switched off while reading :) > Its a bad approach in practice because there is no compilation > of the templates. Indeed -- Ian Price -- shift-reset.com "Programming is like pinball.

Re: Guile 100 #6: CGI and MySQL

2013-05-03 Thread Ian Price
emplating library before[0], but I never released it since it's kinda less nice than just using quasiquote/sxml in practice. I guess I could do this for you, maybe as a warmup for [1], but I think I'd be mortified if someone ended up using it. 0. https://gist.github.com/5514959 1. http:/

Re: Fun with guile, Erastones + goldbach conjecture

2013-04-09 Thread Ian Price
rs (yes, the naturals are recursive, but many of the algorithms, like fast-exponentiation, rely on recursion other than on the predecessor). 0. http://srfi.schemers.org/srfi-41/srfi-41.html 1. http://www.cs.hmc.edu/~oneill/papers/Sieve-JFP.pdf 2. https://github.com/ijp/ijputils/blob/master/streams.sls#L

Re: Fun with guile, Erastones + goldbach conjecture

2013-04-09 Thread Ian Price
(begin > (if (not (= (* 2 i) (analyze i))) > (format #t "~a != (analyze ~a) == ~a~%" (* 2 i) (* 2 i) > (analyze (* 2i btw, Typo here ^^ > (lp (+ i 1) > Maybe I'll meditate on this more, and post a "schemier" version. -- Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"

Re: On procedures within procedures

2013-04-03 Thread Ian Price
keep it as an inner define; if yes, put it in the top level. Obviously, I'm not a clairvoyant, so this is usually a guess, but experience gives you a "feel" for it, and you can revise later. _Sometimes_ I do it because I know Guile can inline it if it is an inner define (naughty, nau

Re: Anniversary hack: Zile editor with Guile support

2013-03-24 Thread Ian Price
translate to Lua or Lua Bytecode. I actually intend to follow a similar approach with a guile-in-the-browser project I would like to write, however, I am probably going to implement a vm, and have it interpret Guile's assembly language directly. I'm not sure I can be clearer than that.

Re: Anniversary hack: Zile editor with Guile support

2013-03-24 Thread Ian Price
the compilation target we recommend for new languages (both elisp and ecmascript compile to this), but if it is convenient for Lua bytecode, pick an even lower level one. -- Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"

Re: Anniversary hack: Zile editor with Guile support

2013-03-24 Thread Ian Price
for two years now, and I've been periodically asking around for people to pick it up, but without any luck. The intersection of people interested in Guile and Lua is pretty small, it seems. -- Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"

Potluck: excuse/teaser

2013-02-16 Thread Ian Price
or so with such awe-inspiring features as Documentation and a proper Test Suite. :) -- Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"

Re: define-macro syntax error

2013-02-12 Thread Ian Price
Akop Pogosian writes: > (define-macro when > (lambda (test . branch) > `(if ,test > (begin ,@branch FWIW, `when' is already available in Guile 2, and define-macro is generally frowned upon. For these ultra-simple cases, prefer define-syntax-rule. -- I

State of the Guildhall 2013

2013-02-10 Thread Ian Price
in the tracker. I'll have a separate post this evening detailing what the new packages are since last time. [This was originally a blog post, but I've posted this to the mailing list since no-one reads my blog :)] -- Ian Price -- shift-reset.com "Programming is like pinball. The r

Re: Safe pattern matching

2013-02-09 Thread Ian Price
> the nearest analogue to read is object->string, but it is not a generic. That should be string->object. It's funny how often I mix up a->b and b->a -- Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it well is the opportunity to

Re: Safe pattern matching

2013-02-09 Thread Ian Price
, but instead you might consider (define foo (match-lambda* )) rather than (define (foo . args) (match args )) the nearest analogue to read is object->string, but it is not a generic. -- Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it

Re: guile-lib 0.2.2 released

2013-02-03 Thread Ian Price
ith guildhall, along with some known interface bugs, the srfi package issues, and support for C etc. A full post will be made later in the week.(promise :) -- Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from

Re: syntax-case guards

2013-02-03 Thread Ian Price
[same procedure different name] you get (every (compose string? syntax->datum) #'(k ...)) As an aside, this won't work in Racket, since they also make lists into syntax objects, unlike psyntax or the r6rs. -- Ian Price -- shift-reset.com "Programming is like pinball. The reward f

Re: Guildhall users: please update your GUILE_LOAD_PATH or %load-path

2013-02-02 Thread Ian Price
this change allows this. > Ian, can you please update your Guildhall "Getting-Started" document > appropriately? <https://github.com/ijp/guildhall/wiki/Getting-Started> I have updated the page accordingly. -- Ian Price -- shift-reset.com "Programming is like pinball. The

Re: Guile 2 birthday potluck

2013-02-01 Thread Ian Price
s the time to be getting started. -- Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"

Re: [ANN] the Guile 100 Programs Project

2013-02-01 Thread Ian Price
s part of justifying my Iteratees library, but that has taken a sideline to newer and shinier projects. -- Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"

Re: guile-json 0.1.0 released

2013-01-30 Thread Ian Price
structions at https://github.com/ijp/guildhall/wiki/Getting-Started I'll try and get a mail out later this week about the current state of affairs with guildhall. -- Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"

Re: call-with-values and primitives

2013-01-11 Thread Ian Price
arguments to − [0] Well, more correctly, they have right identities, of 1 and 0 respectively, but no left ones -- Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"

Re: regexp character classes not supported?

2013-01-08 Thread Ian Price
Klaus Schilling writes: > does irregex support SNOBOL-style patterns? I have not used SNOBOL, so I can't really say for sure if irregexes functionality subsumes it. The documentation itself does not refer to SNOBOL at all. -- Ian Price -- shift-reset.com "Programming is like

Re: use-modules: selecting, which symbols not to load

2013-01-06 Thread Ian Price
ver, be confusing to some people if you mix-and-match module forms. 0. I've been away from the mailing list, and so am only catching up today. -- Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"

Re: regexp character classes not supported?

2013-01-06 Thread Ian Price
ion) syntax, which is a far superior notation for complex > or dynamically-constructed regexps. +1 -- Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"

Re: guile-fcgi?

2013-01-06 Thread Ian Price
27;t ran it, but I find it hard to believe that it wouldn't be severely bitrotten at this point. -- Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"

ANN: pfds v0.2

2012-11-23 Thread Ian Price
added, that you just want to tell me about, bug reports, feature requests, examples or benchmarks you'd like me to do better on, do email me. Cheers, 0. Thank you leppie. 1. If you are not using it already, you can get started by reading https://github.com/ijp/guildhall/wiki/Getting-St

Re: I/O, modules

2012-11-13 Thread Ian Price
ttps://github.com/ijp/iteratees/blob/master/iteratees.sls -- Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"

Re: I/O, modules

2012-11-13 Thread Ian Price
Mark H Weaver writes: > As shown in the upcase program above, (read-delimited "" port) will read > the whole file as a string. You need to (use-modules (ice-9 rdelim)) to > import this procedure. A perhaps more lucid way is to use get-string-all from (rnrs io ports) --

Re: Typed Guile?

2012-11-08 Thread Ian Price
the typed Racket is that firstly > it posits plurality without necessity, introducing labels like Listof, > that a programmer needs to memoize or look up in the documentation, > and secondly, it introduces not-much-telling identifier :, which, > although looks joyfully when used ("

Re: escaping characters

2012-11-02 Thread Ian Price
Bquotator'' \\$(C!-(B it is not representative of any particular escaping mechanism I know of {ampersand} I certainly hope none similar to it exists" -- Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"

Re: where is the web directory?

2012-11-02 Thread Ian Price
Kejia柯嘉 writes: > if i use the default web server of guile, where should i put static > html documents? Right now, I'd be tempted to suggest you let a "real" web server handle these, and reverse proxy to guile for the dynamic stuff only. -- Ian Price -- shift-reset.com

Re: Use of (sxml xpath)

2012-11-02 Thread Ian Price
ce to get better documentation in the manual at some point. -- Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"

Re: Module reflection and the list of bound symbols

2012-09-30 Thread Ian Price
public (exported) ones using the interfaces, but that is beyond my knowledge at the moment. -- Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"

Re: Typed Guile?

2012-09-19 Thread Ian Price
nce stis has far too many toys to play with :) It looks like it's all scheme though, so I could create a guildhall package for others. -- Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"

Re: Palindromes and pattern matching

2012-09-18 Thread Ian Price
(guile−user)> (palindrome? '(1 2 1)) $9 = #t scheme@(guile−user)> (palindrome? '(1 2 3 2 1)) $10 = #t scheme@(guile−user)> ... Seems to work. I believe ___ also works. -- Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"

Re: substring

2012-09-07 Thread Ian Price
compatability, convenience or something else? substring is in the standard, has been for ages. -- Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"

Re: guildhall packages

2012-08-29 Thread Ian Price
cong gu writes: > scheme@(guile-user)> (use-modules (srfi srfi-41)) > While compiling expression: > ERROR: no code for module (srfi srfi-41) This was a mistake on my part, and I mentioned it on guile-devel a few days ago. I will need to upload a new package. -- Ian Price -- shi

Re: guildhall packages

2012-08-29 Thread Ian Price
or expository purposes 1. guildhall seems to make some sort of a distinction between "programs" and "executables", but I'm not sure what the reasoning is for this. 2. executables would go in ~/.local/share/guildhall/2.0/$name/bin -- Ian Price -- shift-reset.com &quo

Re: guildhall packages

2012-08-29 Thread Ian Price
le yet, though it is a priority concern. -- Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"

guildhall packages

2012-08-25 Thread Ian Price
. https://github.com/ijp/guildhall/ 1. Installation instructions -- https://gist.github.com/3327296 -- Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"

New guildhall repository

2012-08-12 Thread Ian Price
There is no interface for user submissions at the moment, but I am looking into that. Hopefully, there will be soon. -- Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"

Re: (real? (* +i +i)) -> #f

2012-08-03 Thread Ian Price
objects k1 and k2 such that (= x (/ k1 k2)) and (= (numerator x) k1) and (= (denominator x) k2) are all true. Thus infinities and NaNs are not rational number objects. (real? -2.5+0.0i) ⇒ #f (real? -2.5+0i) ⇒ #t -- Ian Price "

Re: guile and coroutines controlled from C

2012-08-01 Thread Ian Price
Thien-Thi Nguyen writes: > () Ian Price > () Mon, 30 Jul 2012 05:56:43 +0100 > >(use-modules (ice-9 q)) ;; yech, but it'll do > >[...] > > See also module (ice-9 runq), documented at: > > http://www.gnuvola.org/software/guile/doc/Run-Queues.html >

Re: guile and coroutines controlled from C

2012-08-01 Thread Ian Price
ontinuation, you actually give it a value, which is used as the return value for the call. I actually make use of this in the code above, so that the return value of the threads function returns 'not-done. In this case, when you want a thread to return a value you just call that thread variable with

Re: guile and coroutines controlled from C

2012-07-29 Thread Ian Price
n thread 3... in thread 2... in thread 3... in thread 2... ~ $ I hope that gives you a head start. If I've confused you more, I can only apologise. If you aren't familiar with continuations at all, you could try reading http://tmp.barzilay.org/cont.txt -- Ian Price "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"

Re: ANN: fectors v0.1

2012-07-08 Thread Ian Price
lly I also try to write my test suits more portably, and more thoroughly than I had done for the release. But once you've written them once, it always feels like a drag to do it a second time :) -- Ian Price "Programming is like pinball. The reward for doing it well is the opportunity

ANN: fectors v0.1

2012-07-07 Thread Ian Price
have an implementation of functional sequences based on fingertrees in my pfds library, on the fingertrees branch. See https://github.com/ijp/pfds/tree/fingertrees Cheers, -- Ian Price "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - fr

Re: GNU Guile 2.0.6 released

2012-07-07 Thread Ian Price
My thanks to Ludovic, Andy, and all other contributors for their help in this release. -- Ian Price "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"

Re: getting pipes going

2012-06-20 Thread Ian Price
ay things are until someone who cares writes a better module for this. If those `current-X-ports' are not files of some kind, and hence don't have file descriptors for the child, then `/dev/null' is used instead. The easiest solution is probably to use OPEN_BOTH

Re: Working http-get example and still unsolved problem

2012-05-07 Thread Ian Price
Sunjoong Lee writes: > Hi, Ian; > > 2012/5/7 Ian Price > > Thanks for pointing this out, and if you have other comments on the > implementation (and the close-port issue), I'll be happy to have them. > > I don't understand the "close-port issue&q

Re: Working http-get example and still unsolved problem

2012-05-06 Thread Ian Price
fer size, rather than the difference, which leads to negative values on the recursive call. There was also a mistake in the same case in updating the buffer-pointer. Thanks for pointing this out, and if you have other comments on the implementation (and the close-port issue), I'll be happy to hav

Re: Community service

2012-04-22 Thread Ian Price
project, so please adjust expectations accordingly. It's just something > I found practical and extended it a little so it might be practical for > others too. I'm not entirely sure what I'm going to do with this (yet :), but I think it's awfully nice of you to provide

Re: Using guile's web client

2012-03-15 Thread Ian Price
-response-body. I have now looked at the source for > the web module and that reveals all. Well, when in doubt, I test it out at the repl. This would have clarified things immediately :) -- Ian Price "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"

Re: Using guile's web client

2012-03-14 Thread Ian Price
Nala Ginrut writes: > I'm afraid it's a real bug. No, it's not. See my response to him. :) -- Ian Price "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"

Re: Using guile's web client

2012-03-14 Thread Ian Price
th "/"))) (call-with-values (lambda () (http-get uri #:keep-alive? #t)) (lambda (request body) ...))) the request should (I think) always be a request object, so you don't need to check it with if. Though, the body may be #f, so it's worth checking that. -- Ian Price "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"

Higher order modules: a first stab

2012-03-09 Thread Ian Price
#x27;stream-take)) (stream-take2 naturals2 10) Currently, parameterized modules are functions that return a module, and functions are retrieved by module-ref. This is fine for a proof of concept, but hopefully I'll have something better integrated soon. Thanks to wingo for suggesting the curr

Re: prompts: any example ?

2012-03-08 Thread Ian Price
Ian Price writes: > The trick comes from, I think, Filinski's "Representing Monads", > although it has been quite a while since I've read it. Instead of monads > being represented by the usual 'bind' and 'unit' functions, or the > (categori

Re: prompts: any example ?

2012-03-07 Thread Ian Price
l...@gnu.org (Ludovic Courtès) writes: > Hi Ian, > > Excellent illustration, thank you! > > Ian Price skribis: > >> https://gist.github.com/1548531 - monadic reflection > > Could you expound on this one? I can feel the greatness, but I don’t > fully grasp it. :

Re: prompts: any example ?

2012-03-03 Thread Ian Price
wn control structures is something you will need to, and probably should do, only rarely. You'll generally know when that is since you will be trying to do something crazy, or having to write in a convoluted programming style. https://gist.github.com/1548531 - monadic reflection https://gist.github.com/1381107 - continuations for web programming https://gist.github.com/1381091 - simple generators. -- Ian Price "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"

Re: Some I/O Questions

2012-02-10 Thread Ian Price
s, I could use (endianness big) or (endianness little). For integers you could use ntohs, ntohl, htons, htonl, but that is native endianness <-> network order only. > 4. Is writing an archive manager using Guile for implementing archive > formats a bad idea to start with? Writing in Scheme is

Re: Neat hacks for a birthday

2012-02-08 Thread Ian Price
mple GCC plug-in interface > for Guile. Let’s see how it goes… I look forward to that. Come on guilers, that's two of us stepped up to the plate so far. What are you, chicken? ;-) -- Ian Price "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"

Re: The Web, Continuations, and All That

2012-02-04 Thread Ian Price
As a follow up to this, I'd just like to point out this blog post on racket-lang.org. http://blog.racket-lang.org/2012/02/zack-gallers-experience-with-stateful.html -- Ian Price "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - fr

Re: GNU Guile 2.0.5 released

2012-01-31 Thread Ian Price
if you already installed 2.0.4. > We apologize for the inconvenience. Mozilla, eat your heart out. :) -- Ian Price "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"

Re: The Web, Continuations, and All That

2012-01-31 Thread Ian Price
look at existing continuation based frameworks and see how they handle some of these issues. 1. http://rotty.yi.org/irclogs/freenode/%23guile/2012-01-10/ -- Ian Price "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"

Re: any thoughts on guile as a kernel extension language

2012-01-27 Thread Ian Price
Eric Schulte writes: > The following immediately made me think of guile. > http://netbsd-soc.sourceforge.net/projects/luakern/ It's long since dead, and Linux rather than Hurd, but http://abstractnonsense.com/schemix/ is somewhat relevant. -- Ian Price "Programming is l

Re: The Web, Continuations, and All That

2012-01-25 Thread Ian Price
you > have 5 application servers (guile (import (web server)) running behind > reverse proxy. User may never fire needed continuation. Overall scaling > strategy for web is "avoid per node state" (see read-only filesystems on > Heroku). Well, no-one suggested that the current a

Re: The Web, Continuations, and All That

2012-01-22 Thread Ian Price
.com/1381107. It would be if someone(nudge nudge) were to take the effort to make one of these experiments practical, since a guile web framework seems to be a common request. -- Ian Price "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"

Re: Mixing syntax-rule and indentifier-syntax

2012-01-17 Thread Ian Price
e@(guile−user)> k $5 = #(#f 2 3) this set! modification only works at the first level of the with-vectors form, fixing that is left as an exercise :) 0. I'm sure there is another way, but my mind blanks at the moment -- Ian Price "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"

ANN: pfds 0.1

2012-01-08 Thread Ian Price
useful. 1. The test suite requires the (wak trc-testing) library, see https://gitorious.org/wak -- Ian Price "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"

Re: how to get read-byte

2012-01-07 Thread Ian Price
ports) library. -- Ian Price "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"

Re: Guile-SDL 0.4.0 available

2011-12-15 Thread Ian Price
rm that with this change it works. Thanks ttn for the release, and thanks andy for saving me some debugging time :) -- Ian Price "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"

Re: HTTP Request/Response questions

2011-11-08 Thread Ian Price
Thien-Thi Nguyen writes: > SRFI 13 ‘string-index’ takes a character-set object as well as a predicate. > Going that way could be more efficient (if you pre-construct the charset). I'll make sure to try it out, but I'm don't think it would make much of a difference. -- Ia

  1   2   >