[Haskell-cafe] ideas for a phd in the area of paralleism?

2009-01-07 Thread Michael Lesniak
Hello, currently I'm searching for a topic for my phd-thesis or at least for a workshop-paper (as a starting point, to get my feet wet...). My academic group has specialized itself on (practical, i.e. not too theoretical stuff like verification, etc...) parallel programming and related topics, so

[Haskell-cafe] Re: Updating doubly linked lists

2009-01-07 Thread Apfelmus, Heinrich
Dan Weston wrote: I hope the code is better than my description! :) The structure is more like Nothing(RK 0 _) Nothing(RK 1 _) A(RK 2 4) B(RK 3 6) C(RK 2 0) The root of the tree is the center and you can descend on the right. But with this structure, walking from A

Re: [Haskell-cafe] ideas for a phd in the area of paralleism?

2009-01-07 Thread Frederik Deweerdt
On Wed, Jan 07, 2009 at 10:35:25AM +0100, Michael Lesniak wrote: Hello, currently I'm searching for a topic for my phd-thesis or at least for a workshop-paper (as a starting point, to get my feet wet...). My academic group has specialized itself on (practical, i.e. not too theoretical stuff

[Haskell-cafe] Maintaining laziness

2009-01-07 Thread Jan Christiansen
This is great. I am working on the very same topic for quite a while now. My aim is to develop a tool that tells you whether a function is least strict. My work is based on an idea by Olaf Chitil: http://www.cs.kent.ac.uk/people/staff/oc/ I think he was the first who introduced the idea of

Re: [Haskell-cafe] Maintaining laziness

2009-01-07 Thread Henning Thielemann
On Wed, 7 Jan 2009, Jan Christiansen wrote: The non least strict definition of (*) is taken from the module Data.Number.Natural which was published by Lennart Augustsson in the numbers package at hackage. I mention this here because I think it clearly shows that it is even hard for

[Haskell-cafe] Blitting one IOUArray into another

2009-01-07 Thread Bueno, Denis
Hi all, I'm seeing a lot of unexpected memory allocation with some simple code that copies the contents of one vector (IOUArray Int Int64) into another of the same type and dimensions. In particular, profiling reveals that `copyInto' is allocating oodles and oodles of memory. My small test case

Re: [Haskell-cafe] Blitting one IOUArray into another

2009-01-07 Thread Bulat Ziganshin
Hello Denis, Wednesday, January 7, 2009, 6:56:36 PM, you wrote: memory allocated for i :))) each new copy of i needs one word. the situation was much worse with Int64, of course :) Hi all, I'm seeing a lot of unexpected memory allocation with some simple code that copies the contents of

Re: [Haskell-cafe] Maintaining laziness

2009-01-07 Thread Henning Thielemann
On Wed, 7 Jan 2009, Jan Christiansen wrote: This is great. I am working on the very same topic for quite a while now. My aim is to develop a tool that tells you whether a function is least strict. My work is based on an idea by Olaf Chitil: http://www.cs.kent.ac.uk/people/staff/oc/

Re: [Haskell-cafe] Maintaining laziness

2009-01-07 Thread Henning Thielemann
On Wed, 7 Jan 2009, Henning Thielemann wrote: On Wed, 7 Jan 2009, Jan Christiansen wrote: This is great. I am working on the very same topic for quite a while now. My aim is to develop a tool that tells you whether a function is least strict. My work is based on an idea by Olaf Chitil:

Re: [Haskell-cafe] Blitting one IOUArray into another

2009-01-07 Thread Don Stewart
You can of course memcpy unboxed arrays fairly easily. bulat.ziganshin: Hello Denis, Wednesday, January 7, 2009, 6:56:36 PM, you wrote: memory allocated for i :))) each new copy of i needs one word. the situation was much worse with Int64, of course :) Hi all, I'm seeing a

[Haskell-cafe] ICFP: Child care at conference

