[Haskell-cafe] Fwd: Cabalized, Self-Demoing, HStringTemplate-using HAppS Tutorial
-- Forwarded message -- From: tphyahoo [EMAIL PROTECTED] Date: Jun 24, 7:26 pm Subject: Cabalized, Self-Demoing, HStringTemplate-using HAppS Tutorial To: HAppS Hello HAppSers! I have created a self-demoing, HStringTemplate-using intro to HAppS. There is a live demo at http://rippledeals.com:5001 It is cabalized at http://hackage.haskell.org/cgi-bin/hackage-scripts/package/happs-tuto... and should install fine with sudo cabal install happs-tutorial. There is a darcs repo at http://code.haskell.org/happs-examples And a google project at http://code.google.com/p/happs-tutorial/ which currently isn't used, but who knows, maybe for the wiki or issue tracking. (I started at google hosting before migrating to darcs.) I have all kinds of additional lessons planned, but under the release early/release often motto I'm letting it out in its embryonic state. Enjoy! Thomas. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Fwd: Cabalized, Self-Demoing, HStringTemplate-using HAppS Tutorial
-- Forwarded message -- From: tphyahoo [EMAIL PROTECTED] Date: Jun 24, 7:46 pm Subject: Cabalized, Self-Demoing, HStringTemplate-using HAppS Tutorial To: HAppS There are some issues with the cabalized project -- templates are missing. Doh. Use darcs for now. Thomas. On Jun 24, 7:26 pm, tphyahoo [EMAIL PROTECTED] wrote: Hello HAppSers! I have created a self-demoing, HStringTemplate-using intro to HAppS. There is a live demo at http://rippledeals.com:5001 It is cabalized at http://hackage.haskell.org/cgi-bin/hackage-scripts/package/happs-tuto... and should install fine with sudo cabal install happs-tutorial. There is a darcs repo at http://code.haskell.org/happs-examples And a google project at http://code.google.com/p/happs-tutorial/ which currently isn't used, but who knows, maybe for the wiki or issue tracking. (I started at google hosting before migrating to darcs.) I have all kinds of additional lessons planned, but under the release early/release often motto I'm letting it out in its embryonic state. Enjoy! Thomas. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] HaskellForge?
I think people want something like CPAN. This implies a centralized official repository, somewhere that isn't going to go away, ever, because too many people would scream. It should probably be mirrored, too, like with cpan. Maybe darcs.haskell.org is ok for this roll already. Not sure. (Still a haskell nube.) Cheapo repo hosting is for projects where the owners don't feel secure enough, or don't want the responsibility, of committing to the official repo. Committing to the social repo gets you status, but it's work too because of maintenance, bug reports, etc. So, like with cpan, some will, some won't. Module chasing should carry on in the context of that repo. External dependency chasing -- like you need to install some c library... well, I'm not sure. Right everyone? -- View this message in context: http://www.nabble.com/HaskellForge--tf2935549.html#a8276650 Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] why can't you surround (+) in backticks and have it be infix?
Issues: In Haskell, any function or constructor can be enclosed in backticks and then used as an infix operator. from http://www-users.cs.york.ac.uk/~mfn/hacle/issues/node2.html But this seems to be contradicted by... from #haskell -- 09:19 tphyahoo let func = (+) in 1 `func` 2 -- 09:19 lambdabot 3 -- 09:20 tphyahoo but .. -- 09:20 tphyahoo 1 `(+)` 2 -- 09:20 tphyahoo 1 `(+)` 2 -- 09:20 lambdabot Parse error (+) is a function, is it not? Where's the rub? thomas. -- View this message in context: http://www.nabble.com/why-can%27t-you-surround-%28%2B%29-in-backticks-and-have-it-be-infix--tf2939834.html#a8219424 Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] trouble installing ghc 6.6: xargs: /usr/bin/ar: terminated by signal 11
Yes, it's repeatable. As I mentioned, this is an ubuntu, virtual server (user mode linux). I'm thinking this may have to do with the exoticness of my system. So, I will repeat this question at the linode forum (linode is my virtual hoster, and the forum there has a lot of knowledgable users), and report back here if I learn anything useful. Worse case, I'm stuck with ghc 6.4 on my server, which I can (grouchily) live with. If anyone out there has installed ghc 6.6 on any kind of virtual linux, or better yet user mode linux (as opposed to XEN, or virtuozzo, or the other flavors), would be useful to know that as well. Thanks for pointing me in a likely right direction. http://www.linode.com/forums/viewtopic.php?p=11420#11420 -- View this message in context: http://www.nabble.com/trouble-installing-ghc-6.6%3A-xargs%3A--usr-bin-ar%3A-terminated-by-signal-11-tf2932856.html#a8203193 Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] trouble installing greencard -- -fno-prune-tydecls flag ( was Re: trivial function application question )
Very, very helpful Chris; thanks; and thanks also to the many other helpful haskellers. They have (hopefully working) cabal files to make compiling and installing ea\ sy. Unfortunately, not so easy, for PCRE.regex. But hopefully this is just due to my ignorance and there's a simple workaround. At any rate, after darcs --getting as you suggested, I ran make, and got various complaints. I installed haddock, happy, alex, hat, c2hs, and cpphs with apt-get. But was unable to find a deb repository for greencard, the final requirement with apt-cache search. I then downloaded the latest version of greencard wget http://www.haskell.org/greencard/downloads/greencard-latest-src.tar.gz and ran sudo make install install-pkg It chugged along for a while, but finally errored out with ghc -package-name greencard -cpp -fglasgow-exts -fno-prune-tydecls -prof -c Foreign/GreenCard.hs -o Foreign/GreenCard.p_o -hisuf p_hi ghc-6.4.1: unrecognised flags: -fno-prune-tydecls I then googled, but found nothing for no-prune-tydecls or no-prune-typedecls (thinking it might be a typo) Anybody out there can help me get greencard working, so I (and all us perlers) can start using PCRE from haskell? thomas. Chris wrote: I think if you paste the subRegex code above underneath an import Text.Posix.PCRE declaration then you get what you are looking for. To install: The regex-* package hosting is via darcs and has been copied/moved to http://darcs.haskell.org/packages/ (The stable regex-* versions) http://darcs.haskell.org/packages/regex-unstable/ (The unstable regex-* vers\ ions) so darcs get --partial http://darcs.haskell.org/packages/regex-pcre; might b\ e useful. They have (hopefully working) cabal files to make compiling and installing ea\ sy. Note that regex-pcre and regex-tre need libpcre and libtre to be installed separately. regex-posix needs a posix library, but GHC already provides this package with a working libary. -- View this message in context: http://www.nabble.com/trivial-function-application-question-tf2922232.html#a8192328 Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] trouble installing ghc 6.6: xargs: /usr/bin/ar: terminated by signal 11
I'm having trouble installing ghc 6.6. On ubuntu, virtual server (user mode linux). Something seems to be killing the process, no idea why. Anyone seen this? I looked around with ps to see if anything looked suspicious. I do have a lot of screens open, but I don't see why that should matter. There is no instance of haskell or gnci running. after running configure with no problem. ~$ cd ghc-6.6/ ~/ghc-6.6$ sudo make makeOut Password: ~/ghc-6.6$ tail -n8 makeOut (echo Control/Concurrent_stub.o System/CPUTime_hsc.o System/Time_hsc.o ; /usr/bin/find Control/Applicative_split Control/Arrow_split Control/Concurrent_split Control/Concurrent/Chan_split ...long mess... Text/PrettyPrint/HughesPJ_split Text/Printf_split Text/Read_split Text/Read/Lex_split Text/Show_split Text/Show/Functions_split -name '*.o' -print) | xargs /usr/bin/ar q libHSbase.a /usr/bin/ar: creating libHSbase.a xargs: /usr/bin/ar: terminated by signal 11 make[2]: *** [libHSbase.a] Error 125 make[2]: *** Deleting file `libHSbase.a' make[1]: *** [all] Error 1 make[1]: Leaving directory `/home/thartman/ghc-6.6/libraries' make: *** [stage1] Error 2 ~/ghc-6.6$ -- View this message in context: http://www.nabble.com/trouble-installing-ghc-6.6%3A-xargs%3A--usr-bin-ar%3A-terminated-by-signal-11-tf2932856.html#a8199860 Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] trivial function application question
So the core question (speaking as a perler) is how do you write my $s= 'abcdefg'; $s =~ s/a/z/g; $s =~ s/b/y/g; print $s\n; in haskell? There are various haskell regex libraries out there, including ones that advertise they are PCRE (Perl Compatible Reg Ex). But which one to use? How hard to install? With the libs mentioned above, the PCRE-ness seems only to be for matching, not for substitutions. http://www.cs.chalmers.se/~d00nibro/harp/ http://repetae.net/john/computer/haskell/JRegex/ So, I would like to know a good answer to this as well. thomas. brad clawsie-2 wrote: greetings to this helpful and informative list i have a small problem that will be certainly trivial for almost everyone reading this, i would appreciate a little help lets say i have a string s = abcdefg now i have two lists of strings, one a list of patterns to match, and a list of replacement strings: patterns = [a,b] replace = [Z,Y] from which my intent is that a be replaced by Z, b by Y etc now using the replace function from MissingH.Str (which i know is now renamed), i wish to apply replace to s using (pattern[0], replace[0]), (pattern[1], replace[1])...(pattern[N], replace[N]). i am sure there is an elegant way to apply replace to s for all of these argument pairs without composing replace N times myself, but the solution escapes me. thanks in advance for any help you can provide for this trivial issue brad ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- View this message in context: http://www.nabble.com/trivial-function-application-question-tf2922232.html#a8173692 Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] some way to reverse engineer lambda expressions out of the debugger?
I am a newbie learning haskell. (First forum post.) I am wondering if there is a trick to get debugging information about functions out of the environment (which for me, for now, is ghci). In this example, *UnixTools :t map (*) [1,2] map (*) [1,2] :: (Num a) = [a - a] This is very nice, but I would *really* like to see something like *UnixTools explodeLambda( map (*) [1,2] ) [(\x - 1*x),(\x - 2*x)] Yes, maybe I'm dreaming, but I would like haskell to reverse engineer / pretty print lambda expressions for me. (Note that: *UnixTools map ($ 5 ) [(\x - 1*x),(\x - 2*x)] [5,10] *UnixTools map ($ 5) ( map (*) [1..2] ) [5,10] So these expressions really are the same, only it could be argued that the first expression is in some sense easier to read if you are debugging something complex. ) I would like to have something like Data::Dumper from perl, but of course, on steroids. Is something like this possible, or be worked on? Or probably never going to happen? Cheers, thomas. -- View this message in context: http://www.nabble.com/some-way-to-reverse-engineer-lambda-expressions-out-of-the-debugger--tf2897954.html#a8096545 Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe