Re[2]: [Haskell-cafe] | vs. $ (was: request for code review)

2006-03-08 Thread Bulat Ziganshin
Hello Shannon, Tuesday, March 7, 2006, 10:52:01 PM, you wrote: SjB The function itself is a ParseContextTransformation. It takes a SjB context, transforms it, and returns it. Most of the pipelines in the SjB whole application are ParseContextTransformations, and the | (or $ or SjB .) are ways

Re: [Haskell-cafe] Annoucing alternative to Text.Regex

2006-03-08 Thread Bulat Ziganshin
Hello Chris, Wednesday, March 8, 2006, 1:26:37 AM, you wrote: CK It takes the string form of the regular expression and uses Parsec to create a he-he, i written the same thing (but very simple) 2 years ago :) i planned to submit it to the Parsec developers as an example of double-Parsec usage

[Haskell-cafe] RE: [Haskell] Re: Trying On Learn Haskell Web Server

2006-03-08 Thread Bayley, Alistair
[Moving to café] From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mattias Bengtsson I think that continuation-based web session state management, ala Smalltalk/Seaside, would be a very natural fit for a Haskell framework -- all handled by a Web session monad,

Re: [Haskell-cafe] library sort

2006-03-08 Thread John Hughes
Am Samstag, 4. März 2006 21:30 schrieb Neil Mitchell: And a related question is: Which packages are searchable by Hoogle? The best answer to that is some. I intentionally excluded OpenGL and other graphics ones because they have a large interface and yet are not used by most people

[Haskell-cafe] Re: Haddock Problems

2006-03-08 Thread Christian Maeder
Daniel Fischer wrote: Hi all, I've just installed haddock-0.7, nice, but... haddock -o h7doc -h -D h7doc/fusi.haddock --use-package=base Verwaltung.hs Teams.hs Stats.hs Match.hs Main.hs Liga.hs Item.hs Helpers.hs Datum.hs Warning: Helpers: could not find link destinations for: GHC.Base.Int

[Haskell-cafe] haskell-prime traffic

2006-03-08 Thread Ross Paterson
Just for fun, I've put up some statistics on haskell-prime traffic at http://www.soi.city.ac.uk/~ross/haskell-prime-stats/ I'm not claiming it shows anything, except what a narrow base we have. ___ Haskell-Cafe mailing list

[Haskell-cafe] Re: Haddock Problems

2006-03-08 Thread Christian Maeder
Daniel Fischer wrote: Hi all, I've just installed haddock-0.7, nice, but... haddock -o h7doc -h -D h7doc/fusi.haddock --use-package=base Verwaltung.hs Teams.hs Stats.hs Match.hs Main.hs Liga.hs Item.hs Helpers.hs Datum.hs Warning: Helpers: could not find link destinations for: GHC.Base.Int

[Haskell-cafe] MUA written in Haskell (was: Getting GHC to print Done when it's finished linking?)

2006-03-08 Thread Nils Anders Danielsson
On Tue, 07 Mar 2006, Brian Hulley [EMAIL PROTECTED] wrote: (Moved from ghc-users.) Brian Hulley wrote: (time for a proper email client to be written in Haskell! ;-) ) I had the same thought yesterday, after an Emacs-Lisp session in which I was trying to get Gnus to do exactly what I wanted

Re: [Haskell-cafe] | vs. $ (was: request for code review)

2006-03-08 Thread Daniel Fischer
Am Dienstag, 7. März 2006 20:52 schrieb Shannon -jj Behrens: I did think of using a monad, but being relatively new to Haskell, I was confused about a few things. Let's start by looking at one of my simpler functions: -- Keep pushing tokens until we hit an identifier. pushUntilIdentifier ::

[Haskell-cafe] Re: Haddock Problems

2006-03-08 Thread Christian Maeder
Daniel Fischer wrote: Hi all, I've just installed haddock-0.7, nice, but... haddock -o h7doc -h -D h7doc/fusi.haddock --use-package=base Verwaltung.hs Teams.hs Stats.hs Match.hs Main.hs Liga.hs Item.hs Helpers.hs Datum.hs Warning: Helpers: could not find link destinations for: GHC.Base.Int

[Haskell-cafe] Lists of Lists

2006-03-08 Thread zell_ffhut
Just wondering if anyone can help me with a Haskell problem im having. How would I get the value of, lets say, the 9th object in [4179355, 567412] ? (in this case, that should return 6) Any help/adivce would be great :) -- View this message in context:

