Re: [Haskell-cafe] Implementation of Functional Languages - a tutorial

2010-03-31 Thread minh thu
2010/3/31 C K Kashyap ckkash...@gmail.com: Hi Everybody, I've started reading SPJ's book - When I tried to execute some sample code in miranda, I found that Miranda does not seem to recognize things like import Utils or module Langauge where ... Has someone created a clean compilable

Re: [Haskell-cafe] Problem about pattern matching.

2010-04-28 Thread minh thu
2010/4/28 Magicloud Magiclouds magicloud.magiclo...@gmail.com: Hi, I have code as below. How come case version works wrong and gives me overlap compiling warning? Thanks.  if dayOfMonth == firstDayOfMonth    then v day (x, y)    else if dayOfMonth == lastDayOfMonth      then not_ $ v day (x,

Re: [Haskell-cafe] Haskell Weekly News?

2010-04-28 Thread minh thu
2010/4/28 Ivan Lazar Miljenovic ivan.miljeno...@gmail.com: Joe Fredette jfred...@gmail.com writes: That said, if any of you have time machines/time dilation devices in the works, I'm happy to beta test. Don't be silly, you don't need more time, you need more _you_ (i.e. clones); after all,

Re: [Haskell-cafe] Haskell Weekly News?

2010-04-28 Thread minh thu
2010/4/28 Ivan Lazar Miljenovic ivan.miljeno...@gmail.com: minh thu not...@gmail.com writes: 2010/4/28 Ivan Lazar Miljenovic ivan.miljeno...@gmail.com: Joe Fredette jfred...@gmail.com writes: That said, if any of you have time machines/time dilation devices in the works, I'm happy to beta

Re: [Haskell-cafe] Problem about pattern matching.

2010-04-29 Thread minh thu
. The problem here is, ghc warned me that _ and lastDayOfMonth was overlapped. And the results showed that, everything that should be worked with Mider was done by not_ On Thu, Apr 29, 2010 at 1:51 AM, Henning Thielemann schlepp...@henning-thielemann.de wrote: minh thu schrieb: 2010/4/28

Re: [Haskell-cafe] Haskell and scripting

2010-05-03 Thread minh thu
Hi, You can take the xmonad approach: the configuration file is written in Haskell and compiled, so no need for another language. Cheers, Thu 2010/5/3 Martin Erwig er...@eecs.oregonstate.edu: One of my students has worked on scripting approach in Haskell:        

Re: [Haskell-cafe] Haskell and scripting

2010-05-04 Thread minh thu
2010/5/4 Limestraël limestr...@gmail.com: ... Minh, Kyle, Gwern, the dyre approach seems to be very interesting too. But if I understood well, we also have to recompile at run-time the configuration haskell script? So the final application (Yi, for instance) will need GHC to be installed to

[Haskell-cafe] what do you think of haskell ? (yes, it's a bit general ...:)

2006-06-15 Thread minh thu
as expected and you dont have to learn (in a academic paper) how to use an array or how to do io. :) please don't tell me you're stupid, go back to your c and leave this glorious mailing list did you had the same feeling ? does it disappear ? how ? thanks a lot, vo minh thu

Re: [Haskell-cafe] what do you think of haskell ? (yes, it's a bit general ...:)

2006-06-15 Thread minh thu
hi, thanks for your answer. the kind of thing i want to do : computer graphics programming. so array is better than list (no ?) to represent images ... bye vo minh thu (hey, my last name is VO, and my first name is Thu, not Minh :) 2006/6/15, Neil Mitchell [EMAIL PROTECTED]: Hi Minh, When I

Re: [Haskell-cafe] what do you think of haskell ? (yes, it's a bit general ...:)

2006-06-15 Thread minh thu
right :) i had to say a discrete image ... or a raster, or an *array* of pixels ! sylvan, it must be nice to talk with you (an funny) about haskell and cg :) mt 2006/6/15, Sebastian Sylvan [EMAIL PROTECTED]: On 6/15/06, minh thu [EMAIL PROTECTED] wrote: hi, thanks for your answer. the kind

Re: [Haskell-cafe] what do you think of haskell ? (yes, it's a bit general ...:)

2006-06-15 Thread minh thu
) that libraries just to do io. cheers, mt 2006/6/15, Henning Thielemann [EMAIL PROTECTED]: On Thu, 15 Jun 2006, minh thu wrote: * randomIO side-effect is nicely resolved with monad. and you have to thread your state. if you're writing your monad or use a transformer, things are quite explicitly (even

Re: [Haskell-cafe] what do you think of haskell ? (yes, it's a bit general ...:)

2006-06-16 Thread minh thu
thanks, brian, udo and the others for your answers [...] I'm led to believe that you just haven't got the hang of the things that just aren't there in C, such as Monads and higher order functions. So you cannot yet see what you would miss in C. (And I guess, you're not feeling at home in C++

Re: Re[2]: [Haskell-cafe] what do you think of haskell ? (yes, it's a bit general ...:)

2006-06-16 Thread minh thu
[...] import Data.AltBinary main = putWord32 stdout (1::Int) Bulatmailto:[EMAIL PROTECTED] well, you're right, i've a bit to overemphased the learning difficulty.. but, last time i tried to use your lib, i missed some other libraries (win32 for one ? .. i dont

Re: Re[2]: [Haskell-cafe] what do you think of haskell ? (yes, it's a bit general ...:)

2006-06-16 Thread minh thu
Thu, haskell/ghc is definitely not for fast execution really, i was not seeking time performance. i try to have a nice to read kind of prototype. but the fact that the program doesn't work with quite small test (but already too big for it) is a problem. Best regards, Bulat

Re: [Haskell-cafe] putStrLn

2006-06-16 Thread minh thu
you already know how to write * one ... so you just have to know how to do it the neded amount : two ways : 1/ you repeat the function 2/ you reapet the data one which the function is applied. this is like 2/ 2006/6/16, J. Garrett Morris [EMAIL PROTECTED]: main n = putStrLn

Re: [Haskell-cafe] ACross

2006-06-20 Thread minh thu
to produce and 'n' ? and what's the relationship between line number i and 'n' ? bye, vo minh thu ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Newbie question on iterating over IO list

2006-06-20 Thread minh thu
2006/6/20, Taro Ikai [EMAIL PROTECTED]: Sebastian, Thanks for your help. I learned two things: o show is not an action, but a function. Using it in the interactive mode of GHCI was making me confused. hi, in ghci, if I want to see the result of an IO action, I do this ghci x - myIOAction

Re: [Haskell-cafe] ... processing of large raster images : CLEAN

2006-06-21 Thread minh thu
hi Bulat, shortly : with GPL you have to make your code GPL if it uses GPLed code. with LGPL you dont have to make your code LGPL/GPL if it only links against LGPLed library. regards, mt 2006/6/21, Bulat Ziganshin [EMAIL PROTECTED]: Hello Jerzy, Wednesday, June 21, 2006, 4:32:40 PM, you

Re: [Haskell-cafe] Functional progr., images, laziness and all the rest

2006-06-22 Thread minh thu
way as languages as esterel) (i.e. depending of IO)? Paul Hudak uses a Channel in his book Haskell SOE .. but is there another way ? thanks, vo minh thu ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell

Re: [Haskell-cafe] Re: Functional programming for processing oflargeraster images

2006-06-22 Thread minh thu
to be. Coudn't you predict it (both in terms of the programmers and compiler writers) ? thanks, vo minh thu ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] user type declarations in Haskell

2006-06-22 Thread minh thu
: it will give you the type of (+). try to type also ':t a1'. hope it helps, vo minh thu ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Functional progr., images, laziness and all therest

2006-06-22 Thread minh thu
2006/6/22, Brian Hulley [EMAIL PROTECTED]: Jerzy Karczmarczuk wrote: Brian Hulley wrote: [snip] y IS NOT a longer list than yq, since co-recursive equations without limiting cases, apply only to *infinite* streams. Obviously, the consumer of such a stream will generate a finite segment

Re: [Haskell-cafe] Functional progr., images, laziness and all therest

2006-06-22 Thread minh thu
2006/6/22, Brian Hulley [EMAIL PROTECTED]: minh thu wrote: 2006/6/22, Brian Hulley [EMAIL PROTECTED]: Jerzy Karczmarczuk wrote: Brian Hulley wrote: [snip] y IS NOT a longer list than yq, since co-recursive equations without limiting cases, apply only to *infinite* streams. Obviously

Re: [Haskell-cafe] Polymorphic type

2006-06-22 Thread minh thu
2006/6/22, Sara Kenedy [EMAIL PROTECTED]: Hello all, Now I am trying with the function of polymorphic type: This function returns the Nth element of list with type a. I try it as below. getNthElem :: Int - [a] - Maybe a getNthElemt _ []= Nothing getNthElem 0 _ = Nothing getNthElem n s

Re: [Haskell-cafe] Functional programming for processing of large raster images

2006-06-23 Thread minh thu
2006/6/23, [EMAIL PROTECTED] [EMAIL PROTECTED]: G'day all. hey, Quoting [EMAIL PROTECTED]: Recently Vo Minh Thu wondered if Haskell (or, I generalize, functional programming) can be of much use for computer graphics programming. As others have pointed out, it's Haskell (and its laziness

[Haskell-cafe] how to write an haskell binding

2006-06-26 Thread minh thu
hi, hopefully (well, i liked the discussions) this message will not spawn so much messages :) i'd like to know if there exist some general guidelines/information about writing an haskell (or is it *a* haskell ?) binding for a c or a c++ library. i worry about : * implementation tools : use

Re: Re[2]: [Haskell-cafe] how to write an haskell binding

2006-06-27 Thread minh thu
Brian, Bulat, thank you, thu ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: Re[2]: [Haskell-cafe] how to write an haskell binding

2006-06-27 Thread minh thu
Brian, mmm, no you wasn't missing the point : actually, i asked if we bind against c or c++. But that way, you answer the general guidelines part of the question. thx thu 2006/6/27, minh thu [EMAIL PROTECTED]: Brian, Bulat, thank you, thu

Re: [Haskell-cafe] Re: how to write an haskell binding

2006-06-28 Thread minh thu
old mehopefully (well, i liked the discussions) this message will not spawn old meso much messages :) Still everyone will be pleased to know that I won't post any more about this subject now that the third true silent 'h' has been found :-) Best regards, Brian. my apologies ;) thu

Re: [Haskell-cafe] Apache HTTP Server And Haskell

2006-07-31 Thread minh thu
2006/7/31, Kaveh Shahbazian [EMAIL PROTECTED]: Thanks, But it seems to be dead! (Last news on 18 Apr 2002). Is there a more mature one? it seems the answer (to which you say thanks) was not posted on the mailing list... what was it ? mt ___

[Haskell-cafe] Re : Tutorial: Writing a Lisp Interpreter In Haskell

2006-10-31 Thread minh thu
Thanks for pointing it ! (There's also this one: http://halogen.note.amherst.edu/~jdtang/scheme_in_48/tutorial/overview.html which is featured on the Tools and Libraries/Compilers and Interpreters page of the haskell wiki) bye, minh thu 2006/10/31, Donald Bruce Stewart [EMAIL PROTECTED

[Haskell-cafe] Re : Defining Cg, HLSL style vectors in Haskell

2006-11-28 Thread minh thu
2006/11/28, Slavomir Kaslev [EMAIL PROTECTED]: Hello, I have to define a couple of float2, float3, float4 Cg, HLSL style vectors in Haskell. At first I was tempted to make them instances of Num, Floating, RealFrac, etc. but some of the functions defined in those classes have no sense for

[Haskell-cafe] Re : Defining Cg, HLSL style vectors in Haskell

2006-11-29 Thread minh thu
[snip] If you're doing matrix transformations, you might also like to consider using separate PositionN and DirectionN types instead of VecN to make use of the type system to catch some math bugs but I haven't looked into this myself yet so I don't know whether this would be practical or not.

Re: [Haskell-cafe] Mozart versus Beethoven (was: Writing Haskell For Dummies ...)

2006-12-13 Thread minh thu
but, imo, not in the same way line of code can do. Programming is complex, you have to layer code on codeon code. Music is quite 'direct', you hear it without thinking. Bye, minh thu ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re : [Haskell-cafe] Aim Of Haskell

2006-12-15 Thread minh thu
Hi, I don't answer specific previous line of mail but just give my opinion :) As with any non-mainstream or young language, there's some kind of lack of libraries/tools/whatever. With the arrival of Java, people get used to have scores of libraries which are 'right there', just 'part' of the

Re : Re[2]: A suggestion for the next high profile Haskell project [Was: Re: [Haskell-cafe] What is a hacker?]

2006-12-19 Thread minh thu
being a battle ground ;-) Cia, minh thu 2006/12/19, Bulat Ziganshin [EMAIL PROTECTED]: Hello Tomasz, Tuesday, December 19, 2006, 3:24:36 PM, you wrote: in me :-). My statements are not contradictory: Some of the programs I was talking about were throw-away programs, for one use, and I would

Re : [Haskell-cafe] Re: A suggestion for the next high profile Haskell project [Was: Re: What is a hacker?]

2006-12-19 Thread minh thu
, it waits until another thread binds it. But the equational reasoning (referential transparency) remains (and the evaluation is eager by default). Cheers minh thu ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo

Re : Re : [Haskell-cafe] Re: A suggestion for the next high profile Haskell project [Was: Re: What is a hacker?]

2006-12-19 Thread minh thu
2006/12/19, Neil Mitchell [EMAIL PROTECTED]: Hi minh thu, Lazy semantics - equational reasoning ? I thought that : lack of mutable state - equational reasoning. For instance, I think to data flow variable in Oz (whcih I really don't know much / never used) : if a (Oz managed) thread attemps

Re : Re : Re : [Haskell-cafe] Re: A suggestion for the next high profile Haskell project [Was: Re: What is a hacker?]

2006-12-19 Thread minh thu
2006/12/19, Brandon S. Allbery KF8NH [EMAIL PROTECTED]: On Dec 19, 2006, at 16:03 , minh thu wrote: 2006/12/19, Neil Mitchell [EMAIL PROTECTED]: not_term = non_term f x = 12 Now evaluating: main = f non_term In a lazy language the value is always 12, in a strict language its always

Re : [Haskell-cafe] Literate Haskell source files. How do I turn them into something I can read?

2007-01-07 Thread minh thu
snip interactive mode. Here's some sample output: =8= This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4) entering extended mode (./CgCon.lhs LaTeX2e 2003/12/01 Babel v3.8d and hyphenation patterns for american, french, german, ngerman, b ahasa, basque, bulgarian, catalan,

Re: [Haskell-cafe] mapTuple

2007-01-11 Thread minh thu
lists : in your case, it's heterogeneous typle. There's a page lying on the wiki I think... It involves typeclasses and type quantifiers. Ciao, minh thu ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo

Re: [Haskell-cafe] mapTuple

2007-01-11 Thread minh thu
2007/1/11, Marco Túlio Gontijo e Silva [EMAIL PROTECTED]: Em Qui, 2007-01-11 às 16:14 +0100, minh thu escreveu: you might want invistigate heterogeneous lists : in your case, it's heterogeneous typle. But aren't tuples always heterogeneous? You're right but the fact you apply a function

Re: [Haskell-cafe] OT: any haskell-friendly / functional programming friendly comp sci programs? (for a 30s guy who did his undergrad in liberal arts)

2007-02-05 Thread minh thu
2007/2/5, Thomas Hartman [EMAIL PROTECTED]: haskellers, I'm contemplating returning to school after a decade as a worker bee, and almost that long as a worker bee doing computer consulting / miscelaneous tech stuff. Ideally I'd like to get a masters, but I don't know if that's feasible this

[Haskell-cafe] help understanding pj-lester-book

2008-04-12 Thread minh thu
Hi! I don't understand something in there : pj-lester-book : Implementing functional languages: a tutorial by Simon Peyton Jones and David Lester, available at http://research.microsoft.com/~simonpj/Papers/pj-lester-book/ eval/apply : Making a Fast Curry: Push/Enter vs. Eval/Apply for

Re : [Haskell-cafe] I am new to haskell

2008-05-08 Thread minh thu
Hi, Personnaly, I started to learn Haskell with A Gentle Introduction and (from what I recall) really enjoyed it. I find The Haskell School of Expression a bit problematic because it interleaves information about the language with (although nice) large running-through-all-the-chapter examples.

Re: [Haskell-cafe] Market Place for Haskell development teams?

2009-10-02 Thread minh thu
2009/10/2 John A. De Goes j...@n-brain.net: On Oct 1, 2009, at 12:13 AM, Curt Sampson wrote: And as far as something like dealing with a changing language and libraries, the mainstream already has well-established and popular techniques for doing just: agile development. A project manager's

Re: [Haskell-cafe] What *is* a DSL?

2009-10-07 Thread minh thu
Hi, Some random observation: A (E)DSL and an API fall on the same plane when they just expose functionality of a library. The difference between EDSL and a DSL is really just the E which means embedded into a host language so the embedded language can be built on top of some existing machinery,

Re: [Haskell-cafe] Re: What *is* a DSL?

2009-10-07 Thread minh thu
2009/10/7 Ben Franksen ben.frank...@online.de: minh thu wrote: 2009/10/7 Günther Schmidt gue.schm...@web.de: I've informally argued that a true DSL -- separate from a good API -- should have semantic characteristics of a language: binding forms, control structures, abstraction, composition

Re: [Haskell-cafe] New to Haskell - List Comprehension Question

2009-10-07 Thread minh thu
2009/10/7 Steven1990 stevenyoung1...@msn.com: Hi, I'm currently learning Haskell, and I've been trying to work out a function for the following problem for a couple of days now. I want to use a list comprehension method to change the first letter of a string to upper case, and the rest of

[Haskell-cafe] type inference question

2009-10-08 Thread minh thu
Hi, I'd like to know what are the typing rules used in Haskell (98 is ok). Specifically, I'd like to know what makes let i = \x - x in (i True, i 1) legal, and not let a = 1 in (a + (1 :: Int), a + (1.0 :: Float)) Is it correct that polymorphic functions can be used polymorphically (in

Re: [Haskell-cafe] type inference question

2009-10-08 Thread minh thu
2009/10/8 Jochem Berndsen joc...@functor.nl: minh thu wrote: Also, I'd like to know why id id True is permitted but not (\f - f f True) id If you want to do this, answer the question what is the type of (\f - f f True)? You can do this, by the way, using rank-2 types: {-# LANGUAGE

Re: [Haskell-cafe] type inference question

2009-10-08 Thread minh thu
: On Thu, Oct 8, 2009 at 11:04 AM, minh thu not...@gmail.com wrote: Hi, I'd like to know what are the typing rules used in Haskell (98 is ok). Specifically, I'd like to know what makes let i = \x - x in (i True, i 1) legal, and not let a = 1 in (a + (1 :: Int), a + (1.0 :: Float

Re: [Haskell-cafe] type inference question

2009-10-08 Thread minh thu
2009/10/8 Cristiano Paris fr...@theshire.org: On Thu, Oct 8, 2009 at 12:48 PM, Lennart Augustsson lenn...@augustsson.net wrote: The reason a gets a single type is the monomorphism restriction (read the report). Using NoMonomorphismRestriction your example with a works fine. Could you

Re: [Haskell-cafe] type inference question

2009-10-09 Thread minh thu
2009/10/9 wren ng thornton w...@freegeek.org: Cristiano Paris wrote: On Thu, Oct 8, 2009 at 12:48 PM, Lennart Augustsson wrote: The reason a gets a single type is the monomorphism restriction (read the report). Using NoMonomorphismRestriction your example with a works fine. Could you

Re: [Haskell-cafe] Can type be changed along a = chain?

2009-10-12 Thread minh thu
2009/10/12 michael rice nowg...@yahoo.com The first of these works, but not the second. It would seem that the type cannot change along a = chain, but I may be missing something in the code. Is the second example illegal? If so, is there a different way to change a String to an Int along

Re: [Haskell-cafe] Can type be changed along a = chain?

2009-10-12 Thread minh thu
I hope you're not building some unneeded rules in your head. There is no reason to believe there is something to be remembered about whether or not types can change along a = chain. That chain has nothing special in Haskell. = is just an operator, much like ++, ! or . ghci :t (=) (=) :: (Monad m)

Re: [Haskell-cafe] Sharing Subexpressions: Memoization of Fibonacci sequence

2009-10-12 Thread minh thu
2009/10/12 SimonK77 simonkaltenbac...@googlemail.com: **Edit: formatting was bad** Hallo everyone, the last few weeks I was trying to get used to memoization in haskell. As I found out in a previous post, memoization in haskell is, due to the graph reduction strategy used in haskell,

Re: [Haskell-cafe] Can type be changed along a = chain?

2009-10-12 Thread minh thu
2009/10/12 Ketil Malde ke...@malde.org: minh thu not...@gmail.com writes: ghci :t (=) (=) :: (Monad m) = m a - (a - m b) - m b This says that, you provide an a and you get a b. Nothing says the a and b have to be the same upon successive uses. (But note that the monad 'm' has

Re: [Haskell-cafe] Examples/docs for simulated annealing bindings

2009-10-15 Thread minh thu
2009/10/15 Dougal Stanton dou...@dougalstanton.net: I found the HsASA library [1] on Hackage, but there's no documentation and it's not particularly intuitive. I can't see any obvious way of choosing initial config or generating new configurations. Google reveals no one using it. Does anyone

Re: [Haskell-cafe] Re: [Haskell-beginners] map question

2009-10-20 Thread minh thu
[snip] Not a hack, a solution. A consistent one. Look: (`foldl` 0) (`-` 2) Don't they look exactly the same? [snip] These look the same too (and *are* consistent): (f a b) (+ a b) But it's not Haskell.. IMO conflating binary minus and unary minus is not consistent. Something I wonder

Re: [Haskell-cafe] list - sublists

2009-10-20 Thread minh thu
2009/10/20 satorisanitarium satorisanitar...@gmail.com: I just started learning haskell and I just came to my first wtf moment. I'm trying to do something like this: calling: foo 3 [1,2,3,2,4,1,6,3,6,2,3,5,2,5,2,1,6,4] returns: [[1,2,3],[2,4,1,6,3],[2,3]] but i have no idea how to put

Re: [Haskell-cafe] pretty printing with comments

2009-10-20 Thread minh thu
2009/10/20 Niklas Broberg niklas.brob...@gmail.com: Hi again, However: - The source code produced was incorrect: class Dir d where was rewritten as: class Dir dwhere{ That's weird, I'll look into it, thanks. instance Dir Directory where localDir (Local f) = return f type URL=

Re: [Haskell-cafe] Simple but interesting (for me) problem

2009-10-21 Thread minh thu
2009/10/21 michael rice nowg...@yahoo.com There's a thread on the plt-scheme list about creating a function of NO arguments named NEXT that just returns the number of times it's been called, a piece of cake in Scheme, but how would one do this in Haskell? Would the best approach be to use

Re: [Haskell-cafe] Simple but interesting (for me) problem

2009-10-21 Thread minh thu
2009/10/21 Tim Wawrzynczak inforichl...@gmail.com Here's an example in the IO monad: import Data.IORef import System.IO.Unsafe counter = unsafePerformIO $ newIORef 0 next = do modifyIORef counter (+1) readIORef counter Naturally, this uses unsafePerformIO, which as you know, is

Re: [Haskell-cafe] Simple but interesting (for me) problem

2009-10-21 Thread minh thu
the need to extract the value from mkNext, then use it... That why it is called mkNext: do next - mkNext sequence [next, next, next] Cheers, Tim On Wed, Oct 21, 2009 at 1:30 PM, minh thu not...@gmail.com wrote: 2009/10/21 Tim Wawrzynczak inforichl...@gmail.com Here's an example

Re: [Haskell-cafe] How can i safely change the value of specified key ?

2009-10-22 Thread minh thu
2009/10/22 zaxis z_a...@163.com: aaa - newIORef ([]::[(Int,Int)]) writeIORef aaa [(1,1),(2,2),(3,3)] then if i want to change aaa to [(1,1),(2,222),(3,3)] , what's the best way ? re-write aaa is not permitted. Why do you say that ? You can use again writeIORef of modifyIORef to change

Re: [Haskell-cafe] Simple but interesting (for me) problem

2009-10-22 Thread minh thu
2009/10/21 Gregory Crosswhite gcr...@phys.washington.edu: And just because this has not been explicitly stated: it's not just for aesthetic reasons that you couldn't do this with a pure function, but because it violates the semantics and gets you the wrong result. So for example, if you

Re: [Haskell-cafe] How can i safely change the value of specified key ?

2009-10-22 Thread minh thu
2009/10/22 zaxis z_a...@163.com: f xs = (2,) : filter ((/=2) . fst) xs It works but not general as `f` still needs to change other value according to the KEY. Maybe Data.List will supply what i need. I don't think Data.List has what you want as-is. The above code is generalized simply:

Re: [Haskell-cafe] How can i safely change the value of specified key ?

2009-10-22 Thread minh thu
2009/10/22 zaxis z_a...@163.com: replace k v xs = (k,v) : filter ((/=v) . fst) xs Great ! thanks you very much I'm not sure why you're so much happy: Assume some function defined as follow: foo a b c = e x y z a b c where x = some constant y = some other constant z

Re: [Haskell-cafe] Least common supertype?

2009-11-11 Thread minh thu
Least Common Generalization. Cheers, Thu 2009/11/11 Eugene Kirpichov ekirpic...@gmail.com: Is the name of the concept Most general unifier (MGU) ? (See: Hindley-Milner type inference) 2009/11/11 Sean Leather leat...@cs.uu.nl: Is there a name for the following concept? Can you point me

Re: [Haskell-cafe] Least common supertype?

2009-11-11 Thread minh thu
can do it earlier than expected if you're interested. [1] http://homepages.dcc.ufmg.br/~camarao/ Cheers, Thu 2009/11/11 minh thu not...@gmail.com: Least Common Generalization. Cheers, Thu 2009/11/11 Eugene Kirpichov ekirpic...@gmail.com: Is the name of the concept Most general unifier

Re: [Haskell-cafe] ANN: wumpus-core-0.13.0

2009-11-27 Thread minh thu
2009/11/27 Stephen Tetley stephen.tet...@gmail.com: Hello All Wumpus-core is a library for drawing 2D vector pictures, supporting output to PostScript and SVG. It has no FFI dependencies, so should be portable across operating systems (assuming GHC with type families). Wumpus-core is

Re: [Haskell-cafe] Finding HP

2009-12-03 Thread minh thu
2009/12/3 Tony Morris tonymor...@gmail.com: Furthermore, when someone offers feedback designed to improve a page, and does so in a very non-threatening way: On Dec 2, 2009, at 2:26 PM, Andrew Coppin wrote: My suggestion is that if we really want people to grab the HP rather than

[Haskell-cafe] language-dot usage

2009-12-04 Thread minh thu
Hi, I'm using the language-dot package to generate some .dot file. I'm wondering how to make edges. I was expecting to generate something like 1 - {2 ; 3} but get in fact 1 - 2 - 3 I used the (pseudo) statements [NodeStatement $ NodeID 1, EdgeStatement [NodeId 2, NodeId 3]] What is the

Re: [Haskell-cafe] language-dot usage

2009-12-04 Thread minh thu
is. OK, relevant answer: minh thu not...@gmail.com writes: I'm wondering how to make edges. I was expecting to generate something like 1 - {2 ; 3} but get in fact 1 - 2 - 3 I used the (pseudo) statements [NodeStatement $ NodeID 1, EdgeStatement [NodeId 2, NodeId 3]] So you're

Re: [Haskell-cafe] Low Level Audio - Writing bytes to the sound card?

2009-12-04 Thread minh thu
2009/12/4 M Xyz functionallyharmoni...@yahoo.com if you get it to work As a spoiled Java programmer, this new role as pioneer is a bit intimidating, but I will give it a shot. :) I downloaded the portaudio v19 source and I'm attempting to build it. Apparently I have to register my

Re: [Haskell-cafe] Lisp like symbols in haskell

2009-12-08 Thread minh thu
Probably in the same way integers are made redundant : data Integer = 0 | 1 | 2 | Cheers, Thu 2009/12/8 Lyndon Maydwell maydw...@gmail.com: Aren't symbols made redundant by algebraic data types? On Tue, Dec 8, 2009 at 4:48 PM, Michael Vanier mvanie...@gmail.com wrote: jean-christophe

Re: [Haskell-cafe] ANN: hakyll-0.1

2009-12-08 Thread minh thu
2009/12/8 Ivan Lazar Miljenovic ivan.miljeno...@gmail.com: Gregory Crosswhite gcr...@phys.washington.edu writes: That really just means that BSD3 code can be used in GPL code; you still have to release your own code as GPL if you are including any GPL code. Not quite true: it means that any

Re: [Haskell-cafe] Re: Allowing hyphens in identifiers

2009-12-11 Thread minh thu
2009/12/11 Johannes Laire johannes.la...@gmail.com: On Thu, Dec 10, 2009 at 12:54 AM, Richard O'Keefe o...@cs.otago.ac.nz wrote: Given the amazinglyUglyAndUnreadably baStudlyCaps namingStyle that went into Haskell forNoApparentReasonThatIHaveEverHeardOf Compare: someCoolFunc fstParam

Re: [Haskell-cafe] Re: ANN: hakyll-0.1

2009-12-12 Thread minh thu
2009/12/12 Stephen Tetley stephen.tet...@gmail.com: 2009/12/12 Tom Tobin korp...@korpios.com: 1) Can the author of Y legally distribute the *source* of Y under a non-GPL license, such as the 3-clause BSD license or the MIT license? Hello Tom If the answer to this isn't yes, I'll buy a hat

Re: [Haskell-cafe] Design question

2009-12-17 Thread minh thu
2009/12/17 hask...@kudling.de hask...@kudling.de: Hi all, thanks for your ideas so far. I think you might be looking for too much sugar. I don't know much about your problem, but I would use approximately your approach and be straightforward: To bother you with some details: i am

Re: [Haskell-cafe] short licensing question

2010-01-12 Thread minh thu
2010/1/12 Duncan Coutts duncan.cou...@googlemail.com: On Mon, 2010-01-11 at 09:30 -0800, Andrey Sisoyev wrote: Svein Ove Aas wrote: In this case, LGPL is a problem. It requires you to offer a way to re-link such binaries against new versions/implementations of the library, which in

Re: [Haskell-cafe] Re: Xhtml?

2010-01-13 Thread minh thu
2010/1/13 Günther Schmidt gue.schm...@web.de: Am 13.01.10 15:31, schrieb Günther Schmidt: Hi, apologies upfront. As time presses I decided to post questions immediately as soon as I run into dead-ends. I just don't want to give the impression that I'm not willing to do my homework. I'm

Re: [Haskell-cafe] Stack ADT?

2010-02-05 Thread minh thu
2010/2/5 michael rice nowg...@yahoo.com Not using Stack for anything, just trying to understand how things can be done in Haskell. To that end... What's going on here? I'm not even calling function POP. Michael == module Data.Stack (Stack, emptyStack,

[Haskell-cafe] Re: [Haskell] Functional Programming User Group Ghent

2010-02-22 Thread minh thu
[moving to café from haskell] 2010/2/21 Jeroen Janssen jejan...@gmail.com: Dear all, We are in the progress of starting up a Functional Programming User Group in Ghent. The basic idea of the group is to have occasional informal meetings where people can give talks, where we have invited

Re: [Haskell-cafe] GHC RTS question

2010-02-22 Thread minh thu
2010/2/22 Ivan Miljenovic ivan.miljeno...@gmail.com: On 22 February 2010 10:55, Lennart Augustsson lenn...@augustsson.net wrote: Supply a fix for the problem, and it will probably get included. There has probably been little demand for this feature so far. But it is a little bit weird where

Re: [Haskell-cafe] Re: GPL answers from the SFLC

2010-03-04 Thread minh thu
2010/3/4 Stefan Monnier monn...@iro.umontreal.ca: The next question that comes to mind is thus: What if a new library X' released under BSD or MIT license implements the X API (making possible to compile Y against it)? Can such a new library X' be licensed under something else than the GPL (we

Re: [Haskell-cafe] GPL answers from the SFLC (WAS: Re: ANN: hakyll-0.1)

2010-03-05 Thread minh thu
2010/3/5 Magnus Therning mag...@therning.org: On Thu, Mar 4, 2010 at 18:05, Stephen Tetley stephen.tet...@gmail.com wrote: Hi Tom Hmm, its seems I'm due to eat my hat... To me though, the judgement makes that insistence that using an API is making a derivative work. I can't see how that

[Haskell-cafe] foldl to foldl' , ok ; but with foldM ?

2006-05-14 Thread minh thu
something... but I don't know what and how. I think trying to strictify the accRef is worthless : it's the referenced acc that needs to be evaluated. Is-it correct ? Thanks !! VO Minh Thu ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re: [Haskell-cafe] Haskell RPC

2006-05-28 Thread minh thu
hi 2006/5/25, Joel Reymont [EMAIL PROTECTED]: [snip] Also, it seems to me that the only way to deal with variable numbers of differently typed arguments is to use the HList approach which is quite heavy machinery, IMO. (i ve made a quick read of previous reply .. think there is not my answer

Re: [Haskell-cafe] State Variables

2006-05-29 Thread minh thu
ah... simulation in haskell ... that's a thing i thought a bit of .. (disclaimer : i'm not so good at haskell, so... :) here how i've started : you have your global state : it's a bunch of IORef or STRef. Each one maps to one of the individual thing you want to update. You can choose the

Re: [Haskell-cafe] State Variables

2006-05-29 Thread minh thu
hi, Bulat, i quote the doc for Data.Array.Storable : It is similar to IOUArray but slower. Its advantage is that it's compatible with C. So you speak about Storable because Matthew wants to use BLAS and LAPACK ? Cheers, mt 2006/5/29, Bulat Ziganshin [EMAIL PROTECTED]: Hello Matthew, Monday,

Re: [Haskell-cafe] How to understand the fmap here ?

2009-05-05 Thread minh thu
2009/5/5 z_axis z_a...@163.com: The following code snippets is from xmonad: -- Given a window, find the screen it is located on, and compute -- the geometry of that window wrt. that screen. floatLocation :: Window - X (ScreenId, W.RationalRect) --... rr - snd `fmap` floatLocation w

Re: [Haskell-cafe] List comprehension

2009-05-05 Thread minh thu
2009/5/5 applebiz89 applebi...@hotmail.com: Hi, I think I need to use a list comprehension for this function but Im not good with list comprehension. this is what I have so at the moment? filmsInGivenYear :: Int - [Film] - [String] filmsInGivenYear filmYear ?= [ title | year - (Film title

Re: [Haskell-cafe] Performance counters

2009-05-05 Thread minh thu
2009/5/5 Andrew Coppin andrewcop...@btinternet.com: Magnus Therning wrote: Andrew Coppin wrote: Stuff like how many times does this function get called? How what's the maximum depth it recurses to? That kind of thing. It won't help you, but wouldn't it be the kind of thing that'd fit in

Re: [Haskell-cafe] Writing a compiler in Hakell

2009-05-06 Thread minh thu
2009/5/6 Rouan van Dalen rvda...@yahoo.co.uk: Hi everyone. I am designing my own programming language. I would like to know what is the best way to go about writing my compiler in haskell. What are the tools available in haskell that can help with compiler construction? I know about

Re: [Haskell-cafe] Functional Reactive Web Application Framework?

2009-05-13 Thread minh thu
2009/5/13 Robert Wills wrwi...@gmail.com: The only web-oriented frp framework that I know of is Flapjax http://www.flapjax-lang.org/ Flapjax is javascript so possibly there could be a way to integrate it into Haskell using HJavascript? Maybe it could even be integrated into Happstack?

Re: [Haskell-cafe] Problem with Data.Map

2009-06-08 Thread minh thu
Hi, import Blurp bring every thing defined in the Blurp module in scope. So if blah is defined in blurp, blah will work as expected. import qualified Blurp as B does the same thing but everything defined in Blurp should be qualified (i.e. prefixed) with B. B.blah will work, not blah So

Re: [Haskell-cafe] Re: [Haskell] ANNOUNCE: testrunner-0.9

2009-06-11 Thread minh thu
Hi, Have a look at http://projects.haskell.org/testrunner/using-testrunner.html, specifically the last paragraph. Also, http://batterseapower.github.com/test-framework/ says results are reported in deterministic order... Cheers, Thu 2009/6/11 Rodney Price rodpr...@raytheon.com: When I run

Re: [Haskell-cafe] Documentation on hackage

2009-06-15 Thread minh thu
2009/6/15 Uwe Schmidt s...@fh-wedel.de: Dear Haskellers, who needs this kind of documentation? http://hackage.haskell.org/packages/archive/tfp/0.2/doc/html/Types-Data-Num-Decimal-Literals.html isn't this a kind of spam? Hi, This is Template Haskell generated code... Cheers, Thu

  1   2   3   4   >