[plt-scheme] Re: Typed scheme: Cannot apply expression of type Procedure, since it is not a function type
>
> Discriminated unions are the category-theoretic dual of cartesian
> products. If you find one useful, chances are you need the other, too.
>
Can you please elaborate?
>>
> You might be better off with CAML than Haskell, if you want to make
> smaller steps in that direction. CAML is not such a radical shift into
> lazy evaluation.
I'm not totally unfamiliar with lazy evaluation (the concept, at least, practice will be a different matter I guess :-;), and having already started with Haskell (several times... - I've always been forced to postpone it somehow) I think I'd like to stick with it, not begin yet another thing...
>
> Also, learn some elementary category theory (that found in the first
> chapter or two of *any* book on the subject will be enough to
Yes, this topic really is on my "books queue". Only for me, as a mathematically totally untrained person, with no one to ask, it does make a difference which book I read - I fully realized this with John Fraleigh's "Abstract Algebra", which I've nearly finished by now and which I'm really enthusiastic about. For sure it may lack "rigor" as some critique on amazon was saying, but it really makes me understand the concepts. Could you perhaps recommend a book on category theory that emphasizes understanding in a similar way?
In general, your post seems to suggest that learning about theoretical concepts and practical programming need not be so tightly coupled... which is in accordance with my realizing that perhaps using typed scheme for my project (of implementing relational algebra) might render things unnecessarily complicated (as I have to, in a way, implement types myself, and am using scheme functions on the other hand, which leads to serious typing problems). (Plus, I think I cannot go on bugging Sam with so many questions :-;). What I mean to say,- I should choose the easiest tool for the job and not make things overly complicated by trying to make the scheme code as haskell-like as possible :-;
Ciao,
Sigrid
>
> ------------------------------
>
> Message: 3
> Date: Thu, 3 Jun 2010 22:22:41 -0400
> From: Matthias Felleisen <matthias at ccs.neu.edu>
> Subject: Re: [plt-scheme] Fun with Unicode and delimited continuations
> To: John Clements <clements at brinckerhoff.org>
> Cc: David Herman <dherman at ccs.neu.edu>, Eli Barzilay
> <eli at barzilay.org>, plt-scheme at list.cs.brown.edu, Doug Orleans
> <dougorleans at gmail.com>
> Message-ID: <84F5E3D8-28D2-44FB-983D-02D54BA33543 at ccs.neu.edu>
> Content-Type: text/plain; charset=us-ascii
>
>
> On Jun 3, 2010, at 7:47 PM, John Clements wrote:
>
>>
>> On Jun 3, 2010, at 4:33 PM, Matthias Felleisen wrote:
>>
>>>
>>> Can you return them from the function that grabs them (in Python)?
>>> Can you resume the function once it has transfered control somewhere else?
>>> Can you store the continuations in some vector?
>>>
>>> (I don't know the answers, but these are some of the things one can do with 1st-class values.)
>>
>> Yes:
>>
>> def grabK () : yield 1 ; print "running..." ; yield 2
>>
>> def grabAFewKonts () :
>> return [grabK () , grabK ()]
>>
>> a = grabAFewKonts();
>>
>> f = a[0];
>> g = a[1];
>>
>> print(f.next());
>> print(f.next());
>> print(g.next());
>
>
> Interesting perception. What you are storing are not the continuations but the suspended generators. (Think of grabK() as the creation of a generator.) You could do that in Simula 67, and what you need for that is a pair of control stacks, not a continuation tree.
>
> So here is the next question then:
>
> Can you invoke them a __second__ time and get an error message about a second use?
> If you can't, they aren't real one-shot continuations. To be precise, you have no
> observation to prove that they are continuations.
>
> In the days of denotational semantics, you might have said that you can denote them but not express them (or backwards, Mitch would know).
>
> -- Matthias
>
>
>
>
>
>
>
> ------------------------------
>
> Message: 4
> Date: Thu, 3 Jun 2010 23:00:43 -0400
> From: Sam Tobin-Hochstadt <samth at ccs.neu.edu>
> Subject: Re: [plt-scheme] Fun with Unicode and delimited continuations
> To: Matthias Felleisen <matthias at ccs.neu.edu>
> Cc: David Herman <dherman at ccs.neu.edu>, Eli Barzilay
> <eli at barzilay.org>, John Clements <clements at brinckerhoff.org>,
> plt-scheme at list.cs.brown.edu, Doug Orleans <dougorleans at gmail.com>
> Message-ID:
> <AANLkTinzul99c8CtCpy3CmITVoFieoC-MbEHbUkwY8z- at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> On Thu, Jun 3, 2010 at 10:22 PM, Matthias Felleisen
> <matthias at ccs.neu.edu> wrote:
>> You could do that in Simula 67, and what you need for that is a pair of control stacks, not a continuation tree.
>
> There's a paper in TFP 2010 by Konrad Anton and Peter Thiemann that
> discusses these under the rubric of coroutines, with history going
> back to Simula.
>
> --
> sam th
> samth at ccs.neu.edu
>
>
> ------------------------------
>
> Message: 5
> Date: Wed, 02 Jun 2010 22:17:21 -0700
> From: George Oliver <georgeolivergo at gmail.com>
> Subject: [plt-scheme] MUD servers?
> To: plt-scheme at list.cs.brown.edu
> Message-ID: <4C073AE1.7080903 at gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> hi,
>
> While there are a few threads on the list that mention MUDs, and several
> PLT-Scheme muds referenced in Google results, it seems like most of the
> links to code or running games are long dead. Does anyone have current
> links to PLT-Scheme MUD info?
>
> As a long-time MUDder and beginning Schemer I think this would be a fun
> project to tackle.
>
>
> thanks, George
>
>
> ------------------------------
>
> Message: 6
> Date: Thu, 03 Jun 2010 23:24:21 -0700
> From: Synx <plt at synx.us.to>
> Subject: Re: [plt-scheme] MUD servers?
> To: PLT-Scheme Mailing List <plt-scheme at list.cs.brown.edu>
> Message-ID: <4C089C15.2040102 at synx.us.to>
> Content-Type: text/plain; charset=ISO-8859-1
>
>
> On 06/02/2010 10:17 PM, George Oliver wrote:
>> hi,
>>
>> While there are a few threads on the list that mention MUDs, and several
>> PLT-Scheme muds referenced in Google results, it seems like most of the
>> links to code or running games are long dead. Does anyone have current
>> links to PLT-Scheme MUD info?
>>
>> As a long-time MUDder and beginning Schemer I think this would be a fun
>> project to tackle.
>
> I thought it would be fun to tackle too. Then I realized how PLT does
> such wonderful optimization by not allowing you to remove modules
> explicitly, but that doesn't cater well to a situation where you are
> going in and out of different rooms and player contexts and such. Then I
> learned just how convoluted making custom languages is using PLT, which
> until last week or so had no tutorial how to do so at all. And finally I
> ran into the problems facing sandboxes, how to get them to a state where
> you can actually pass s-expressions to them and not have them error out
> claiming they're trying to hax your boxes.
>
> It turned out to be a lot more complicated than I imagined at first...
> probably mostly my fault since I seem to overcomplicate everything. I
> kind of concluded in the end that getting something working isn't worth
> the effort and I'd just use LambdaMOO instead (which ironically does not
> support any form of LISP at all). Then I just got tired of trying to
> make a convincing text game at all. Then I combed my hair over one eye
> and started wearing black clothing with striped sleeves everywhere.
>
> In short, I'm still working on it. Slowly. Got other priorities though.
> You're free to look at what I got:
> https://synx.us.to/code/mu/
>
> The database thing is the trickiest part that actually works. I'm not
> sure I could get good performance using a relational SQL database
> though, and it'd be better to represent the data as it actually is
> instead of trying to strongarm it into some kind of human readable query
> language like sqlite wants me to.
>
> Oh also,
> http://pre.plt-scheme.org/docs/html/guide/languages.html
>
>
> End of plt-scheme Digest, Vol 58, Issue 14
> ******************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20100604/d05eac9b/attachment.html>