[Haskell-cafe] Re: Haddock Problems

2006-03-08 Thread Daniel Fischer
Am Mittwoch, 8. März 2006 12:06 schrieben Sie: Daniel Fischer wrote: Hi all, I've just installed haddock-0.7, nice, but... haddock -o h7doc -h -D h7doc/fusi.haddock --use-package=base Verwaltung.hs Teams.hs Stats.hs Match.hs Main.hs Liga.hs Item.hs Helpers.hs Datum.hs Warning:

Re: [Haskell-cafe] Lists of Lists

2006-03-08 Thread Daniel Fischer
Am Mittwoch, 8. März 2006 10:51 schrieb zell_ffhut: Just wondering if anyone can help me with a Haskell problem im having. How would I get the value of, lets say, the 9th object in [4179355, 567412] ? (in this case, that should return 6) Any help/adivce would be great :) -- View this

Re: [Haskell-cafe] Lists of Lists

2006-03-08 Thread Jens Fisseler
How would I get the value of, lets say, the 9th object in [4179355, 567412] ? (in this case, that should return 6) Any help/adivce would be great :) Just concatenate the list elements and index the resulting list, but note that list indices start from 0. Nevertheless I would say this is a

[Haskell-cafe] Looking for an efficient tree in STM

2006-03-08 Thread Einar Karttunen
Hello Does anyone have an efficient tree implemented in STM that supports concurrent updates in an efficient fashion? This seems suprisingly hard to implement - a normal binary tree with links as TVar is very slow and does not scale very well. - Einar Karttunen

Re: [Haskell-cafe] Lists of Lists

2006-03-08 Thread Ketil Malde
zell_ffhut [EMAIL PROTECTED] writes: Just wondering if anyone can help me with a Haskell problem im having. How would I get the value of, lets say, the 9th object in [4179355, 567412] ? You mean the ninth character in the concatenation of the list of strings? Concatenate the strings, and

Re: [Haskell-cafe] library sort

2006-03-08 Thread Sven Panne
Am Dienstag, 7. März 2006 14:24 schrieb Neil Mitchell: I would also imagine that Joe Programmer is more likely to use wxHaskell or Gtk2Hs than those [...] Just a (hopefully final) remark about this, because the above statement seems to imply something that is not completely true: 3 of the 4

Re: [Haskell-cafe] Annoucing alternative to Text.Regex

2006-03-08 Thread Chris Kuklewicz
Bulat Ziganshin wrote: Hello Chris, Wednesday, March 8, 2006, 1:26:37 AM, you wrote: CK It takes the string form of the regular expression and uses Parsec to create a he-he, i written the same thing (but very simple) 2 years ago :) i planned to submit it to the Parsec developers as

Re: [Haskell-cafe] Looking for an efficient tree in STM

2006-03-08 Thread Tomasz Zielonka
On Wed, Mar 08, 2006 at 01:50:06PM +0200, Einar Karttunen wrote: Does anyone have an efficient tree implemented in STM that supports concurrent updates in an efficient fashion? Interesting idea! This seems suprisingly hard to implement - a normal binary tree with links as TVar is very slow

[Haskell-cafe] Re: MUA written in Haskell, and MTA in Haskell help?

2006-03-08 Thread Shae Matijs Erisson
Nils Anders Danielsson [EMAIL PROTECTED] writes: I had the same thought yesterday, after an Emacs-Lisp session in which I was trying to get Gnus to do exactly what I wanted it to... Yeah, same here. I use Gnus and it's nice, but occasionally I want to erase it from the timestream. Out of

Re[2]: [Haskell-cafe] Lists of Lists

2006-03-08 Thread Bulat Ziganshin
Hello Jens, Wednesday, March 8, 2006, 2:31:36 PM, you wrote: How would I get the value of, lets say, the 9th object in [4179355, 567412] ? JF Just concatenate the list elements and index the resulting list, but btw, due to the lazy evaluation time required to perform this operation will be

Re: [Haskell-cafe] library sort

2006-03-08 Thread Ketil Malde
Neil Mitchell [EMAIL PROTECTED] writes: And a related question is: Which packages are searchable by Hoogle? The best answer to that is some. I intentionally excluded OpenGL and other graphics ones because they have a large interface and yet are not used by most people using Haskell. I'm not

Re: [Haskell-cafe] library sort

