[Haskell-cafe] Re: Haddock: Failed to create dependency graph (when adding sections with * or a module heading)

2009-08-20 Thread Jared Updike
] http://hackage.haskell.org/package/dlist-0.5 [2] http://semantic.org/hnop/ On Wed, Aug 19, 2009 at 9:45 AM, Jared Updike jupd...@gmail.com wrote: I compiled and installed haddock-2.4.2 from the tarball source. Adding a few simple comments to the code here:   https://dl.getdropbox.com/u/143480

[Haskell-cafe] Haddock: Failed to create dependency graph (when adding sections with * or a module heading)

2009-08-19 Thread Jared Updike
I compiled and installed haddock-2.4.2 from the tarball source. Adding a few simple comments to the code here: https://dl.getdropbox.com/u/143480/doc/DualMap.hs and running haddock $ haddock -h -o doc Data/DualMap.hs Warning: Data.DualMap: could not find link destinations for:

[Haskell] Re: Hi-res/vector version of logo?

2009-04-18 Thread Jared Updike
LOGO VARIATION GENERATOR With some encouragement and feedback from Jeff Wheeler and Eelco Lempsink, I created a Polymorphic SVG Haskell Logo in Haskell [1]. This script yields a pile of SVG files and an HTML index showing them off (known to work in Safari 3.0 and Firefox 2.0) [1]:

Re: [Haskell-cafe] Haskell Logo Voting has started!

2009-03-17 Thread Jared Updike
' (e.g. in the subject). Depending on the winner of this voting round we can decide whether we need to continue with variations. Jared Updike already offered to donate a bit of time to help create several variations. But for now, good luck with sorting those options! :) -- Regards

Re: [Haskell-cafe] Re: Logo Preferences

2009-03-10 Thread Jared Updike
I agree that we should use the first round of voting to learn what the general consensus of the Haskell community is on a logo design idea (and to filter out the non-viable logos). In the spirit of bikeshedding, I would love to see---and would volunteer to spend part of a day editing, say, the

Re: [Haskell-cafe] Re: Data.Map: Enumerating ordered subset of keys

2009-02-09 Thread Jared Updike
I had a similar thought. That will probably do the trick. Jared. On 2/8/09, Svein Ove Aas svein@aas.no wrote: On Mon, Feb 9, 2009 at 8:02 AM, Jared Updike jupd...@gmail.com wrote: It looks like two Map.splits will do what I need except for allowing more exact testing of = vs

Re: [Haskell-cafe] Re: Data.Map: Enumerating ordered subset of keys

2009-02-09 Thread Jared Updike
visit all of them before it enumerated the ones that satisify the predicate. I don't believe laziness would help here. HTH, Anish On Sun, 08 Feb 2009 23:02:37 -0800, Jared Updike jupd...@gmail.com wrote: It looks like two Map.splits will do what I need except for allowing more exact

Re: [Haskell-cafe] Data.Map: Enumerating ordered subset of keys

2009-02-09 Thread Jared Updike
On 2/8/09, Evan Laforge qdun...@gmail.com wrote: I have a little util library with various map functions. 'within' is almost what you want, except it's half-open. You can make an inclusive one by pulling the lowest element off the above map. I'm also curious if there's a better way to do

[Haskell-cafe] Data.Map: Enumerating ordered subset of keys

2009-02-08 Thread Jared Updike
I would like to enumerate a subset of keys in a Map satisfying \ key = key1 key = key2 but in the expected, reasonable amount of time (e.g. O(log(n)) + O(m) for n total keys and m keys in the subset). (Or key key1 and/or key key2 or some such combination). Is there an appropriate idiom or

[Haskell-cafe] Re: Data.Map: Enumerating ordered subset of keys

2009-02-08 Thread Jared Updike
It looks like two Map.splits will do what I need except for allowing more exact testing of = vs. (since == elements are left out of both maps...?) Jared. On 2/8/09, Jared Updike jupd...@gmail.com wrote: I would like to enumerate a subset of keys in a Map satisfying \ key = key1 key = key2

[Haskell-cafe] Functional MetaPost in 5 Steps

2008-10-23 Thread Jared Updike
I'm interested in using Functional MetaPost on Mac OS X (or FreeBSD). I'm looking for a tutorial like: http://haskell.org/haskellwiki/Haskell_in_5_steps but for FMP. I can't even get a simple example to show up in a PDF file: --- import FMP ... (see full code below) myPicture =

Re: [Haskell-cafe] MPFR / FFI - Nefarious (Simple?) bug

