Re: [Haskell-cafe] Graphical graph reduction

2008-02-23 Thread Kim-Ee Yeoh
dainichi wrote: Now to the point: Wouldn't it be great if I had a visual tool that visually showed me the graph while the above evaluation unfolded? I could use it to show some of my co-workers to whom laziness is a mystery, what it's all about. Check out

[Haskell-cafe] Haskell w/ delimited continuations

2008-02-23 Thread oleg
Call-by-name lambda-calculus is strictly more expressive (in Felleisen sense) than call-by-value lambda-calculus, and the call-by-need (aka, lazy) lambda-calculus is observationally equivalent to the call-by-name. One can add shift/reset to any of these calculi (CBV shift/reset is most known;

[Haskell-cafe] Re: Graphical graph reduction

2008-02-23 Thread Dominic Steinitz
About 7 years ago such a tool existed: http://www.cs.kent.ac.uk/people/staff/cr3/toolbox/haskell/GHood/ I don't know if Claus is around. Perhaps he could give you more information. Dominic. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] Database relations mapping

2008-02-23 Thread Radosław Grzanka
Hi, I'm developing toy application to learn HDBC. I have problem with doing relations mapping. Actually I don't know is it a problem or feature. ;) Anyway, I have two tables with relation between them: (this example is simplified to the whole structure of database, you can imagine) CREATE

Re: [Haskell-cafe] Database relations mapping