2006-03-08 Thread Neil Mitchell
I'm not sure I agree that is a good reason. I never claimed it was a good reason, merely that it was a reason :) Hoogle 2 only allowed you to search the Haskell 98 libraries, which obviously everyone wants to do. Hoogle 3 is still in beta - I introduced searching more, but have not got round to

Re: [Haskell-cafe] library sort

2006-03-08 Thread Duncan Coutts
On Wed, 2006-03-08 at 11:25 +0100, John Hughes wrote: When I surveyed Haskell users, I asked respondents to name the most important tools and libraries they use. (Caveat: respondents saw the list of tools and libraries already named, and could include these just by selecting them, so tools

Re: [Haskell-cafe] Lists of Lists

2006-03-08 Thread zell_ffhut
Thank you, It's working as planed now Trying to do a function now that changes the value of an element of the list. In programming languages i've used in the past, this would be done somthing like - changeValue x i [xs] = [xs] !! i = x where x is the value to change to, i is the index of

Re: [Haskell-cafe] library sort

2006-03-08 Thread Sven Panne
Am Mittwoch, 8. März 2006 15:11 schrieb Neil Mitchell: I never claimed it was a good reason, merely that it was a reason :) [...] :-) Anyway, my current plan is: * lots of smallish packages, and one big base package which is the default search * OpenGL, wxHaskell, Gtk2Hs, Darcs, GHC API,

Re: [Haskell-cafe] Lists of Lists

2006-03-08 Thread Thomas Davie
On 8 Mar 2006, at 14:21, zell_ffhut wrote: Thank you, It's working as planed now Trying to do a function now that changes the value of an element of the list. In programming languages i've used in the past, this would be done somthing like - changeValue x i [xs] = [xs] !! i = x

Re: [Haskell-cafe] Lists of Lists

2006-03-08 Thread Jens Fisseler
changeValue x i [xs] = [xs] !! i = x where x is the value to change to, i is the index of the value to change, and [xs] is the list. This however, dosen't work in Haskell. How would this be done in Haskell? Think about what parts of the list you can reuse, how you can define those parts

Re: [Haskell-cafe] Lists of Lists

2006-03-08 Thread zell_ffhut
Stunning. That really helps Different thinking to what im used to :) -- View this message in context: http://www.nabble.com/Lists-of-Lists-t1245394.html#a3301339 Sent from the Haskell - Haskell-Cafe forum at Nabble.com. ___ Haskell-Cafe mailing list

[Haskell-cafe] Re: Can't uninstall GHC or prepare SOE installation on OS X

2006-03-08 Thread Wolfgang Thaller
Xavier Elizalde wrote: Hi. I sent this post to the haskell-cafe mailing list but haven't gotten any replies. Ah well, I watch that list in digest mode only, easy to overlook things. Basically, I can't get the Uninstall AppleScript for GHC 6.4.1to run properly because it encounters an

Re: [Haskell-cafe] Web application frameworks

2006-03-08 Thread Graham Klyne
Björn Bringert wrote: Graham Klyne wrote: [Switching to haskell-cafe] Niklas Broberg wrote: ... On 3/6/06, Graham Klyne [EMAIL PROTECTED] wrote: - Options to run the whole thing behind Apache to leverage its security and web space management capabilities Lemmih has implemented a

[Haskell-cafe] Dropping trailing nulls from a list of list

2006-03-08 Thread Jeff . Harper
Today, I reviewed a function I wrote a few months ago. The function, dropTrailNulls, takes a list of lists and drops trailing null lists. For instance: *Main dropTrailNulls [[1],[2,3],[],[]] [[1],[2,3]] My original implementation was terrible. It was recursive, overly bulky, and difficult to

Re: [Haskell-cafe] Dropping trailing nulls from a list of list

2006-03-08 Thread Neil Mitchell
dropTrailNulls list = reverse (dropWhile null (reverse list)) Or more succinctly: dropTrailNulls = reverse . dropWhile null . reverse Or, is there a more efficient idiom for addressing these problems? The bad thing about this definition is that it is tail strict. Consider

Re: [Haskell-cafe] Dropping trailing nulls from a list of list

2006-03-08 Thread Robert Dockins
On Mar 8, 2006, at 12:08 PM, [EMAIL PROTECTED] wrote:Today, I reviewed a function I wrote a few months ago.  The function, dropTrailNulls, takes a list of lists and drops trailing null lists.  For instance: *Main dropTrailNulls [[1],[2,3],[],[]] [[1],[2,3]] My original implementation was