2008-10-06 Thread Jared Updike
If you substitute your mpfr_set_signed_int for the one below, the noworks should become works. Yes, this works perfectly. Thank you for saving my project! (Had I known about HMPFR when I started this project, I would have just used that instead of rolling my own, but it looks like HMPFR was

[Haskell-cafe] MPFR / FFI - Nefarious (Simple?) bug

2008-10-05 Thread Jared Updike
In order to create an arbitrary precision floating point / drop in replacement for Double, I'm trying to wrap MPFR (http://www.mpfr.org/) using the FFI but despite all my efforts the simplest bit of code doesn't work. It compiles, it runs, but it crashes mockingly after pretending to work for a

Re: [Haskell-cafe] MPFR / FFI - Nefarious (Simple?) bug

2008-10-05 Thread Jared Updike
tell GHC leave this mess and anything in the C heap completely alone? Jared. On 10/5/08, Alexander Dunlap [EMAIL PROTECTED] wrote: On Sun, Oct 5, 2008 at 5:38 PM, Chris Mears [EMAIL PROTECTED] wrote: Jared Updike [EMAIL PROTECTED] writes: Can someone else verify if this is a Mac/BSD

Re: ghc-6.6: panic! (the 'impossible' happened)

2007-03-13 Thread Jared Updike
this. Or just send the code. Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On | Behalf Of Jared Updike | Sent: 03 February 2007 08:17 | To: glasgow-haskell-bugs@haskell.org | Subject: ghc-6.6: panic! (the 'impossible' happened) | | ghc-6.6: panic! (the 'impossible

ghc-6.6: panic! (the 'impossible' happened)

2007-02-17 Thread Jared Updike
ghc-6.6: panic! (the 'impossible' happened) (GHC version 6.6 for i386-apple-darwin): checkKind: adding kind constraint t{tv a2M5} [tv] * t_a1pL{tv} [tau] t_a1pL{tv} [tau] ?? Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug --- If you want the

Re: [Haskell-cafe] Slow IO

2006-09-12 Thread Jared Updike
Maybe I've misused the word segfault. What happened is: The programme consumed more and more memory (according to top), kswapd started to have a higher CPU-percentage than my programme, programme died, system yelling 'Speicherzugriffsfehler', top displays 'kswapddefunct'. I believe that means my

Re: [Haskell-cafe] map (-2) [1..5]

2006-09-08 Thread Jared Updike
In C, it wouldn't be, since there, unary ops always bind tighter than infix ops, and the precedences used in C are also used in C++, Java, C#, Javascript etc, and even ISO Prolog obeys the rule that unary minus binds tighter so making unary minus have the same precedence as infix minus just makes

Re: [Haskell-cafe] head as a total function

2006-09-07 Thread Jared Updike
it was the first imperative language supporting closures, after all Uh, what about lisp? For those who read the Foozles slides posted earlier [0], I must say he nailed this one, on slide 2. The (MIT) lisp 1.4 manual (ca. 1965) refers to FUNCTION differing from QUOTE in that it handled free

Re: [Haskell-cafe] Re: Re: data structures question

2006-08-31 Thread Jared Updike
And stop calling me Shirley. Could you please be a bit more explicit? Have I offended anyone? This is a reference to a joke from the movie Airplane: Surely, you can't be serious. I am serious, and stop calling me Shirley. I imagine it meant nothing personal. Jared. --

Re: [Haskell-cafe] How to force HTML (rather than XML) output from Haskell XML Toolbox?

2006-08-30 Thread Jared Updike
which is close but not exactly as wanted. The meta (and I expect other tags like br will have the same) tag has closing slash as it would have in XML (XHTML), but not in HTML. Also the DOCTYPE has been lost. I've had similar problems outputting XHTML. For example, naive output (correct

Re: [Haskell-cafe] How to force HTML (rather than XML) output from Haskell XML Toolbox?

2006-08-30 Thread Jared Updike
Just a bit of info on the br, IE treats br/ as a line break, but br/br as 2 line breaks. Just in case you go for the obvious solution of always expanding out a/ to a/a, br won't work. but br / with a space works. And this applies to most tags with this behavior---the space helps, and it

Re: [Haskell-cafe] Fran - Functional Reactive Animation

2006-08-23 Thread Jared Updike
I think this works: http://haskell.org/edsl/pansharp.html Jared. On 8/23/06, HIGGINS Neil (ENERGEX) [EMAIL PROTECTED] wrote: Fran is a Haskell library (or embedded language) for interactive animations with 2D and 3D graphics and sound. See http://www.conal.net/fran/ and

Re: [Haskell-cafe] implementing a csv reader

2006-08-22 Thread Jared Updike
Now I need to find something else for practice. Is there anything related to data analysis/statistics that is lacking is Haskell? A native implementation of multiparameter data fitting (requires some linear algebra) like: Sec 15.4 of http://www.library.cornell.edu/nr/bookcpdf.html or

Re: [Haskell-cafe] Re: Memoizing longest-common-subsequence

2006-08-22 Thread Jared Updike
(Sorry for the late reply; have been on holiday.) No problem. Your email system was kind enough to say when you'd be back :-) I've used it to diff fairly large files (hundreds of K's, if not Megs) where there were few differences. It seemed to perform OK, and in cases where GNU diff (or

Re: [Haskell-cafe] Haskell wiki: most popular pages

2006-08-18 Thread Jared Updike
I feel that Haskell is missing some basic string manipuation functions, like - replacing all occurances of one substring (or sublist) with another string (or list). - tokenize a string by an arbitrary delimeter This came up not too long ago:

Re: [Haskell-cafe] map (-2) [1..5]

2006-08-17 Thread Jared Updike
I'd have thought it would have been simpler to just make the rule that -2 (no spaces between '-' and '2') would be a single lexeme I'd have thought so too, until I implemented a parser with exponentiation. It is easy to get confused and make a parser that is too eager to include the minus sign

Re: [Haskell-cafe] map (-2) [1..5]

2006-08-17 Thread Jared Updike
I'd also argue that in maths the necessary brackets are implied by the superscripting syntax ASCII text parsing issues aside, in math, 2 -4 =? (No you cannot ask if there is space between the 4 and the - symbol, or if I meant (-4)^2 or -(4^2), or if I wrote a negative sign

Re: [Haskell-cafe] map (-2) [1..5]

2006-08-17 Thread Jared Updike
Yes but my point is that -4^2 is not the same as 2 -4 because the latter by convention means - (4^2). In other words, superscripts bind tighter than prefix ops but prefix ops bind tighter than infix. I see. My point is that there already exists a convention[1]

Re: [Haskell] Problem with types.

2006-08-16 Thread Jared Updike
haskell-cafe@haskell.org is usually a better venue for these sorts of questions. People there love helping people learn Haskell. And when I try to load it to GHCi I get an error (there is also plenty of others but they look the same): couldn't match Int against t t1 This error occurs because

Re: [Haskell-cafe] Int-[Char] conversion

2006-08-16 Thread Jared Updike
putStrLn (Product: ++ convertnumbertostring(pp)) Also, there is a predefined function called 'print' where print x = putStr (convertnumbertostring x) i.e. print x = putStr (show x) Jared. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Can someone explain this typing restriction?

2006-08-14 Thread Jared Updike
Google Scholar is often quite handy for this sort of situation. http://scholar.google.com/scholar?q=typing-haskell-in-haskell+jones Jared. On 8/14/06, Tim Walkenhorst [EMAIL PROTECTED] wrote: It can be found here: http://citeseer.ist.psu.edu/424440.html Thanks! Actually I've seen this

Re: [Haskell-cafe] AJAX applications in Haskell

2006-08-10 Thread Jared Updike
http://happs.org/HAppS/README.html http://pass.net/ Jared. On 8/9/06, Adam Peacock [EMAIL PROTECTED] wrote: On 8/10/06, Jared Updike [EMAIL PROTECTED] wrote: [..] http://www.ugcs.caltech.edu/~lordkaos/calc.cgi (source available here http://www.ugcs.caltech.edu/~lordkaos/calc.tar.gz

Re: [Haskell-cafe] Re: Memoizing longest-common-subsequence

2006-08-10 Thread Jared Updike
and also ended up with an STArray based implementation. I can send the code if you're interested. I have no idea how well it performs compared to Ian's, or the one in darcs (which uses PackedStrings). Ian's LCS code looks like it works fine in terms of space usage, but for large input (lengrh

[Haskell-cafe] Re: [Haskell] AJAX applications in Haskell

2006-08-09 Thread Jared Updike
This would require to: - Retarget one of the existing Haskell compilers to generate JavaScript (other possible targets would be Flash or higher level UI languages such as OpenLaszlo that in turn compiles down to either Flash or JavaScript/HTML) As I've noticed from experience, you can just

Re: [Haskell-cafe] Can Your Programming Language Do This?

2006-08-02 Thread Jared Updike
So basically he rediscovered Why FP Matters (http://www.math.chalmers.se/~rjmh/Papers/whyfp.html) ~15-20 years after the fact, but neglected to point out the interesting fact that one can write map in terms of reduce (i.e. foldr) (obviously he didn't read the paper) and ignored the benefits of

Re: [Haskell-cafe] Can Your Programming Language Do This?

2006-08-02 Thread Jared Updike
I don't think this commentary is really fair. It's also insular and bad for the reputation of the Haskell community. There are enough barriers to exploring FP and Haskell already. The purpose of the article was to encourage people to start taking baby steps toward FP, not to demonstrate a deep

Re: [Haskell-cafe] Memoizing longest-common-subsequence

2006-08-01 Thread Jared Updike
On 8/1/06, Mark T.B. Carroll [EMAIL PROTECTED] wrote: I wanted a longest common subsequence function and a bit of Googling failed to turn up a functional one, except for in a scary bit of darcs. I saw a thread from back in the day about this when I was looking for a good implementation of

Re: [Haskell-cafe] Future Edison directions

2006-08-01 Thread Jared Updike
This page: http://jaortega.wordpress.com/2006/03/17/programmers-go-bananas/ lists some references at the bottom. Perhaps they would be useful. Jared. On 8/1/06, Brian Hulley [EMAIL PROTECTED] wrote: Robert Dockins wrote: [snip other points] 7) Finally, I somehow feel like there should be

Re: [Haskell-cafe] Trouble compiling wxhaskell

2006-07-31 Thread Jared Updike
Hmmm I found http://www.haskell.org/haskellwiki/WxHaskell/Installation_tips so there are two such pages, the other being: http://www.haskell.org/haskellwiki/WxHaskell/Install so perhaps these pages can be merged? and a redirect placed from one to the other? Cheers, Jared. On 7/31/06,

Re: [Haskell-cafe] Newbie Q: Deriving MyOrd from Eq problem

2006-07-25 Thread Jared Updike
I am trying to derive MyOrd class from Eq (Prelude): class Eq a = MyOrd a where (%=), (%), (%=) :: a - a - Bool x %= y = (x y || x == y) x % y = y x x %= y = (y x || x == y) Q: What's wrong? Why 'Ord' gets into play here? You are using which is a function

Re: [Haskell-cafe] Newbie Q: Deriving MyOrd from Eq problem

2006-07-25 Thread Jared Updike
Sorry, left out an important verb, *hide*: You can the prelude and thus the Ord class and make your own and You can *hide* the prelude and thus the Ord class and make your own and Jared. -- http://www.updike.org/~jared/ reverse )-: ___

Re: [Haskell-cafe] Why Haskell?

2006-07-23 Thread Jared Updike
GSL Haskell bindings: http://dis.um.es/~alberto/GSLHaskell/ http://dis.um.es/~alberto/GSLHaskell/doc/ Specifically for Linary Algebra: http://dis.um.es/~alberto/GSLHaskell/doc/GSL-Base.html You make a good point and the decision was by no means cut and dry. However I made a point of

Re: [Haskell-cafe] process simulation in functional style

2006-07-17 Thread Jared Updike
Also, I found that the textbook The Haskell School of Expression by Paul Hudak is a good introduction (particularly, if I remember correctly, the second half of the book) to functional reactive programming in Haskell. Jared. On 7/16/06, Nicolas Frisby [EMAIL PROTECTED] wrote: You might

Re: [Haskell-cafe] Type of a function?

2006-07-14 Thread Jared Updike
Did you try putting this in a file, say, t.hsand running ghci t.hs then typing :type func at the GHCi prompt? It should tell you the function type. Jared. On 7/14/06, Jenny678 [EMAIL PROTECTED] wrote: Hallo Can somebody tell me the type of the following function? func ::

Re: [Haskell-cafe] Type of a function?

2006-07-14 Thread Jared Updike
(leave off the line with func :: ??? and the compiler will figure it out for you, if possible---it works in this case) Jared. On 7/14/06, Jared Updike [EMAIL PROTECTED] wrote: Did you try putting this in a file, say, t.hsand running ghci t.hs then typing :type

Re: [Haskell-cafe] Re: Why is there no splitBy in the list module?

2006-07-12 Thread Jared Updike
fields = csv `separateWith` , csv = fields `joinWith` , -- equivalent to concatIntersperse Hence I would much rather have the split condition be the first parameter -- the infix notation looks good, but it will need a flip to get the parameters in the right order. This also goes along with

Re: [Haskell-cafe] Re: Why is there no splitBy in the list module?

2006-07-11 Thread Jared Updike
split is... unconcatIntersperse. How about separate? (split or splitBy is better but it is used all over the place in many libs) And for strings I definitely would use split :: [a] - [a] - [[a]] a lot, just like Python's split function. And words works great for breaking on multiple spaces,

Re: [Haskell] Can someone provide a summary of best Sudoku solver times?

2006-07-09 Thread Jared Updike
I'm not sure if there is a comprehensive timing summay but here are some different approaches and code you can compile and run on your machine: http://haskell.org/haskellwiki/Sudoku In fact, if you run them all, you can share your numbers with us and we can add them to the Sudoku page. And of

Re: [Haskell] Google SoC: Software Transactional Memory for Parrot

2006-06-27 Thread Jared Updike
Am I the only one whose first instinct upon reading this is EW!? You are not the only one, judging from my own experience. I made my own sort of algebraic datatypes / abstract datatypes in C# by using Enums and Objects and runtime casts. It works, but the code itself is hairy. I guess the good

Re: [Haskell-cafe] closures with side effects

2006-06-26 Thread Jared Updike
I have been trying to understand closures in haskell and how they relate to side effects. I have been looking around but all I find are trivial examples with no side effects. Please let me know if you know of any examples. Bulat what you mean by 'closure'? Perhaps you are refering to

Re: [Haskell-cafe] Eager Parser Combinators [was: Functional programming for processing of largeraster images]

2006-06-22 Thread Jared Updike
On 6/22/06, Greg Buchholz [EMAIL PROTECTED] wrote: Ralf Hinze wrote: Also, in a non-strict language recursive definitions are not limited to function types. Users of parser combinators heavily rely on this feature. Just try to define/use parsing combinators ins a strict language. Anyone

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

2006-06-22 Thread Jared Updike
Therefore the list of non-negative integers is longer than the list of positive integers. I agree they have the same cardinality but this doesn't mean they have the same length. Are you saying that some of the (0,1,2,3,4,5,...), (1,2,3,4,5,...) and (1-1,2-1,3-1,4-1,5-1,...) lists have

Re: [Haskell-cafe] Polymorphic type

2006-06-22 Thread Jared Updike
On 6/22/06, Sara Kenedy [EMAIL PROTECTED] wrote: 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

Re: [Haskell-cafe] Simple matrix

2006-06-21 Thread Jared Updike
fromInteger x = [[fromInteger x]] Wouldn't you want the expression [[1,0],[0,2]] + 10 to yield [[11,10],[10,12]] instead of [[11]] ? I guess you would need some complicated machinery so this is one thing you have to ignore to keep your otherwise nifty instance nice and simple. Jared. --

Re: [Haskell-cafe] Simple matrix

2006-06-21 Thread Jared Updike
],[3,4]] * 10 = [[40,60],[40,60],[40,60],[40,60],[40,60], . Hmm... Jared. Atila Jared Updike wrote: fromInteger x = [[fromInteger x]] Wouldn't you want the expression [[1,0],[0,2]] + 10 to yield [[11,10],[10,12]] instead of [[11]] ? I guess you would need some complicated

Re: [Haskell-cafe] Simple matrix

2006-06-21 Thread Jared Updike
Instead of fromInteger x = map repeat (repeat (fromInteger x)) I meant fromInteger x = repeat (repeat (fromInteger x)) but it still doesn't work for multiplication. Jared. -- http://www.updike.org/~jared/ reverse )-: ___ Haskell-Cafe

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

2006-06-20 Thread Jared Updike
o To output anything, I need to do 'do'. If you only have one action, you can omit do, e.g. main = do { putStrLn Hello, World! } is identical (after de-sguaring) to main = putStrLn Hello, World! Essentially, you are correct; to output anything (i.e. to perform I/O by side effect) your

Re: [Haskell-cafe] ACross

2006-06-19 Thread Jared Updike
Not to be the bad guy, but perhaps it's a good idea to remind ourselves of our homework policy. This? http://www.haskell.org/hawiki/HomeworkHelp Can I use putString ??? If you mean putStrLn and putStr, then yes. I would first make a function that constructs the string or list of strings

Re: [Haskell-cafe] Learning C after Haskell

2006-06-12 Thread Jared Updike
Thanks, Minh. So are things like recursion and memory sharing typically out the window? Recursion works in C, but every function call pushes stack, so recursive depth is limited by RAM (compare to tail call optimization in many functional programming languages where the stack frame is reused if

Re: [Haskell-cafe] Separate a string into a list of strings

2006-06-12 Thread Jared Updike
Funny. I have a module called Useful.hs with some of these same sorts of functions. (coming from Python where I used .split(',') and .replace('\r', '') and such a lot): -- module Useful where import List ( intersperse, tails ) import Numeric ( readHex ) hex2num :: (Num a) =

Re: [Haskell-cafe] Features of Haskell

2006-06-04 Thread Jared Updike
stumped as to how I'm going to do this. I've got about 15-20 minutes, so I can only discuss the major features. I was always impressed with Autrijus Tang's presentation here: http://www.pugscode.org/euroscon/haskell.xul (view with Firefox or other Gecko-based browser) I think he managed

Re: [Haskell-cafe] Features of Haskell

2006-06-04 Thread Jared Updike
On Sun, Jun 04, 2006 at 05:17:02PM -0700, Jared Updike wrote: stumped as to how I'm going to do this. I've got about 15-20 minutes, so I can only discuss the major features. I was always impressed with Autrijus Tang's presentation here: Audrey I think

Re: [Haskell-cafe] GHC wish

2006-05-23 Thread Jared Updike
Sorry, meant to reply all: --- This tool (DrIFT) can derive these instances for you, if you care to make rules for it, for Pretty: http://repetae.net/john/computer/haskell/DrIFT/ Jared. -- http://www.updike.org/~jared/ reverse )-:

Re: [Haskell] installing streams library

2006-05-19 Thread Jared Updike
I found this in an old post (gotta love GMail search): You can find further information about the library at the page http://haskell.org/haskellwiki/Library/Streams and download it as http://freearc.narod.ru/Streams.tar.gz from a thread in February entitled: Streams: the extensible I/O

Re: [Haskell-cafe] develop new Haskell shell?

2006-05-11 Thread Jared Updike
It would also be wise to look at occam and erlang and see if they have any useful ideas. And, of course, Windows PowerShell. And scsh (Scheme shell, pretty full featured these days): http://www.scsh.net/ Jared. j. ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Newbie Instance Of Floating Int Error

2006-04-28 Thread Jared Updike
It looks like somewhere else in your program (or a type signature somewhere) is trying to force the result of sqrt to be an Int which won't work since square roots are irrational (represented by the computer as a Float or Double). You might try (1) making sure the place where distBetween is used

Re: [Haskell-cafe] RuntimeLoader

2006-04-14 Thread Jared Updike
I've never used that Runtime Loader package but I have gotten hs-plugins to work: http://www.cse.unsw.edu.au/~dons/hs-plugins/ Hope that helps, Jared. On 4/13/06, Tim Newsham [EMAIL PROTECTED] wrote: Hi, I'm about to start playing with HWS-WP (web server + plugins). It relies on

Re: [Haskell-cafe] web servers

2006-04-08 Thread Jared Updike
I don't know if there's anything newer, but you could check out: http://happs.org/HAppS/README.html http://www.informatik.uni-freiburg.de/~thiemann/WASH/ Hope that helps, Jared. On 4/8/06, Tim Newsham [EMAIL PROTECTED] wrote: Hi Everyone, I'm new to the list, been on irc a bit. I'm

Re: [Haskell-cafe] Re: Justification for Ord inheriting from Eq?

2006-04-07 Thread Jared Updike
given an Ord instance (for a type T) a corresponding Eq instance can be given by: instance Eq T where a == b = compare a b == EQ where did this second -^ == come from? (I guess if if Ordering derives Eq :-) I think you meant instance (Ord T) = Eq T where a == b = case compare

Re: [Haskell-cafe] Re: [Haskell] What's up with this Haskell runtime error message:

2006-04-06 Thread Jared Updike
Thanks so much for your help. I should have made clear that I was aware that the definitions were mutually dependent. What I was hoping was that Haskell could solve this for me without my having to resort to effectively finessing any sequencing considerations. Haskell is a functional

Re: [Haskell] haskell-in-a-box?

2006-04-05 Thread Jared Updike
And: has anyone already built a 'haskell-in-a-box' virtual machine? Some are working on an all-Haskell-boots-from-scratch OS: House (Haskell User's Operating System and Environment): http://www.cse.ogi.edu/~hallgren/House/ From the page: House is a demo of software written in Haskell, running

Re: [Haskell-cafe] Code Review: Sudoku solver

2006-04-04 Thread Jared Updike
On 4/3/06, Donald Bruce Stewart [EMAIL PROTECTED] wrote: It would also be nice to see some example sudoku solvers posted on an `Idioms' page on haskell.org: http://www.haskell.org/haskellwiki/Category:Idioms someone could just create a new page 'Sudoku' and add the phrase

Re: [Haskell-cafe] Code Review: Sudoku solver

2006-04-03 Thread Jared Updike
Chris wrote: You need more than 5 examples. The truly evil puzzles are rarer than that. Go get the set of minimal puzzles and see how far your logic takes you. Chris elucidated some of my questions before I finished writing my email... Claus wrote: (*) actually, that was a bit

Re: [Haskell-cafe] PPM image manipulation

2006-04-02 Thread Jared Updike
having some trouble trying to be able to manipulate PPM images. I want to be able to desaturate and also double the scale of them. im a first time user of haskell so am not very familiar with it. any info would be great! thanks! Nothing wrong with asking for help, but before you do, please

[Haskell-cafe] Distributing monadic(?) functions across dyadic functions

2006-04-02 Thread Jared Updike
Is there a common way (standard libs, higher order) to express the lambda part below? It's not particulary complicated but I think it is not higher-order enough unionBy (\x y - fst x == fst y) listOfPairs1 listOfPairs2 Something like distribute fst (==) where distribute f op x y = f x `op` f

Re: [Haskell-cafe] List of instantiated types

2006-03-30 Thread Jared Updike
My understanding is that type classes in Haskell are meant to be open, so that any code that uses your type class will work with any new instances of that type class. This inherent open endedness causes a problem if you are trying to enumerate all instances because at any time someone can create a

Re: Alternatives to . for composition

2006-03-25 Thread Jared Updike
2218 RING OPERATOR = composite function = APL jot 00B0 degree sign 25E6 white bullet I don't think any other Unicode character should be considered. That's great but 1) I have no idea how to type it. Can I easily and comfortably? In emacs?

Re: [Haskell-cafe] Positive integers

2006-03-24 Thread Jared Updike
Fortunately there are already List functions like genericLength and genericTake, which can handle such a number type. Shouldn't be Peano numbers part of the standard libraries? Natural numbers are being discussed as a possible part of the new Haskell' standard.

Re: [Haskell-cafe] Re: Positive integers

2006-03-23 Thread Jared Updike
An additive torsor is? Surprisingly, there is a page on MathWorld about Torsors but it is empty. Google turned up the following page with a good explanation. http://math.ucr.edu/home/baez/torsors.html I'd maintain that the difference between two lengths is an entirely different quantity from

Re: [Haskell-cafe] Code Review: Sudoku solver

2006-03-22 Thread Jared Updike
On 3/22/06, David F. Place [EMAIL PROTECTED] wrote: Hi All, I really appreciate all the help I received when I asked you to critique my PrefixMap module a few weeks ago. I think I am making good progress in correcting the lisp in my Haskell programming. I'll be very grateful to anyone who

[Haskell-cafe] Re: dynamic arrays

2006-03-17 Thread Jared Updike
(Moved to haskell-cafe) JU General question to the list: JU (Q) Are there any data structures in Haskell similar to C++/STL JU vectors or C# generic Lists (i.e. strongly typed ArrayLists, e.g. JU Listint)? These data structures grow automatically as you add JU elements to them (but in large

Re: [Haskell] Re: Haskell Digest, Vol 31, Issue 15

2006-03-16 Thread Jared Updike
General question to the list: (Q) Are there any data structures in Haskell similar to C++/STL vectors or C# generic Lists (i.e. strongly typed ArrayLists, e.g. Listint)? These data structures grow automatically as you add elements to them (but in large chunks, not one node at a time). This data

Re: [Haskell] Haskell Weekly News: March 13, 2006

2006-03-16 Thread Jared Updike
The dates on the feed are in international (non-US) order, i.e. Mar 13 2006 = 13/03/2006. Is there a way to make this unambiguous by changing the month to a word instead of a number? Just curious... Jared. On 3/16/06, Donald Bruce Stewart [EMAIL PROTECTED] wrote: rjmh: With a view to this

Re: [Haskell] implementing pointers-based data structure

2006-03-15 Thread Jared Updike
You could check out the data structures in Edison, a library of myriad functional data structures. It may already have implemented a sequence data structure with the desired features: http://www.eecs.tufts.edu/~rdocki01/docs/edison/index.html homepage:

Re: [Haskell-cafe] Learning from scratch

2006-03-15 Thread Jared Updike
For GHC try adding the line import Data.Char or import Char at the top of your Haskell program. Or in ghci, try Char.chr instead of chr, etc. Or try ghci filename.hs where filename.hs is a text file with the line import Char at the top. Now 'chr' should appear in scope. The hierarchical

[Haskell-cafe] Re: [Haskell] Trying to get a Composite design pattern to work

2006-03-13 Thread Jared Updike
(Moved to haskell-cafe) Actually, I'm trying to avoid library functions, so I can learn the language and the functional way of thinking. How would one implement the concatMap function? The Haskell 98 report gives possible implementations of standard functions:

Re: [Haskell] debuggers

2006-03-11 Thread Jared Updike
Debug.Trace, such as (trace (show foo) a) and System.IO.Unsafe, such as (unsafePerformIO ( print foo return a)) Or see this recent post, a trace that prints line and column numbers: http://www.haskell.org//pipermail/haskell-cafe/2006-February/014723.html Jared.

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

2006-03-09 Thread Jared Updike
Dude, that was a friggin' awesome email! I'm trying to figure out how I can just copy it wholesale into the article ;) Use what you need. Share and share alike. I've been struggling with Haskell for long enough that my knowledge is now snowballing downhill. I think I experienced that too.

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

Re: [Haskell-cafe] Layout rule (was Re: PrefixMap: code reviewrequest)

2006-03-02 Thread Jared Updike
Layout only applies when something is less indented than previous lines, I believe... e.g. do c - getContents filename putStrLn blah or do x - getContents filename putStrLn ok works fine but do c - blahAction putStrLn blah obviously won't work Jared. On 3/2/06,

Re: [Haskell-cafe] Layout rule (was Re: PrefixMap: code review request)

2006-02-28 Thread Jared Updike
BH Why? Surely typing one tab is better than having to hit the spacebar 4 (or 8) BH times? PC Not when it prevents me from ever exhibiting the slightest shred of style PC in my code. I use that control for readability purposes in my code. [snip] BH I'm really puzled here. I've been using tabs

Re: [Haskell-cafe] rounding errors with real numbers.

2006-02-26 Thread Jared Updike
Well, if you are relying on exact results from floating point arithmetic you're in trouble no matter what you do. As long as you don't do anything irrational (exp, sin, sqrt, etc.), you should be able to get away with using Rational. Number constants with decimals are not automatically

[Haskell-cafe] Monads (was how to write an interactive program ? gui library to use ?)

2006-02-25 Thread Jared Updike
(Note, moved to haskell-cafe.) Essentially, the answer is yes, the state needs to be passed around (neglecting hackery to simulate global variables that is better avoided). However, this can be made convenient by using a monad. BTW, Minh, If you don't know what monads are, then read this.

Re: Re[2]: public/private module sections (was: Haskell-prime Digest, Vol 2, Issue 58)

2006-02-24 Thread Jared Updike
And this public foldr:: (a - b - b) - b - [a] - b public foldr f z [] = z public foldr f z (x:xs) = f x (foldr f z xs) or is it public foldr:: (a - b - b) - b - [a] - b foldr f z [] = z foldr f z (x:xs) = f x (foldr f z xs) and now things aren't lined up.

Re: Export lists in modules

2006-02-20 Thread Jared Updike
I am not sure if this has been mentioned before, but something I would really find useful is the ability to tell Haskell to export everything in a function except for some named functions. No one has responded so I thought I would make a suggestion about what the syntax might look like to do

Re: [Haskell-cafe] Infinite loop?

2006-02-17 Thread Jared Updike
Yep. change one line to: entry - if isdir name /= . name /= .. and it does in fact work. Jared. On 2/17/06, Jon Fairbairn [EMAIL PROTECTED] wrote: On 2006-02-17 at 20:12GMT rgo wrote: Hi all, my program probably goes into infinite loop... But i cannot understand where and why.

Re: [Haskell-cafe] Problems instancing a class

2006-02-17 Thread Jared Updike
type introduce a type synonym, and Haskell98 forbids these in instances, so GHC complains. GHC also lifts this restriction when invoked with -fglasgow-exts . http://www.haskell.org/ghc/docs/latest/html/users_guide/type-extensions.html#type-synonyms Flexible Instances will probably be added

Re: [Haskell-cafe] Haskell as scripting language?

2006-02-15 Thread Jared Updike
For scenario (a) you can use hs-plugins and ghc http://www.cse.unsw.edu.au/~dons/hs-plugins/ With hs-plugins you can get an eval command, or you can dynamically load Haskell modules (from source or pre-compiled .o files). GHC (= 6.5) has an API that you can access from Haskell programs:

Re: [Haskell-cafe] Matching constructors

2006-02-10 Thread Jared Updike
Or inline as findIndices (\x - case x of Tootie _ - True; _ - False) listOfPasAndTooties There was a recent thread about wanting a more succint way to write this (unary pattern matching): http://thread.gmane.org/gmane.comp.lang.haskell.cafe/11109 If John got his wish, then you could write

  1   2   >