2009-01-07 Thread Matthew Fluet (ICFP Publicity Chair)
Potential ICFP attendees: The ACM-SIGPLAN Executive Committee, which oversees and sponsors ICFP, is considering expanding its travel grants for event participants in need of child care assistance. (Such expansion would also apply to other major SIGPLAN-sponsored conferences, such as PLDI, POPL,

RE: [Haskell-cafe] Blitting one IOUArray into another

2009-01-07 Thread Bueno, Denis
Ooh, great -- could you point me in the right direction for that? From: Don Stewart [d...@galois.com] Sent: Wednesday, January 07, 2009 9:23 AM To: Bulat Ziganshin Cc: Bueno, Denis; haskell-cafe@haskell.org Subject: Re: [Haskell-cafe] Blitting one IOUArray

RE: [Haskell-cafe] Blitting one IOUArray into another

2009-01-07 Thread Bueno, Denis
Oh, do you mean by actually calling memcpy via ffi? From: Don Stewart [d...@galois.com] Sent: Wednesday, January 07, 2009 9:23 AM To: Bulat Ziganshin Cc: Bueno, Denis; haskell-cafe@haskell.org Subject: Re: [Haskell-cafe] Blitting one IOUArray into another

Re: [Haskell-cafe] Blitting one IOUArray into another

2009-01-07 Thread Daniel Fischer
Am Mittwoch, 7. Januar 2009 16:56 schrieb Bueno, Denis: Hi all, I'm seeing a lot of unexpected memory allocation with some simple code that copies the contents of one vector (IOUArray Int Int64) into another of the same type and dimensions. In particular, profiling reveals that `copyInto'

Re: [Haskell-cafe] ideas for a phd in the area of paralleism?

2009-01-07 Thread Trin
Frederik Deweerdt wrote: On Wed, Jan 07, 2009 at 10:35:25AM +0100, Michael Lesniak wrote: Hello, currently I'm searching for a topic for my phd-thesis or at least for a workshop-paper (as a starting point, to get my feet wet...). My academic group has specialized itself on (practical, i.e.

Re: [Haskell-cafe] Template Haskell question

2009-01-07 Thread Jeff Heard
It doesn't typecheck, no, but it also doesn't check out in scope. It complains in [FunD 'mousePosition [| mousePositionf |] ... that mousePositionf isn't in scope. What I believe I need to do is use mkName mousePositionf, but how do I bind the record getter mousePositionf that is defined by

[Haskell-cafe] template haskell

2009-01-07 Thread brian
Smart constructors sometimes need to generate errors like Foo.Bar.Baz.create: invalid value, etc. Can TH generate the module and function names? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Re: Blitting one IOUArray into another

2009-01-07 Thread Neal Alexander
Bueno, Denis wrote: Oh, do you mean by actually calling memcpy via ffi? http://www.haskell.org/ghc/docs/latest/html/libraries/base/Foreign-Marshal-Utils.html ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] Taking Exception to Exceptions

2009-01-07 Thread Immanuel Litzroth
I'm trying to use the new (for me at least) extensible exceptions and I am little amazed that I cannot get catch, try or mapException to work without telling them which exceptions I want to catch. What is the rationale behind this? How does bracket manage to catch all exceptions? What should

Re: [Haskell-cafe] Taking Exception to Exceptions

2009-01-07 Thread Austin Seipp
Excerpts from Immanuel Litzroth's message of Wed Jan 07 16:53:30 -0600 2009: I'm trying to use the new (for me at least) extensible exceptions and I am little amazed that I cannot get catch, try or mapException to work without telling them which exceptions I want to catch. What is the

[Haskell-cafe] Linking in GMP as a Windows DLL w/ GHC

2009-01-07 Thread Sigbjorn Finne
Hi, a number of folks have been asking/looking for ways to avoid statically linking in GMP into GHC binaries under Windows. I've written up some notes on how to go about doing this, which are now available from http://haskell.forkio.com/gmpwindows Let me know if it is useful (or works

[Haskell-cafe] Hypothetical Haskell job in New York

2009-01-07 Thread Tony Hannan
Hello Haskellers, I'm trying to convince my boss to use Haskell. His main concern is finding people who know Haskell when hiring. He is comfortable with Java because he knows he can always find a Java developer. So if I advertised we were looking for Haskell programmers in New York City, how many

[Haskell-cafe] Re: Hypothetical Haskell job in New York

2009-01-07 Thread Tony Hannan
Let me give you more information about this hypothetical job posting. Our company is a startup CDN ( http://en.wikipedia.org/wiki/Content_Delivery_Network) about 3 years old and doing well. You would hythothetically be one of 7 programmer who write all the software involved in a CDN including http

[Haskell-cafe] State Monad - using the updated state

2009-01-07 Thread Phil
Hi, I¹m a newbie looking to get my head around using the State Monad for random number generation. I¹ve written non-monad code that achieves this no problem. When attempting to use the state monad I can get what I know to be the correct initial value and state, but can¹t figure out for the life

Re: [Haskell-cafe] Template Haskell question

2009-01-07 Thread Ryan Ingram
On Wed, Jan 7, 2009 at 12:58 PM, Jeff Heard jefferson.r.he...@gmail.com wrote: And how do I encode a{ mousePositionf = b } in template haskell without using the [| |] syntax, so that I can use mkName? Whenever I have a question like that, I just ask ghci: $ ghci -fth ghci :m

[Haskell-cafe] State Monad - using the updated state in an adhoc manner

2009-01-07 Thread Phil
Hi, I¹m a newbie looking to get my head around using the State Monad for random number generation. I¹ve written non-monad code that achieves this no problem. When attempting to use the state monad I can get what I know to be the correct initial value and state, but can¹t figure out for the life

Re: [Haskell-cafe] State Monad - using the updated state

2009-01-07 Thread Ryan Ingram
Hi Phil. First a quick style comment, then I'll get to the meat of your question. getRanq1 is correct; although quite verbose. A simpler definition is this: getRanq1 = State ranq1 This uses the State constructor from Control.Monad.State: State :: (s - (a,s)) - State s a What it sounds like

Re: [Haskell-cafe] Re: Tying a simple circularly STM linked list

2009-01-07 Thread John Ky
Thanks Chris, The undefined works for me. -John On Wed, Jan 7, 2009 at 11:11 AM, ChrisK hask...@list.mightyreason.comwrote: You can use undefined or error ... : {-# LANGUAGE RecursiveDo #-} import Control.Concurrent.STM import Control.Monad.Fix -- Transactional loop. A loop is a

Re: [Haskell-cafe] databases in Haskell type-safety

2009-01-07 Thread John Goerzen
On Sat, Jan 03, 2009 at 10:48:44AM +0100, Gour wrote: So, considering that HDBC nicely abstracts API enabling one to easily switch from e.g. Sqlite3 to Postgres, and it is used as in example for database programming, it seems as logical (and the only) choice for Haskell database programming

Re: [Haskell-cafe] Template Haskell question

2009-01-07 Thread David Menendez
On Wed, Jan 7, 2009 at 8:54 PM, Ryan Ingram ryani.s...@gmail.com wrote: You can also use $() and [| |] inside [| |] to generate additional data in TH directly: ghci runQ $ do { VarE n - [| runIdentity |] ; [| \x - $(recUpdE [| x |] [ fmap (\e - (n,e)) [| 1 |] ]) |] } LamE [VarP x_2]

[Haskell-cafe] data declarations should provide fold functions

2009-01-07 Thread Tim Newsham
I've had to use some fold functions recently and I've come to the conclusion that Haskell should automatically generate fold functions for data definitions. To clarify what I mean, for the data definition: data MyData = This Int Char | That String Int Int there should be a matching

[Haskell-cafe] Staged evaluation, names?

2009-01-07 Thread wren ng thornton
Dear Cafe, Every now and then I find myself in the position where I'd like to define some hairy value as a CAF instead of a literal, but I'd like for it to be fully evaluated at compile-time rather than postponed until runtime. It'd be possible to bludgeon the CPP into doing this, but it

Re: [Haskell-cafe] data declarations should provide fold functions

2009-01-07 Thread wren ng thornton
Tim Newsham wrote: I know the short-term answer is use TH to derive folds if I want them, but I think such an important concept should probably be part of the language. If you don't mind the hairy code, there's always this generic answer from #haskell almost a year ago:

Re: [Haskell-cafe] State Monad - using the updated state in an adhoc manner

2009-01-07 Thread Brandon S. Allbery KF8NH
On 2009 Jan 7, at 20:58, Phil wrote: -- 124353542542 is just an arbitrary seed main :: IO() main = do let x = evalState getRanq1 (ranq1Init 124353542542) print (x) You're throwing away the state you want to keep by using evalState there. But you're also missing the point of