Re: [Chicken-users] Imlib2 question
Once I spelled receive correctly it works like a champ. Thanks.I cannot get over what a great language Scheme is and what a great system Chicken is. Why would anyone use anything else? Thanks again.What I was missing in trying to use receive was that the results must be handled inside the body of the procedure. Bill Graham Fawcett wrote: On 9/24/07, William Ramsay [EMAIL PROTECTED] wrote: That's the problem, I don't know what to use.I've tried call-with-values and receive, but both give me errors, mostly because I have no idea what I'm doing. The call to (imlib:pixel img x y) should return the r, g, b, a values of the pixel. Just calling it produces r. The others are there, but how do I get them? I don't know imlib; but try: (receive (r g b a) (imlib:pixel img x y) (print r is r) (print b is b)) Graham ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Imlib2 question
On Tue, Sep 25, 2007 at 09:04:19AM -0400, William Ramsay wrote: Once I spelled receive correctly it works like a champ. Thanks.I cannot get over what a great language Scheme is and what a great system Chicken is. Why would anyone use anything else? Would you mind convincing my boss? :) Peter -- http://sjamaan.ath.cx -- The process of preparing programs for a digital computer is especially attractive, not only because it can be economically and scientifically rewarding, but also because it can be an aesthetic experience much like composing poetry or music. -- Donald Knuth pgprzbJYK9ix0.pgp Description: PGP signature ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Imlib2 question
William Ramsay scripsit: Thanks again.What I was missing in trying to use receive was that the results must be handled inside the body of the procedure. If you actually want a list, it's easy to get one with (receive foo (whatever x y z) foo) -- John Cowan[EMAIL PROTECTED]http://ccil.org/~cowan There was an old manSaid with a laugh, I From Peru, whose lim'ricks all Cut them in half, the pay is Look'd like haiku. He Much better for two. --Emmet O'Brien ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Imlib2 question
Hallo, On 9/25/07, Peter Bex [EMAIL PROTECTED] wrote: On Tue, Sep 25, 2007 at 09:04:19AM -0400, William Ramsay wrote: Once I spelled receive correctly it works like a champ. Thanks.I cannot get over what a great language Scheme is and what a great system Chicken is. Why would anyone use anything else? Would you mind convincing my boss? :) Get into the queue! :-) Cheers, -- -alex http://www.ventonegro.org/ ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Imlib2 question
On 9/25/07, Alex Queiroz [EMAIL PROTECTED] wrote: On 9/25/07, Peter Bex [EMAIL PROTECTED] wrote: On Tue, Sep 25, 2007 at 09:04:19AM -0400, William Ramsay wrote: Why would anyone use anything else? Would you mind convincing my boss? :) Get into the queue! :-) For what it's worth, I *did* convince my boss; I've used Chicken to write a set of Web applications to supplement one of our campus systems. None of the apps was supposed to last more than a semester -- we expected that the primary system itself would grow the same features during that time -- so they were somewhat willing to let me take a couple risks. But that was two semesters ago, and the Chicken apps are still in business. They've only served about 2 million requests so far (about 10,000 per day right now), which is far from huge, but they can take a heavier load. Lord knows I've had a couple problems with them (mostly self-inflicted ones), but overall it's been a tremendous win. Some of the things I would have used in my elevator pitch for Chicken (keeping in mind that Web apps are my thing): - running an application in a REPL (no compilation step; redefine anything you want, any time) is the rapidest development environment you can get, bar none. - It's also a great maintenance environment; almost all bugs can be corrected live, without restarting a single process. - works with all major databases (don't use that Fawcett guy's Oracle driver, though, it's a piece of crap); works great without them, too. - can use third-party libraries written in C, Java, Python. - You can compile the stuff that needs to run faster. Web apps don't tend to have too many hotspots, though. - Chicken and Scheme are relatively easy to learn, and there are plenty of resources available. - works great in a Unix environment, where forking processes is cheap: you can write small, fast programs that are suitable for Unix-style design (forks, pipes, etc.). Try *that* with Java. This is a good approach for shared-nothing, highly-scalable apps. Not that I wrote mine that way... ;-) - What the community lacks in size, it makes up for in brain-power and supportiveness. Everyone here knows that stuff, of course. ;-) Graham ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Imlib2 question
Graham Fawcett scripsit: Some of the things I would have used in my elevator pitch for Chicken (keeping in mind that Web apps are my thing): These should be posted to the Wiki. -- John Cowan [EMAIL PROTECTED]http://ccil.org/~cowan Original line from The Warrior's Apprentice by Lois McMaster Bujold: Only on Barrayar would pulling a loaded needler start a stampede toward one. English-to-Russian-to-English mangling thereof: Only on Barrayar you risk to lose support instead of finding it when you threat with the charged weapon. ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] array-lib : array-join when innermost datum is an array itself
If I have an array with dimension-list '(2 3) whose contents at each position is an array of dimension-list '(4 5), how can I use array-join to create an array of dimension-list '(2 3 4 5) I would post the code, but: 1 - I think this question is easy for anyone who knows the API well [Kon :)] 2 - the code to generate the is very involved. If you would like to get it then simply a) Unzip http://hg.metaperl.com/redick/archive/aae0c0bbe51b.zip b) load the file verbs.scm which will load everything else. c) load the file scheme/issues/how-to-array-join.scm which will create an array of dimension '(2 3) which has elements of dimension '(4 5) ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users