2008-02-23 Thread Jonathan Cast
On 23 Feb 2008, at 3:30 AM, Radosław Grzanka wrote: Hi, I'm developing toy application to learn HDBC. I have problem with doing relations mapping. Actually I don't know is it a problem or feature. ;) Anyway, I have two tables with relation between them: (this example is simplified to the

[Haskell-cafe] A beginners question

2008-02-23 Thread Harri Kiiskinen
Dear All, banging my head against Haskell, but liking the feeling of hurting brains. Just a simple question: If fmap (^4) [1,2,3] = \i - shows i gives 1 16 81 then why does let i = fmap (^4) [1,2,3] in shows i give [1,16,81] Probably very simple, but there must be a delicate

Re: [Haskell-cafe] A little toy of Haskell Trivia

2008-02-23 Thread Steve Lihn
There's a link on the HackageDB Introduction page that gets you the latest versions of all packages (30MB). Ross, Thanks for the archive URL. I parsed through all the hackagedb modules. I also added the display of repository source (ghc, hdb) and package source. HackageDB is 3-4 times bigger

Re: [Haskell-cafe] A beginners question

2008-02-23 Thread Steve Lihn
fmap (^4) [1,2,3] = \i - shows i gives 1 16 81 You are in the list comprehension in a monadic expression. shows is called three times (i is int). then why does let i = fmap (^4) [1,2,3] in shows i give [1,16,81] shows is called once (i is a list).

Re: [Haskell-cafe] A beginners question

2008-02-23 Thread Adam Langley
On Sat, Feb 23, 2008 at 8:00 AM, Harri Kiiskinen [EMAIL PROTECTED] wrote: then why does let i = fmap (^4) [1,2,3] in shows i give [1,16,81] I'll probably mess this up somewhere, but if I do, reset assured that someone else here will correct me ;) fmap (^4) [1,2,3] == [1,16,81] so

Re: [Haskell-cafe] A beginners question

2008-02-23 Thread Chaddaï Fouché
2008/2/23, Harri Kiiskinen [EMAIL PROTECTED]: Dear All, banging my head against Haskell, but liking the feeling of hurting brains. Just a simple question: If fmap (^4) [1,2,3] = \i - shows i gives 1 16 81 In the List Monad, (=) is defined as concatMap, so this code can be

[Haskell-cafe] Re: [Haskell] *** JOB OFFER *** [...]

2008-02-23 Thread Paul Johnson
Peter Verswyvelen wrote: PS: This job offer was already placed in the Haskell Café a while ago, but I was advised there to place it in the main Haskell list. I hope this is not considered as spam. I certainly don't see it as spam. One day there will be a dozen jobs for Haskell programmers

Re: [Haskell-cafe] A beginners question

2008-02-23 Thread Roberto Zunino
Harri Kiiskinen wrote: fmap (^4) [1,2,3] = \i - shows i let i = fmap (^4) [1,2,3] in shows i Probably very simple, but there must be a delicate difference between these two expressions. I just don't get it. First, let's simplify these expressions using the following equation: fmap

Re: [Haskell-cafe] Re: Graphical graph reduction

2008-02-23 Thread Claus Reinke
About 7 years ago such a tool existed: http://www.cs.kent.ac.uk/people/staff/cr3/toolbox/haskell/GHood/ GHood was never intended to visualize graph reduction directly (*). instead, it visualized observations - ie, you could see if and when which parts of an observed data structure was

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

2008-02-23 Thread Taral
On Sat, Feb 23, 2008 at 1:05 AM, [EMAIL PROTECTED] wrote: Adding control effects (shift/reset) changes the expressivity results. Now all three calculi are distinct and none subsumes the other. For example, the expression reset( (\x - 1) (abort 2)) evaluates to 1 in call-by-name

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

2008-02-23 Thread Taral
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. -- Taral [EMAIL PROTECTED] Please let me know if there's any further trouble I can give you. -- Unknown

[Haskell-cafe] how to catch keyboard interrupts?

2008-02-23 Thread Uwe Hollerbach
Hi, all, I am continuing to mess with my little scheme interpreter, and I decided that it would be nice to be able to hit control-C in the middle of a long-running scheme computation to interrupt that and return to the lisp prompt; hitting control-C and getting back to the shell prompt works, but

[Haskell-cafe] Haskell Weekly News: February 23, 2008

2008-02-23 Thread Don Stewart
--- Haskell Weekly News http://sequence.complete.org/hwn/20080223 Issue 70 - February 23, 2008 --- Welcome to issue 70 of HWN, a newsletter covering

[Haskell-cafe] Re: fast graph algorithms without object identities

2008-02-23 Thread apfelmus
Henning Thielemann wrote: It seems that algorithms on graphs can be implemented particularly efficient in low-level languages with pointers and in-place updates. E.g. topological sort needs only linear time, provided that dereferencing pointers requires constant time. I could simulate pointer

Re: [Haskell-cafe] A little toy of Haskell Trivia

2008-02-23 Thread Ross Paterson
On Sat, Feb 23, 2008 at 10:59:40AM -0500, Steve Lihn wrote: I parsed through all the hackagedb modules. I also added the display of repository source (ghc, hdb) and package source. HackageDB is 3-4 times bigger than GHC core. The result is interesting, looking at the most used modules move up

[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] haskellwiki and Project Euler

2008-02-23 Thread Daniel Fischer
Hi all, I try not to be too rude, although I'm rather disgusted. I know there are several sites out on the web where solutions to PE problems are given. That is of course absolutely against the sporting spirit of Project Euler, but hey, not all people are sporting. I've found

Re: [Haskell-cafe] haskellwiki and Project Euler

2008-02-23 Thread Tony Morris
Daniel Fischer wrote: Hi all, I try not to be too rude, although I'm rather disgusted. I know there are several sites out on the web where solutions to PE problems are given. That is of course absolutely against the sporting spirit of Project Euler, but hey, not all people are sporting. I've

Re: [Haskell-cafe] how to catch keyboard interrupts?

2008-02-23 Thread Bulat Ziganshin
Hello Uwe, Saturday, February 23, 2008, 11:35:35 PM, you wrote: mysighandler = Catch (do hPutStrLn stderr caught a signal! fail Interrupt!) scheme calculation doesn't get interrupted at all! I see in the System.Posix.Signals documentation that the signal handler gets invoked

Re: [Haskell-cafe] how to catch keyboard interrupts?

2008-02-23 Thread Uwe Hollerbach
Thanks, Bulat, I'll look into this! On 2/23/08, Bulat Ziganshin [EMAIL PROTECTED] wrote: Hello Uwe, Saturday, February 23, 2008, 11:35:35 PM, you wrote: mysighandler = Catch (do hPutStrLn stderr caught a signal! fail Interrupt!) scheme calculation doesn't get

Re: [Haskell-cafe] haskellwiki and Project Euler

2008-02-23 Thread Daniel Fischer
You're going the right way about having the answers published in more ways than just the Haskell wiki. I'm only making a prediction, not a threat. Might be. And I've been over-angered. Having the Haskell code for the solutions in the wiki might be legitimate, but a) no code should be put

Re: [Haskell-cafe] how to catch keyboard interrupts?

2008-02-23 Thread Uwe Hollerbach
On 2/23/08, Bulat Ziganshin [EMAIL PROTECTED] wrote: [about my question about keyboard interrupts] you should store thread id of thread running interpreter and send async exception to it. control.concurrent is probably contains all required functions Most splendid! Here's what I did

Re: [Haskell-cafe] haskellwiki and Project Euler

2008-02-23 Thread Quân Ta
Shame on you Haskell wiki! :) Perhaps it's a conpiracy to avoid wasting too much of the community effort on PE, and direct that energy to darcs :) - Quan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org