Re: [Haskell-cafe] Lists of Lists

2006-03-08 Thread zell_ffhut
Im afraid im baffled again! Im now trying to add a char to a string of strings (eg - [434233434 444929192 909313434] Im sure i can use my previous function to help me achive this, but i can't seem to get it workinging charToGrid :: Char - Position - Grid - Grid charToGrid c (row,col) g =

Re: [Haskell-cafe] Lists of Lists

2006-03-08 Thread Robert Dockins
On Mar 8, 2006, at 1:29 PM, zell_ffhut wrote: Im afraid im baffled again! Im now trying to add a char to a string of strings (eg - [434233434 444929192 909313434] Im sure i can use my previous function to help me achive this, but i can't seem to get it workinging charToGrid :: Char -

Re: [Haskell-cafe] Dropping trailing nulls from a list of list

2006-03-08 Thread Udo Stenzel
[EMAIL PROTECTED] wrote: Today, I reviewed a function I wrote a few months ago. The function, dropTrailNulls, takes a list of lists and drops trailing null lists. For instance: *Main dropTrailNulls [[1],[2,3],[],[]] [[1],[2,3]] dropTrailNulls = foldr dtn [] where dtn [] [] = []

Re: [Haskell-cafe] Lists of Lists

2006-03-08 Thread Udo Stenzel
zell_ffhut wrote: Imagine the strings are set out in a 9x9 grid type way, and i have to find the value of a set position given 2 gird values. getCharFromGrid (row,col) g = concat g !!(row * 9) + col This isn't by chance evolving into the world's ugliest sudoku solver? Are you sure, you

Re: [Haskell-cafe] Lists of Lists

2006-03-08 Thread zell_ffhut
Could you explain what the function does.. I can't seem to peice it together. -- View this message in context: http://www.nabble.com/Lists-of-Lists-t1245394.html#a3307166 Sent from the Haskell - Haskell-Cafe forum at Nabble.com. ___ Haskell-Cafe

[Haskell-cafe] Re: MUA written in Haskell (was: Getting GHC to print Done when it's finished linking?)

2006-03-08 Thread Brian Hulley
Nils Anders Danielsson wrote: On Tue, 07 Mar 2006, Brian Hulley [EMAIL PROTECTED] wrote: (Moved from ghc-users.) Brian Hulley wrote: (time for a proper email client to be written in Haskell! ;-) ) I had the same thought yesterday, after an Emacs-Lisp session in which I was trying to get

Re: [Haskell-cafe] Dropping trailing nulls from a list of list

2006-03-08 Thread Bulat Ziganshin
Hello Jeff, Wednesday, March 8, 2006, 8:08:57 PM, you wrote: dropTrailNulls list = reverse (dropWhile null (reverse list)) dropTrailNulls [] = [] dropTrailNulls ([]:xs) = case dropTrailNulls xs of [] - [] list - []:list dropTrailNulls (x:xs) = x :

Re: [Haskell-cafe] Lists of Lists

2006-03-08 Thread Robert Dockins
On Mar 8, 2006, at 2:27 PM, zell_ffhut wrote: Could you explain what the function does.. I can't seem to peice it together. It takes three things 1) a function 2) an index and 3) a list. It finds the nth element of the list, applies the function to it and then returns a new list

Re: [Haskell-cafe] Lists of Lists

2006-03-08 Thread zell_ffhut
I see, that seems to make sence. Im still unsure of how to do that with the specification set to me charToGrid :: Char - Position - Grid - Grid -- View this message in context: http://www.nabble.com/Lists-of-Lists-t1245394.html#a3308835 Sent from the Haskell - Haskell-Cafe forum at

Re: [Haskell-cafe] | vs. $ (was: request for code review)

2006-03-08 Thread Shannon -jj Behrens
First of all, thank you all so much for taking the time to help me with this exercise! My hope is that once I'm able to understand it, my understanding can come through in the article I write. Brian Hulley: In the pipe in the 'otherwise' branch, at the moment you have to assume that each of

Re: [Haskell-cafe] Dropping trailing nulls from a list of list

2006-03-08 Thread Henning Thielemann
On Wed, 8 Mar 2006 [EMAIL PROTECTED] wrote: Today, I reviewed a function I wrote a few months ago. The function, dropTrailNulls, takes a list of lists and drops trailing null lists. For instance: *Main dropTrailNulls [[1],[2,3],[],[]] [[1],[2,3]]

[Haskell-cafe] Re: Library survey results

2006-03-08 Thread John Hughes
29% Parsec 19% wxHaskell 16% QuickCheck 16% haddock 12% Monadic Parser Combinators 11% Gtk2Hs 9% hs-plugins 8% HaXml 7% Data.* 7% Monad foundation classes 6% Arrows 6% HOpenGL The list includes all libraries named by more than 5% of respondents. Sure enough, wxHaskell and Gtk2Hs

Re: [Haskell-cafe] Lists of Lists

2006-03-08 Thread zell_ffhut
Thanks for all the help i've recived through e-mails, but im still stuck on this Anyone want to save the day? :( -- View this message in context: http://www.nabble.com/Lists-of-Lists-t1245394.html#a3311541 Sent from the Haskell - Haskell-Cafe forum at Nabble.com.

Re: [Haskell-cafe] haskell-prime traffic

2006-03-08 Thread John Meacham
On Wed, Mar 08, 2006 at 10:37:11AM +, Ross Paterson wrote: Just for fun, I've put up some statistics on haskell-prime traffic at http://www.soi.city.ac.uk/~ross/haskell-prime-stats/ I'm not claiming it shows anything, except what a narrow base we have. I had no idea I was so

Re: [Haskell-cafe] | vs. $ (was: request for code review)

2006-03-08 Thread Jared Updike
I suspect you guys are right. I had always thought of states as being isomorphic to integers (i.e. you can be in state 0, state 1, ... state n), not as contexts (you have this input, that output, and this token stack), am I wrong? You're thinking of a state machine, I think, which is not

[Haskell-cafe] A syntax proposal: data replacements

2006-03-08 Thread ihope
I'd like to propose more syntactic sugar more Haskell. (A spoonful of syntactic sugar makes the medicine go down...) Put simply, this would provide a smallish bit of pattern matching, and hopefully clarify some things. A simple example should pretty much define the whole thing: fromJust = {Just

Re: [Haskell-cafe] Re: MUA written in Haskell, and MTA in Haskell help?

2006-03-08 Thread Donald Bruce Stewart
shae: Nils Anders Danielsson [EMAIL PROTECTED] writes: I had the same thought yesterday, after an Emacs-Lisp session in which I was trying to get Gnus to do exactly what I wanted it to... Yeah, same here. I use Gnus and it's nice, but occasionally I want to erase it from the timestream.

Re: [Haskell-cafe] Re: MUA written in Haskell (was: Getting GHC to print Done when it's finished linking?)

2006-03-08 Thread Donald Bruce Stewart
5) Ideally the scripting language would be Haskell.. ... I can't find anything which would allow you to compile and load functions into a running program. From haskell.org: hs-plugins A library for compiling and loading plugins into a running Haskell program. Have a look at:

Re: [Haskell-cafe] A syntax proposal: data replacements

2006-03-08 Thread Cale Gibbard
On 08/03/06, ihope [EMAIL PROTECTED] wrote: I'd like to propose more syntactic sugar more Haskell. (A spoonful of syntactic sugar makes the medicine go down...) Put simply, this would provide a smallish bit of pattern matching, and hopefully clarify some things. A simple example should pretty

Re: [Haskell-cafe] Lists of Lists

2006-03-08 Thread zell_ffhut
Last attempt, as its due in a couple of hours Here's what i have so far.. charToGrid :: Char - Position - Grid - Grid charToGrid c [] (row,col) xs = xs charToGrid c (row,col) xs = (changeValue c (concat xs (row*9 + col))) Using changeValue - changeValue x 0 (y:ys) = (x:ys) changeValue x

Re: [Haskell-cafe] | vs. $ (was: request for code review)

2006-03-08 Thread Shannon -jj Behrens
On 3/8/06, Jared Updike [EMAIL PROTECTED] wrote: I suspect you guys are right. I had always thought of states as being isomorphic to integers (i.e. you can be in state 0, state 1, ... state n), not as contexts (you have this input, that output, and this token stack), am I wrong? You're

Re: [Haskell-cafe] | vs. $ (was: request for code review)

2006-03-08 Thread Shannon -jj Behrens
On 3/8/06, Shannon -jj Behrens [EMAIL PROTECTED] wrote: On 3/8/06, Jared Updike [EMAIL PROTECTED] wrote: I suspect you guys are right. I had always thought of states as being isomorphic to integers (i.e. you can be in state 0, state 1, ... state n), not as contexts (you have this input,