[Haskell-cafe] APLAS 2013 second call for papers

2013-06-02 Thread Chung-chieh Shan
(Friday), 23:59 UTC Notification:26 August 2013 (Monday) Final paper due: 19 September 2013 (Thursday) Conference: 9-11 December 2013 (Monday-Wednesday) == ORGANIZERS == General chair: Peter Schachte (University of Melbourne) Program chair: Chung-chieh Shan (Indiana

[Haskell-cafe] APLAS 2013 call for papers

2013-04-02 Thread Chung-chieh Shan
(Friday), 23:59 UTC Notification:26 August 2013 (Monday) Final paper due: 19 September 2013 (Thursday) Conference: 9-11 December 2013 (Monday-Wednesday) == ORGANIZERS == General chair: Peter Schachte (University of Melbourne) Program chair: Chung-chieh Shan (Indiana

[Haskell-cafe] ML Workshop: register early by August 15

2011-08-13 Thread Chung-chieh Shan
University) Andrew Tolmach (Portland State University) Anil Madhavapeddy (University of Cambridge) Chung-chieh Shan (chair) Joshua Dunfield (Max Planck Institute for Software Systems) Julia Lawall (University of Copenhagen) Keisuke Nakano (University of Electro

[Haskell-cafe] Domain-Specific Languages: Call for Participation

2011-07-15 Thread Chung-chieh Shan
DSL 2011: IFIP Working Conference on Domain-Specific Languages 6-8 September 2011, Bordeaux, France Call for Participation: Online registration deadline July 30, 2011 Details of the program and accommodation are available at http://dsl2011.bordeaux.inria.fr. == Invited Speakers ==

[Haskell-cafe] Deadline June 17: ACM SIGPLAN Workshop on ML

2011-06-10 Thread Chung-chieh Shan
. IMPORTANT DATES * 2011-06-17: Submission * 2011-07-22: Notification * 2011-09-18: Workshop PROGRAM COMMITTEE Amal Ahmed (Indiana University) Andrew Tolmach (Portland State University) Anil Madhavapeddy (University of Cambridge) Chung-chieh Shan (chair) (Rutgers University

Re: [Haskell-cafe] HANSEI in Haskell?

2011-02-28 Thread Chung-chieh Shan
Daryoush Mehrtash dmehrt...@gmail.com wrote in haskell-cafe: I am confused about this comment: Mostly we preferred (as do the domain experts we target) to write probabilistic models in direct style rather than monadic In the haskell implementation of the lawn model there are two different

Re: [Haskell-cafe] HANSEI in Haskell?

2011-02-28 Thread Chung-chieh Shan
Daryoush Mehrtash dmehrt...@gmail.com wrote in article AANLkTim0LTOviud2fyzU7NAsraQMuCKa=qyfroxn8...@mail.gmail.com in gmane.comp.lang.haskell.cafe: I see the problem now. But I am confused as to why there are no Bool class (like Num, Fractional...) in Haskell. If I had such a class then

Re: [Haskell-cafe] HANSEI in Haskell?

2011-02-24 Thread Chung-chieh Shan
Arnaud Clère arnaud.cl...@free.fr wrote in article ik64e9$j6a$1...@dough.gmane.org in gmane.comp.lang.haskell.cafe: On 24/02/2011 09:30, o...@okmij.org wrote: The sort of laziness needed for non-deterministic programming calls for first-class store. It can be emulated, albeit *imperfectly*,

Re: [Haskell-cafe] HANSEI in Haskell?

2011-02-24 Thread Chung-chieh Shan
Leon Smith leon.p.sm...@gmail.com wrote in article AANLkTikF6EX4U+uTwNcrdFZPj-ijTWb74o2W_RJMGOe=@mail.gmail.com in gmane.comp.lang.haskell.cafe: On Wed, Feb 23, 2011 at 10:52 AM, Chung-chieh Shan ccs...@cs.rutgers.edu wrote: Mostly we preferred (as do the domain experts we target) to write

Re: [Haskell-cafe] HANSEI in Haskell?

2011-02-24 Thread Chung-chieh Shan
On 2011-02-24T16:20:46-0600, Antoine Latter wrote: On Thu, Feb 24, 2011 at 12:57 PM, Chung-chieh Shan wrote: What we need is a way to tell the garbage collector that the store reference and the cell reference are both needed to access the data so the data can be garbage-collected as soon

Re: [Haskell-cafe] HANSEI in Haskell?

2011-02-23 Thread Chung-chieh Shan
Hello! Thank you for your interest. Daryoush Mehrtash dmehrt...@gmail.com wrote in haskell-cafe: Is the Embedded domain-specific language HANSEI for probabilistic models and (nested) inference described in: http://okmij.org/ftp/kakuritu/index.html#implementation available in Haskell? The

[Haskell-cafe] ACM SIGPLAN Workshop on ML

2011-02-08 Thread Chung-chieh Shan
. IMPORTANT DATES * 2011-06-17: Submission * 2011-07-22: Notification * 2011-09-18: Workshop PROGRAM COMMITTEE Amal Ahmed (Indiana University) Andrew Tolmach (Portland State University) Anil Madhavapeddy (University of Cambridge) Chung-chieh Shan (chair) (Rutgers University

Re: [Haskell-cafe] parsing exercise

2011-01-22 Thread Chung-chieh Shan
Sebastian Fischer fisc...@nii.ac.jp wrote in article AANLkTimZfqoLG5z=vsxsjltn_r5xh+ed49-ngknhn...@mail.gmail.com in gmane.comp.lang.haskell.cafe: I expect writing this function to be quite tedious (ignore commas in parens, ignore parens in strings, quotation, ...) and would prefer to copy

Re: [Haskell-cafe] Type System vs Test Driven Development

2011-01-05 Thread Chung-chieh Shan
Evan Laforge qdun...@gmail.com wrote in article aanlktinfyp-bpbs1ga8_=o9wcrhe+duux-vfrmdl2...@mail.gmail.com in gmane.comp.lang.haskell.cafe: Incidentally, I've never been able to figure out how to use QuickCheck. Maybe it has more to do with my particular app, but QuickCheck seems to expect

Re: [Haskell-cafe] Formatting function types

2010-12-30 Thread Chung-chieh Shan
Lauri Alanko l...@iki.fi wrote in article 20101230133355.gb...@melkinpaasi.cs.helsinki.fi in gmane.comp.lang.haskell.cafe: The following is much clearer: openTempFile :: FilePath - String - IO (FilePath, Handle) (Possibly with the arrows aligned.) I can't understand

[Haskell-cafe] Re: If the local variable can be changed ...

2010-03-14 Thread Chung-chieh Shan
zaxis z_a...@163.com wrote in article 27844016.p...@talk.nabble.com in gmane.comp.lang.haskell.cafe: As we know, the local variable is allocated on stack which is thread safe. It's not. http://en.wikipedia.org/wiki/Funarg_problem#Example -- Edit this signature at

[Haskell-cafe] Re: looking for a good algorithm

2009-11-11 Thread Chung-chieh Shan
Hong Yang hyang...@gmail.com wrote in article f31db34d090452x7786572ay4482dffc4824a...@mail.gmail.com in gmane.comp.lang.haskell.cafe: I want to shuffle the rows to maximize the number of columns whose first 100 rows have at least one number Sounds like the maximum coverage problem, which

[Haskell-cafe] Re: Finally tagless - stuck with implementation of?lam

2009-10-05 Thread Chung-chieh Shan
Robert Atkey bob.at...@ed.ac.uk wrote in article 1254778973.3675.42.ca...@bismuth in gmane.comp.lang.haskell.cafe: To implement the translation of embedded language types to Haskell types in Haskell we use type families. This type-to-type translation is indeed the crux of the trickiness. By

[Haskell-cafe] Re: Finally tagless - stuck with implementation?of?lam

2009-10-05 Thread Chung-chieh Shan
Don Stewart d...@galois.com wrote in article 20091006031054.gb18...@whirlpool.galois.com in gmane.comp.lang.haskell.cafe: ccshan: (Section 5 of our (JFP) paper addresses both CBN and CBV.) Do you have a link to the paper? Sorry, here it is. http://www.cs.rutgers.edu/~ccshan/tagless/jfp.pdf

[Haskell-cafe] Re: combinatorial search with running bound

2009-09-30 Thread Chung-chieh Shan
I wish I had enough of your code to type-check my code and perhaps even try running it! Michael Mossey m...@alumni.caltech.edu wrote in article 3942.75.50.175.130.1253997756.squir...@mail.alumni.caltech.edu in gmane.comp.lang.haskell.cafe: -- This is state used in the state monad. data

[Haskell-cafe] Re: combinatorial search with running bound

2009-09-28 Thread Chung-chieh Shan
Michael Mossey m...@alumni.caltech.edu wrote in article 3942.75.50.175.130.1253997756.squir...@mail.alumni.caltech.edu in gmane.comp.lang.haskell.cafe: The problem is to determine how closely the groups can be brought together without any boxes intersection. The basic algorithm is to

[Haskell-cafe] Re: Unifcation and matching in Abelian groups

2009-08-19 Thread Chung-chieh Shan
John D. Ramsdell ramsde...@gmail.com wrote in article 7687290b0908190243y70541426x3d485267c4a94...@mail.gmail.com in gmane.comp.lang.haskell.cafe: I've been studying equational unification. I decided to test my understanding of it by implementing unification and matching in Abelian groups.

[Haskell-cafe] Re: I love purity, but it's killing me.

2009-06-09 Thread Chung-chieh Shan
criterion for efficient? We certainly can get rid of all interpretive overheads by either having a tagless interpreter (as in Oleg and Shan's paper), or by direct compilation. (BTW, the paper is by Jacques Carette, Oleg Kiselyov, and Chung-chieh Shan.) But so far I don't see how a tagless

[Haskell-cafe] Re: Pike's Newsqueak talk

2009-06-06 Thread Chung-chieh Shan
Tim Newsham news...@lava.net wrote in article pine.bsi.4.64.0906051608180.14...@malasada.lava.net in gmane.comp.lang.haskell.cafe: Could it be the amb described at http://conal.net/blog/posts/functional-concurrency-with-unambiguous-choice/

Re: [Haskell-cafe] Re: I love purity, but it's killing me.

2009-06-06 Thread Chung-chieh Shan
On 2009-05-27T03:58:58-0400, Paul L wrote: One possible solution is to further introduce a fixed point data constructor, a Rec or even LetRec to explicitly capture cycles. But then you still incur much overheads interpreting them, I don't understand this criticism -- what interpretive overhead

[Haskell-cafe] Re: Pike's Newsqueak talk

2009-06-05 Thread Chung-chieh Shan
Tim Newsham news...@lava.net wrote in article pine.bsi.4.64.0906051510070.14...@malasada.lava.net in gmane.comp.lang.haskell.cafe: his language also supports an interesting imperative primitive that lets you pick the first available value from a set of channels which isn't available in pure

[Haskell-cafe] Re: mapM as a Space Leak

2009-03-26 Thread Chung-chieh Shan
Thomas Hartman tphya...@gmail.com wrote in article 910ddf450903261240p4e4fc8b3pa927fac1b80b2...@mail.gmail.com in gmane.comp.lang.haskell.cafe: Well, that's reassuring. The reason I asked is that the testp function didn't just show poor performance. The state monad implementation actually

[Haskell-cafe] Re: categories and monoids

2009-03-18 Thread Chung-chieh Shan
Wolfgang Jeltsch g9ks1...@acme.softbase.org wrote in article 200903181116.37073.g9ks1...@acme.softbase.org in gmane.comp.lang.haskell.cafe: Am Dienstag, 17. März 2009 18:43 schrieben Sie: There's no such implication in English. The standard example used by linguists is fake gun. Okay, but

[Haskell-cafe] Re: Memoizing partially evaluated computations.

2009-03-18 Thread Chung-chieh Shan
Sebastiaan Visser sfvis...@cs.uu.nl wrote in article d86a7d11-f95f-4a27-a13c-2d78afda2...@cs.uu.nl in gmane.comp.lang.haskell.cafe: Suppose I have a list of IO computations that depends on a few very time consuming pure operations. The pure operations are not dependent on the real world:

Re: [Haskell-cafe] Re: Memoizing partially evaluated computations.

2009-03-18 Thread Chung-chieh Shan
On 2009-03-18T21:24:58-0600, Luke Palmer wrote: On Wed, Mar 18, 2009 at 6:21 AM, Chung-chieh Shan ccs...@post.harvard.eduwrote: computation = [ smallIOfunc x0 , smallIOfunc x1 , smallIOfunc x2 , smallIOfunc x3 ] where smallIOfunc a = print

[Haskell-cafe] Re: ANNOUNCE: pqueue-mtl, stateful-mtl

2009-02-27 Thread Chung-chieh Shan
Ryan Ingram ryani.s...@gmail.com wrote in article 2f9b2d30902151615n1e8e25e8ubbee20d93c8ec...@mail.gmail.com in gmane.comp.lang.haskell.cafe: You can roll your own pure STT monad, at the cost of performance: Do you (or anyone else) know how to prove this STT implementation type-safe? It seems

[Haskell-cafe] Re: ANNOUNCE: pqueue-mtl, stateful-mtl

2009-02-16 Thread Chung-chieh Shan
Louis Wasserman wasserman.lo...@gmail.com wrote in article ab4284220902160801x51e6c3b6m3a7ee0698ac97...@mail.gmail.com in gmane.comp.lang.haskell.cafe: The point here is that a MonadST instance guarantees that the bottom monad is an ST -- and therefore single-threaded of necessity -- and

[Haskell-cafe] Re: Can this be done?

2009-02-12 Thread Chung-chieh Shan
wren ng thornton w...@freegeek.org wrote in article 4993bbee.9070...@freegeek.org in gmane.comp.lang.haskell.cafe: It's ugly, but one option is to just reify your continuations as an ADT, where there are constructors for each function and fields for each variable that needs closing over.

[Haskell-cafe] Re: Delimited continuations: please comment

2009-02-12 Thread Chung-chieh Shan
Cristiano Paris cristiano.pa...@gmail.com wrote in article afc62ce20902120855i77acf725p1069aab21037a...@mail.gmail.com in gmane.comp.lang.haskell.cafe: In effect, this is a bit different from the syscall service routine described by Oleg, as the scheduler function reacts in different ways for

[Haskell-cafe] Re: Different return type?

2009-01-19 Thread Chung-chieh Shan
John Ky newho...@gmail.com wrote in article bd4fcb030901181744i2b26172bv2328974ff911f...@mail.gmail.com in gmane.comp.lang.haskell.cafe: data Person = Person { name :: String, ... } data Business = Business { business_number :: Int, ...} key person = name person key business =

[Haskell-cafe] Re: Fwd: Haskell as a religion

2008-12-19 Thread Chung-chieh Shan
Henning Thielemann schlepp...@henning-thielemann.de wrote in article 494ae7a3.3000...@henning-thielemann.de in gmane.comp.lang.haskell.cafe: In C/C++ referential transparent functions code can be declared by appending a 'const' to the prototype, right? No. $ cat x.cc int f() const; int f() {

[Haskell-cafe] Re: Shared modification inside lambdas

2008-11-28 Thread Chung-chieh Shan
Andrew Hunter [EMAIL PROTECTED] wrote in article [EMAIL PROTECTED] in gmane.comp.lang.haskell.cafe: All well and good, but it seems to me that if I'm embedding the DSl, shouldn't I be able to use the host language's facilities--for example, function abstractions and applications--directly?

[Haskell-cafe] Re: Monadic bind with associated types + PHOAS?

2008-11-19 Thread Chung-chieh Shan
Ryan Ingram [EMAIL PROTECTED] wrote in article [EMAIL PROTECTED] in gmane.comp.lang.haskell.cafe: I really like the syntax for do-notation. And I really like how great Haskell is as writing embedded languages, a lot of which comes from the programmable semicolon that monadic bind gives you.

[Haskell-cafe] Re: streaming translation using monads

2008-11-19 Thread Chung-chieh Shan
Warren Harris [EMAIL PROTECTED] wrote in article [EMAIL PROTECTED] in gmane.comp.lang.haskell.cafe: However, the use of a universal type for the values would still seem to be required since there is no way to implement type-indexed values when the queries themselves are expressed as an

[Haskell-cafe] Re: [Haskell] How to get the binary respentation of?the Int/Double.

2008-10-29 Thread Chung-chieh Shan
Ryan Ingram [EMAIL PROTECTED] wrote in article [EMAIL PROTECTED] in gmane.comp.lang.haskell.cafe: Actually, this is a good question, at least as relating to floating point values. Is there a primitive to view the machine representation of floats? Not a primitive, but it can be defined:

[Haskell-cafe] Re: universal algebra support in Haskell?

2008-10-24 Thread Chung-chieh Shan
Galchin, Vasili [EMAIL PROTECTED] wrote in article [EMAIL PROTECTED] in gmane.comp.lang.haskell.cafe: Do you have any examples of say instance Lattice? http://web.cecs.pdx.edu/~mpj/pubs/lattices.html http://web.cecs.pdx.edu/~mpj/pubs/springschool.html -- Edit this signature at

[Haskell-cafe] Re: Haskell in Artificial Intelligence

2008-10-14 Thread Chung-chieh Shan
Christos Chryssochoidis [EMAIL PROTECTED] wrote in article [EMAIL PROTECTED] in gmane.comp.lang.haskell.cafe: I'm interested in doing a survey about the use of Haskell in the field of Artificial Intelligence. I searched in Google, and found in the HaskellWiki, at

[Haskell-cafe] Re: A problem with nested regions and higher-order?functions

2008-09-08 Thread Chung-chieh Shan
Mario Bla??evi?? [EMAIL PROTECTED] wrote in article [EMAIL PROTECTED] in gmane.comp.lang.haskell.cafe: I'm trying to apply the nested regions (as in Lightweight Monadic Regions by Oleg Kiselyov and Chung-chieh Shan) design pattern, if that's the proper term, in hope to gain a bit more type

[Haskell-cafe] Re: type classes

2008-07-07 Thread Chung-chieh Shan
class RingTy a b where order :: a - Integer units :: a - [b] class VectorSpaceTy a b | a - b where dimension :: a - Integer basis :: (Field c) = a - [b c] where `b' is a vector space over the field `c'. It looks like you are using the first (of two) type arguments to the RingTy

[Haskell-cafe] Re: A Monad for on-demand file generation?

2008-07-07 Thread Chung-chieh Shan
Joachim Breitner [EMAIL PROTECTED] wrote in article [EMAIL PROTECTED] in gmane.comp.lang.haskell.cafe: Am Montag, den 30.06.2008, 07:08 -0500 schrieb Derek Elkins: You may want to look at Magnus Carlsson's Monads for Incremental Computing http://citeseer.comp.nus.edu.sg/619122.html not

[Haskell-cafe] Re: Monad for HOAS?

2008-05-14 Thread Chung-chieh Shan
Conal Elliott [EMAIL PROTECTED] wrote in article [EMAIL PROTECTED] in gmane.comp.lang.haskell.cafe: I share your perspective, Edsko. If foo and (Let foo id) are indistinguishable to clients of your module and are equal with respect to your intended semantics of Exp, then I'd say at least this

[Haskell-cafe] Re: GADT rhymes with cat

2008-03-19 Thread Chung-chieh Shan
[EMAIL PROTECTED] wrote in article [EMAIL PROTECTED] in gmane.comp.lang.haskell.cafe: Quoting Jeremy Apthorp [EMAIL PROTECTED]: Clearly, this pronounciation is gay dee tea. I always new those types were a bit queer. Not that there's anything wrong with that. ... If it type-checks, it must

[Haskell-cafe] Re: Haskell w/ delimited continuations

2008-02-23 Thread Chung-chieh Shan
Taral [EMAIL PROTECTED] wrote in article [EMAIL PROTECTED] in gmane.comp.lang.haskell.cafe: On Sat, Feb 23, 2008 at 1:05 AM, [EMAIL PROTECTED] wrote: reset ((\x - x + x) (shift f f)) This one doesn't typecheck, since you can't unify the types (a - r) and r. Some type systems for

[Haskell-cafe] Re: Designing DSL with explicit sharing [was: I love?purity, but it's killing me]

2008-02-17 Thread Chung-chieh Shan
Matthew Naylor [EMAIL PROTECTED] wrote in article [EMAIL PROTECTED] in gmane.comp.lang.haskell.cafe: sklansky f [] = [] sklansky f [x] = [x] sklansky f xs = left' ++ [ f (last left') r | r - right' ] where (left, right) = splitAt (length xs `div` 2) xs left' = sklansky f

[Haskell-cafe] Re: I love purity, but it's killing me.

2008-02-13 Thread Chung-chieh Shan
Henning Thielemann [EMAIL PROTECTED] wrote in article [EMAIL PROTECTED] in gmane.comp.lang.haskell.cafe: It seems to become a FAQ. I think all DSLs suffer from the same problems: sharing and recursion. I've used wrappers for CSound, SuperCollider, MetaPost, they all have these problems. What

[Haskell-cafe] Re: anybody can tell me the pronuncation of?haskell?

2008-01-29 Thread Chung-chieh Shan
[EMAIL PROTECTED] wrote in article [EMAIL PROTECTED] in gmane.comp.lang.haskell.cafe: Arigato gozaimasu. Jerzy Karczmarczuk. PS. If you think that arigato is a genuine Japanese word, well, check how the appropriately translated word is spelled in Portuguese... I'm not sure what you

[Haskell-cafe] Re: Hamming's Problem

2008-01-18 Thread Chung-chieh Shan
Calvin Smith [EMAIL PROTECTED] wrote: The author of Pugs (Perl6 implemented in Haskell) gives a nice solution to the problem of generating the Hamming numbers in the following interview: http://www.perl.com/pub/a/2005/09/08/autrijus-tang.html?page=last Dougal Stanton [EMAIL PROTECTED] wrote:

[Haskell-cafe] Re: re: generics and grammars

2007-12-13 Thread Chung-chieh Shan
Greg Meredith [EMAIL PROTECTED] wrote in article [EMAIL PROTECTED] in gmane.comp.lang.haskell.cafe: Thanks for the references! Have two-level types been applied to parser generation? Hrm, I'm not sure what kind of application you have in mind, so I suppose the answer is that I'm not aware of

[Haskell-cafe] Re: grammars and generics

2007-12-11 Thread Chung-chieh Shan
Greg Meredith [EMAIL PROTECTED] wrote in article [EMAIL PROTECTED] in gmane.comp.lang.haskell.cafe: Here is an idea so obvious that someone else must have already thought of it and worked it all out. Consider the following grammar. Hello! If I understand your basic idea correctly, it is to

[Haskell-cafe] Whither memo and hash-consing?

2007-11-11 Thread Chung-chieh Shan
Hello, What is the current status of the Memo module, for memoizing functions? It seems to have disappeared from the standard Hugs/GHC distributions; are we supposed to just find the old code on Google which uses System.Mem.Weak? A related question is whether anyone has built a library for

[Haskell-cafe] Re: On the verge of ... giving up!

2007-10-14 Thread Chung-chieh Shan
[EMAIL PROTECTED] wrote in article [EMAIL PROTECTED] in gmane.comp.lang.haskell.cafe: That's not my experience. I didn't really understand Kalman filters until I read the Wikipedia page. It's better than most of the tutorials out there. While we're off topic, here's a nice introduction to

[Haskell-cafe] Re: Fast Paced Haskell Tutorial

2007-10-11 Thread Chung-chieh Shan
Paulo J. Matos [EMAIL PROTECTED] wrote in article [EMAIL PROTECTED] in gmane.comp.lang.haskell.cafe: I'm interested in a freely available fast paced haskell tutorial. By fast paced, I means I want something that goes through basic in a very fast pace, presents a couple of examples and then

[Haskell-cafe] Re: Typeclasses and implicit parameters

2007-09-06 Thread Chung-chieh Shan
[EMAIL PROTECTED] wrote in article [EMAIL PROTECTED] in gmane.comp.lang.haskell.cafe: That higher-rank type makes all the difference. Yes. You can even do this portably, using nothing unsafe, with Dylan Thurston's technique: Oleg Kiselyov and Chung-chieh Shan. 2004. Functional pearl: Implicit

[Haskell-cafe] Re: zip3, zip4 ... - zipn?

2007-08-11 Thread Chung-chieh Shan
Frank Buss [EMAIL PROTECTED] wrote in article [EMAIL PROTECTED] in gmane.comp.lang.haskell.cafe: Is it possible to write a function like this: zipn n list_1 list_2 list_3 ... list_n which implements zip3 for n=3, zip4 for n=4 etc.? Looks like variable number of arguments are possible,

[Haskell-cafe] Re: Zippers, Random Numbers Terrain

2007-08-01 Thread Chung-chieh Shan
Thomas Conway [EMAIL PROTECTED] wrote in article [EMAIL PROTECTED] in gmane.comp.lang.haskell.cafe: On 8/2/07, apfelmus [EMAIL PROTECTED] wrote: That concludes the infinite terrain generation for one dimension. For higher dimension, one just needs to use 2D objects instead of intervals to

[Haskell-cafe] Re: advantages of using fix to define rcursive functions

2007-07-26 Thread Chung-chieh Shan
Harald ROTTER [EMAIL PROTECTED] wrote in article [EMAIL PROTECTED] in gmane.comp.lang.haskell.cafe: I read about the usage of fix to define recursive functions. Although I think that I understood how to use fix, I still wonder what the advantages of fix are (as compared to the conventional

[Haskell-cafe] Re: xkcd #287 NP-Complete

2007-07-15 Thread Chung-chieh Shan
Tom Pledger [EMAIL PROTECTED] wrote in article [EMAIL PROTECTED] in gmane.comp.lang.haskell.cafe: We've seen some nice concise solutions that can deal with the original problem: solve 1505 [215, 275, 335, 355, 420, 580] I'll be a nuisance and bring up this case: solve 150005 [2,

[Haskell-cafe] Re: Newbie question about tuples

2007-07-13 Thread Chung-chieh Shan
peterv [EMAIL PROTECTED] wrote in article [EMAIL PROTECTED] in gmane.comp.lang.haskell.cafe: I don't think Haskell has something like a fixed-length array or constant expressions that *must* be resolved at compile-time (like the N in the C++ template)? Or like Digital Mars D's static if

[Haskell-cafe] Re: Lightweight sequent calculus and linear abstractions

2007-07-05 Thread Chung-chieh Shan
[EMAIL PROTECTED] wrote in article [EMAIL PROTECTED] in gmane.comp.lang.haskell.cafe: Conor McBride has posed an interesting problem: implement constructors P v for embedding pure values v Ofor holes f :$ a for application, left-associative and an

[Haskell-cafe] Re: Mathematica

2007-05-13 Thread Chung-chieh Shan
Andrew Coppin [EMAIL PROTECTED] wrote in article [EMAIL PROTECTED] in gmane.comp.lang.haskell.cafe: The absurdly efficient number crunching is obviously not implementable in Haskell - or indeed virtually any language except assembly. [...] The pretty user interface is obviously not

[Haskell-cafe] Re: flip fix and iterate

2007-03-19 Thread Chung-chieh Shan
Bryan Burgers [EMAIL PROTECTED] wrote in article [EMAIL PROTECTED] in gmane.comp.lang.haskell.cafe: On the topic of 'fix', is there any good tutorial for fix? I searched google, but mostly came up with pages including things like 'bug fix'. It's hard for me to get an intuition about it when

[Haskell-cafe] Re: A different Maybe maybe

2007-03-07 Thread Chung-chieh Shan
Joachim Breitner [EMAIL PROTECTED] wrote in article [EMAIL PROTECTED] in gmane.comp.lang.haskell.cafe: [Also on http://www.joachim-breitner.de/blog/archives/229-A-different-Maybe-maybe.html] This is known as the Church encoding of algebraic data types. In this generality, it seems to be

[Haskell-cafe] Re: How did you stumble on Haskell?

2007-01-29 Thread Chung-chieh Shan
Bob Davison [EMAIL PROTECTED] wrote in article [EMAIL PROTECTED] in gmane.comp.lang.haskell.cafe: This leads me off thread to ask if anyone could recommend reading for someone who has done mathematics to college level, but nearly 30 years ago when many English schools didn't cover 20th

[Haskell-cafe] Re: Higher kinds (and impredicativity?)

2007-01-15 Thread Chung-chieh Shan
Jim Apple [EMAIL PROTECTED] wrote in article [EMAIL PROTECTED] in gmane.comp.lang.haskell.cafe: C, x : k1 |- y : * --- C |- (\forall x : k1 . y) : * I'd expect C, x : k1 |- y : k2 --- C |- (\forall x : k1 . y) : k2 Is there a foundational or

[Haskell-cafe] Re: Higher kinds (and impredicativity?)

2007-01-15 Thread Chung-chieh Shan
Jim Apple [EMAIL PROTECTED] wrote in article [EMAIL PROTECTED] in gmane.comp.lang.haskell.cafe: (forall (f :: * - *) . f) Int. What values inhabit this type? The same ones that inhabit (forall (f :: * - *) . f Int); that is, none (or _|_). I don't see the uninhabitability of a type as

[Haskell-cafe] Re: rebinding = for restricted monads

2006-12-17 Thread Chung-chieh Shan
David Roundy [EMAIL PROTECTED] wrote in article [EMAIL PROTECTED] in gmane.comp.lang.haskell.cafe: class WitnessMonad wm where (=) :: wm w w' a - (a - wm w' w'' b) - wm w w'' b () :: wm w w' a - wm w' w'' b - wm w w'' b return :: a - wm w w' a fail :: String - wm w w' a I

[Haskell-cafe] Re: automonadization of code?

2006-12-16 Thread Chung-chieh Shan
Adam Megacz [EMAIL PROTECTED] wrote in article [EMAIL PROTECTED] in gmane.comp.lang.haskell.cafe: Is there any work on automatic translation of code in some tiny imperative language into Haskell code that uses the ST and/or IO monads (or perhaps even pure functional code)? Is it possible to

[Haskell-cafe] Re: what GUI library should i select?

2006-11-14 Thread Chung-chieh Shan
Simon Peyton-Jones [EMAIL PROTECTED] wrote in article [EMAIL PROTECTED] in gmane.comp.lang.haskell.cafe: I wonder whether it'd be possible to make the gtk2hs stuff emit warnings if you make calls from two different threads? Then an application would complain constructively rather than

[Haskell-cafe] Re: A type class puzzle

2006-11-12 Thread Chung-chieh Shan
Yitzchak Gale [EMAIL PROTECTED] wrote in article [EMAIL PROTECTED] in gmane.comp.lang.haskell.cafe: replace0 :: a - a - a replace1 :: Int - a - [a] - [a] replace2 :: Int - Int - a - [[a]] - [[a]] This message is joint work with Oleg Kiselyov. All errors are mine. Part of what makes this

[Haskell-cafe] Re: darcs: the first haskell tool more popular than?Haskell itself?

2006-01-24 Thread Chung-chieh Shan
Josh Hoyt [EMAIL PROTECTED] wrote in article [EMAIL PROTECTED] in gmane.comp.lang.haskell.cafe: On 1/24/06, Jared Updike [EMAIL PROTECTED] wrote: What happened to Avoid success at all costs? http://research.microsoft.com/Users/simonpj/papers/haskell-retrospective/ I was unaware of that

[Haskell-cafe] Re: Announcing Djinn, new version 2004-12-13

2005-12-14 Thread Chung-chieh Shan
Lennart Augustsson [EMAIL PROTECTED] wrote in article [EMAIL PROTECTED] in gmane.comp.lang.haskell.general: There is a new version of Djinn available, with two notable new features: Haskell data types can be defined and the found functions are sorted (heuristically) to present the best one

[Haskell-cafe] Re: ReaderT and concurrency

2005-11-17 Thread Chung-chieh Shan
In http://www.eecs.harvard.edu/~ccshan/prepose/prepose.pdf Oleg and I survey the approaches that others have mentioned and propose a new technique that is particularly relevant in concurrent programs. Ken -- Edit this signature at http://www.digitas.harvard.edu/cgi-bin/ken/sig If

[Haskell-cafe] Re: Category theory monad ---- Haskell monad

2005-08-22 Thread Chung-chieh Shan
Michael Vanier [EMAIL PROTECTED] wrote in article [EMAIL PROTECTED] in gmane.comp.lang.haskell.cafe: Basically, though, the Haskell implementation _is_ the category theoretic definition of monad, with bind/return used instead of (f)map/join/return as described below. Doesn't the Haskell

[Haskell-cafe] Re: Annotating calculations

2005-06-15 Thread Chung-chieh Shan
Rene de Visser [EMAIL PROTECTED] wrote in article [EMAIL PROTECTED] in gmane.comp.lang.haskell.cafe: I have a somewhat complicated calculation programmed in Haskell. This calculation is coded without using monads. I want to also produce a report describing the details of this calculation

[Haskell-cafe] Re: mathematical notation and functional programming

2005-01-31 Thread Chung-chieh Shan
(Is Lemming the same person as Henning Thielemann?) On 2005-01-30T21:24:24+0100, Lemming wrote: Chung-chieh Shan wrote: Wait a minute -- would you also say that 1+x has no meaning at the first glance, because x is a variable whereas 1 is an integer, so some lifting is called for? For me

[Haskell-cafe] Re: mathematical notation and functional programming

2005-01-28 Thread Chung-chieh Shan
Henning Thielemann [EMAIL PROTECTED] wrote in article [EMAIL PROTECTED] in gmane.comp.lang.haskell.cafe: Over the past years I became more and more aware that common mathematical notation is full of inaccuracies, abuses and stupidity. I wonder if mathematical notation is subject of a

[Haskell-cafe] Re: mathematical notation and functional programming

2005-01-28 Thread Chung-chieh Shan
On 2005-01-28T20:16:59+0100, Henning Thielemann wrote: On Fri, 28 Jan 2005, Chung-chieh Shan wrote: But I would hesitate with some of your examples, because they may simply illustrate that mathematical notation is a language with side effects -- see the third and fifth examples below. I

Re: [Haskell-cafe] Partially-applied type synonyms?

2004-08-31 Thread Chung-chieh Shan
On 2004-08-31T09:55:10-0700, Lyle Kopnicky wrote: Sorry, I don't think I made myself clear. I'm not defining PI, it's the standard type binding operator, like lambda is the variable binding operator. Maybe I could write it as 'II' so it looks more like a capital pi. It's not a feature of

Re: [Haskell-cafe] Partially-applied type synonyms?

2004-08-30 Thread Chung-chieh Shan
On 2004-08-30T17:09:39-0700, Lyle Kopnicky wrote: Unfortunately, I need 'PI r - ContT r m', along with a and r, to be a member of the MonadPCont class (PI is the type binding operator). So I thought I'd define ContT' to take the arguments the other way around. Unfortunately, it can't be

Re: [Haskell-cafe] state in the continuation monad...

2004-07-09 Thread Chung-chieh Shan
On 2004-07-02T16:15:15+0200, Ralf Laemmel wrote: I wonder whether perhaps a more basic step is to understand how type-changing monadic computations can be understood. By this I mean, that the effects model by the monad can change their type as part of the computation. Such a monad would be

Re: [Haskell-cafe] Re: Is it possible to read existential types?

2004-04-29 Thread Chung-chieh Shan
On 2004-04-28T15:12:03-0400, S. Alexander Jacobson wrote: Ok, but it sounds like you need to know the list of possible types in advance. Is it possible to have a lib take a filepath and type name as an arbitrary string, and read the instance in? I don't think you need to know the list of

Re: [Haskell-cafe] Re: Is it possible to read existential types?

2004-04-29 Thread Chung-chieh Shan
On 2004-04-28T23:33:31-0400, S. Alexander Jacobson wrote: I don't think this works. I just tried it with: main = print $ lookupRead 1 [(1,(Integer,100))] This fails for the same reason print $ read 100 fails. You need to give a type signature to avoid type-class instance ambiguity:

Re: [Haskell-cafe] Re: Is it possible to read existential types?

2004-04-29 Thread Chung-chieh Shan
On 2004-04-29T11:50:48-0400, S. Alexander Jacobson wrote: But isn't the point of this code that you don't need that type signature? If I knew in advance that it was an Integer then I wouldn't need to passs Integer in the list. In the context in which the code was originally written, the

[Haskell-cafe] Re: Is it possible to read existential types?

2004-04-26 Thread Chung-chieh Shan
S. Alexander Jacobson [EMAIL PROTECTED] wrote in article [EMAIL PROTECTED] in gmane.comp.lang.haskell.cafe: Is is possible to read/show an existentially typed list? Would it be possible if, instead of using read/show, I defined some variant that relies on the typeof/typeable