Re: [Haskell-cafe] Playing with ATs again
Ivan Lazar Miljenovic wrote: Don't forget, GHC is open source: if this lack really was dumb and annoying you, there was nothing stopping you from rectifying this situation up until now. Except that, in the real world, this is actually completely infeasible. Yes, I know it's the basic tenant of OSS that you can modify the program to do whatever you want. But in reality, something like GHC is far too large and complex for this to be a realistic possibility. And this holds for most other nontrivial software too. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Playing with ATs again
Victor Nazarov wrote: I think it is more simple like: class Bijection a b where ... type LeftToRight a = (Bijection a b) = b type RightToLeft b = (Bijection a b) = a Hmm, yes... That looks like it could work. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Playing with ATs again
On 8/4/10 11:40 PM, Andrew Coppin wrote: Ivan Lazar Miljenovic wrote: Don't forget, GHC is open source: if this lack really was dumb and annoying you, there was nothing stopping you from rectifying this situation up until now. Except that, in the real world, this is actually completely infeasible. Yes, I know it's the basic tenant of OSS that you can modify the program to do whatever you want. But in reality, something like GHC is far too large and complex for this to be a realistic possibility. And this holds for most other nontrivial software too. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe Fair enough, but if one can't do better one's self then one should be careful about calling the work of others dumb, which was the original point. Cheers, Greg ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Playing with ATs again
On 5 August 2010 16:48, Gregory Crosswhite gcr...@phys.washington.edu wrote: On 8/4/10 11:40 PM, Andrew Coppin wrote: Ivan Lazar Miljenovic wrote: Don't forget, GHC is open source: if this lack really was dumb and annoying you, there was nothing stopping you from rectifying this situation up until now. Except that, in the real world, this is actually completely infeasible. Yes, I know it's the basic tenant of OSS that you can modify the program to do whatever you want. But in reality, something like GHC is far too large and complex for this to be a realistic possibility. And this holds for most other nontrivial software too. Fair enough, but if one can't do better one's self then one should be careful about calling the work of others dumb, which was the original point. Exactly. Either do it yourself or be grateful that someone has done _something_, even if it isn't as good as you like. It's not like you're paying for it... -- Ivan Lazar Miljenovic ivan.miljeno...@gmail.com IvanMiljenovic.wordpress.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] hGetContents: resource exhausted
On Wed, Jul 28, 2010 at 4:21 PM, Donn Cave d...@avvanta.com wrote: Quoth Lally Singh lally.si...@gmail.com, Ah, it's getting EAGAIN from fds created from prior pipe() calls. The other sides look like they were DUP2'd to fds 01, I'm guessing for a fork/exec(). Well, that isn't a big surprise - it's the way you would expect to get EAGAIN. So ... evidently the GHC runtime is broken somehow on OpenSolaris? I personally have no idea what's going on there, but while we're waiting for someone with a clue, here are a couple more random things to try: Have you compiled and run separately? instead of runghc Setup.hs configure ghc --make Setup Setup configure It shouldn't make any difference on its own, but then you can try options on the compile, like ghc -threaded, and runtime flags like Setup +RTS -V0 -RTS I suggest that because it cuts down on signal interrupts from the runtime, and your symptoms suggest a signal interrupt. That fixed the signal problem! Sadly that just gets me far enough to Setup +RTS -V0 -RTS build, which runs ghc, which then dies from the same signal problem :-( ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Playing with ATs again
Ivan Lazar Miljenovic wrote: On 5 August 2010 16:48, Gregory Crosswhite gcr...@phys.washington.edu wrote: On 8/4/10 11:40 PM, Andrew Coppin wrote: Ivan Lazar Miljenovic wrote: Don't forget, GHC is open source: if this lack really was dumb and annoying you, there was nothing stopping you from rectifying this situation up until now. Except that, in the real world, this is actually completely infeasible. Yes, I know it's the basic tenant of OSS that you can modify the program to do whatever you want. But in reality, something like GHC is far too large and complex for this to be a realistic possibility. And this holds for most other nontrivial software too. Fair enough, but if one can't do better one's self then one should be careful about calling the work of others dumb, which was the original point. Exactly. Either do it yourself or be grateful that someone has done _something_, even if it isn't as good as you like. It's not like you're paying for it... Well *I* didn't say that anything was dumb. I was merely pointing out that the much-touched do it yourself benefit of OSS is actually out of most people's reach. There surely can't be many people alive on Earth who actually understand type theory, and far fewer who understand it well enough to meddle with something as astonishingly complex as GHC. So really, there's little or no chance of anybody except the GHC devs fixing this. (If nothing else, the learning curve is pretty much vertical just to fix this one minor problem.) On the one hand, it's nice that we have a freely available compiler at all. (And it's one of the best pieces of Haskell software I've seen to date.) On the other hand, I've seen too many people who write open-source software answer every query and issue simply with patches welcome. As if that's a magic bullet to solve every problem and deficiency. There needs to be a reasonable balance. (Note that in the particular case of GHC, I think us users are getting a pretty good deal. My statements are about open-source in general, not about GHC.) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] what's the best environment for haskell work?
On Wed, Aug 4, 2010 at 8:01 PM, Hamish Mackenzie hamish.k.macken...@googlemail.com wrote: I use Leksah and have done since I started contributing to it. The best way to make it work for you is to use Leksah to fix what you don't like about Leksah ;-) Failing that giving good feedback about bugs and missing features is the next best thing. I did check the bug/feature tracker, and most issues I have are already there, but with a low priority. I could try to contribute, but I'm both lazy and unsure I can be of help On 3 Aug 2010, at 18:48, David Virebayre wrote: Trying code completion in comments on string constants, for example. Code completion makes the text jump if you're editing near the bottom of the editor area. I like the tocandy feature but then it breaks alignment if you open the file in another editor. Something probably fixable by editing the candy file. Just out of interest which of the candy replacements caused problems. Some of them (such as -) already are set to include spaces to pad out differences. For example, . Here's an example without, and with candy : listeEtageres = flip zip [1..] -- on les numérote . nub -- on élimine les doublons . sort-- on les trie . map simple -- on ne garde que le type et la position $ listeEtagTot-- on part de la liste totale des étagères where simple (_arm,tpe,pos) = (tpe,pos) f n (t,p) = (n,t,p) listeEtageres = flip zip [1..] -- on les numérote ∘nub -- on élimine les doublons ∘sort-- on les trie ∘map simple -- on ne garde que le type et la position $ listeEtagTot-- on part de la liste totale des étagères where simple (_arm,tpe,pos) = (tpe,pos) f n (t,p) = (n,t,p) --- Does your existing editor handle candy better? If so how? It doesn't handle them at all :) Thanks for the feedback, please let us know if you think of anything else. This is an example of how i'm confused. In this example, I'm trying to load a single file. It's for test purposes only, I only need it made by ghc --make, I don't need a cabal package. $ cd code/euler $ leksah Euler.hs leksah loads with my previous package loaded. Here, I hoped it'd open the file I mentionned on the command line. Now, I need to close the package or workspace I'm working on, but I'm not sure which. as there's no such option in the Package menu, I suppose I have to close the workspace. I close it, but my source file remains open. I close it. Since I want to see if 'leksah file' works, I close leksah and I'm back at the shell. $ leksah Euler.hs I back again in leksah, this time with no package/workspace opened, but my Euler.hs file did not open either. back to the shell again $ leksah -v Leksah the Haskell IDE, version 0.8.0.6 $ leksah --help Leksah the Haskell IDE Usage: leksah [OPTION...] files... -v--version Show the version number of ide -l NAME --loadSession=NAME Load session -h--help Display command line options -e Verbosity --verbosity=Verbosity One of DEBUG, INFO, NOTICE, WARNING, ERROR, CRITICAL, ALERT, EMERGENCY According to this help, I should be able to give it a file on the commande line, but it seems it does nothing. No message to tell me what's wrong. Also, there's an option to load a session. What's a session ? the IDE tells of workspace and package, how is that related to sessions ? anyway, back to leksah. I open my file Euler.hs. I can't seem to use the browser if I don't define a package. I click several times the menu Package-New package, but nothing happens I click also Package-Edit package. After a few clicks, I try Package-Edit flags and leksah exits without warning. On the shell, I see -- Needs an open workspace Needs an open workspace No active package to edit Needs an open workspace Needs an open workspace No active package to edit leksah: Can't get pane ***lost connection ***lost last connection - exiting leksah-server: ExitSuccess ***lost last connection - waiting ExitSuccess So I understand why the package menus didn't work, but there was no alert while I was in leksah. And it did crash when I clicked on Package-Edit flags (reproductible) Now I create a workspace since I have to. On the browser I still don't have access to my file. Make workspace does nothing, and tells me nothing. I suspect I need a package. So I'm creating a package. When I click save, it creates a Main.hs file for me. Right now I'm kind of annoyed, I just wanted to edit Euler.hs, add another problem to it, compile, run, and get on with something else. That's usually where I close leksah, and lauch kate. For another programs (that compile fine with ghc --make), I didn't bother making the package. But I had to
Re: [Haskell-cafe] Why is toRational a method of Real?
On Thu, 5 Aug 2010, Ivan Lazar Miljenovic wrote: On 5 August 2010 10:15, Lennart Augustsson lenn...@augustsson.net wrote: You're right. It's bad to have toRational in Real. It's also bad to have Show and Eq as superclasses to Num. I understand why it's bad to have Show as a superclass, but why Eq? Because it stops you from using functions as numbers, etc. ? Yes, and on lazy computable reals (==) is not defined for numbers that are equal.___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] ANNOUNCE: uu-parsinglib version 2.5.3; extended with merging combinators
I have uploaded a new version of the uu-parsinglib. It contains, besides the extension of the abstract interpretation part and the fixing of some very subtle corner cases in that part, some nice new functionality: The call of the parser: -- run ((,,,) `pMerge` (pSome pa || pMany pb || pOne pc || pNatural `pOpt` 5)) babc45a results in: -- Result: ([a, a],[b,b],c,45) and -- run ((,,,) `pMerge` (pSome pa || pMany pb || pOne pc || pNatural `pOpt` 5)) bbc results in -- Result: ([a],[b,b],c,5) -- Correcting steps: -- Inserted 'a' at position (0,3) expecting one of ['0'..'9', 'b', 'a'] -- pSome means that the number of elements occurring in the input should be = 1 pMany= 0 pOne = 1 pOpt = 1 The implementation can be found in the Derived module, and is remarkably simple. Doaitse ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] ANN: blaze-builder 0.1
Dear all, I have just released a package called blaze-builder on Hackage. It is basically a builder monoid supporting fast string concatenation. It was originally written for the blaze-html package, but because we thought it could be useful elsewhere as well, we are releasing it as a separate package. Here is a blogpost with more information: http://jaspervdj.be/posts/2010-08-05-blaze-builder.html And here is the Hackage link: http://hackage.haskell.org/package/blaze-builder All feedback is welcome, Kind regards, Jasper Van der Jeugt ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Why is toRational a method of Real?
On Wed, 4 Aug 2010, John Meacham wrote: The numeric classes are sort of messed up when it comes to non integral values. (not that they are perfect for other things) for instance, realToFrac doesn't preserve NaN or Infinity, Why should realToFrac do this? NaN, Infinity and +/-0 are IEEE hacks for the common numerical applications you do with floating point numbers. These special values could be supported by floating point specific, or even IEEE specific type classes, but they should not be part of mathematically motivated type classes . and the rounding functions discard information too by trying to convert a floating point value to an integral one... What else shall a rounding function return if not integers? I was probably going to introduce a 'FloatMax' type in jhc that is guarenteed to be able to represent all values representable by native floating point types, then replace the use of Rational as an intermediate type with it.. not that that helps things right now really. Integer and Rational represent all possible integers and rationals, respectively, apart from memory restrictions. They are not very efficient, but that's why GHC's optimizer rules replace common conversions by more efficient conversions. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Why is toRational a method of Real?
On Thu, Aug 5, 2010 at 11:35 AM, Henning Thielemann lemm...@henning-thielemann.de wrote: What else shall a rounding function return if not integers? Getting from 29.84645 to 29.85 isn't rounding ? David. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Why is toRational a method of Real?
Henning Thielemann lemm...@henning-thielemann.de writes: On Wed, 4 Aug 2010, John Meacham wrote: and the rounding functions discard information too by trying to convert a floating point value to an integral one... What else shall a rounding function return if not integers? Some people may wish to a certain number of decimal places instead. -- Ivan Lazar Miljenovic ivan.miljeno...@gmail.com IvanMiljenovic.wordpress.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Why is toRational a method of Real?
On 05.08.2010 13:35, Henning Thielemann wrote: On Wed, 4 Aug 2010, John Meacham wrote: The numeric classes are sort of messed up when it comes to non integral values. (not that they are perfect for other things) for instance, realToFrac doesn't preserve NaN or Infinity, Why should realToFrac do this? NaN, Infinity and +/-0 are IEEE hacks for the common numerical applications you do with floating point numbers. These special values could be supported by floating point specific, or even IEEE specific type classes, but they should not be part of mathematically motivated type classes . But they are. isNaN, isInfinite, isNegativeZero are all members of RealFloat type class and there is no generic for type conversion which conserves NaNs. Numeric type classes are really messed up. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Playing with ATs again
Andrew Coppin andrewcop...@btinternet.com writes: Well *I* didn't say that anything was dumb. I was merely pointing out that the much-touched do it yourself benefit of OSS is actually out of most people's reach. There surely can't be many people alive on Earth who actually understand type theory, and far fewer who understand it well enough to meddle with something as astonishingly complex as GHC. So really, there's little or no chance of anybody except the GHC devs fixing this. (If nothing else, the learning curve is pretty much vertical just to fix this one minor problem.) Yes, but on the other hand people shouldn't complain that said clever devs haven't done something if they're not smart enough to know if it's possible to do so or not. On the one hand, it's nice that we have a freely available compiler at all. (And it's one of the best pieces of Haskell software I've seen to date.) On the other hand, I've seen too many people who write open-source software answer every query and issue simply with patches welcome. As if that's a magic bullet to solve every problem and deficiency. There needs to be a reasonable balance. Well, if I write software for free as a hobby and you want some feature added to my package which doesn't interest me enough to write myself (or I don't have time to do so), then if you really want it why don't you write it yourself? I think the best and most polished package I'm responsible for is graphviz, and I started off with that by submitting a patch to Matthew Sackman to add clustering support to it because I wanted such support. Of course, people might not be able to add such functionality themselves because they don't know how to do so (and even just saying patches welcome on its lonesome is a bit rude/blunt), but I have no problem with asking people to assist in developing a feature they really want to something I maintain (the record label support now in graphviz is kind of a case in point: someone asked me if I could add it in, I said I was busy to do so at the time but offered to help them how to do so and sketched out how to do so; in the end they weren't able to do so and when I had time I added it in). TL;DR: just because a library is freely available doesn't mean the maintainer will go and willingly implement every single little feature you want for no reason. It's a two-way street. -- Ivan Lazar Miljenovic ivan.miljeno...@gmail.com IvanMiljenovic.wordpress.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Why is toRational a method of Real?
David Virebayre dav.vire+hask...@gmail.com writes: On Thu, Aug 5, 2010 at 11:35 AM, Henning Thielemann lemm...@henning-thielemann.de wrote: What else shall a rounding function return if not integers? Getting from 29.84645 to 29.85 isn't rounding ? Yes it is: http://en.wikipedia.org/wiki/Rounding Usually, however, we often just want to round something to an integral value. -- Ivan Lazar Miljenovic ivan.miljeno...@gmail.com IvanMiljenovic.wordpress.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Playing with ATs again
On Wed, Aug 4, 2010 at 11:55 PM, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: On 5 August 2010 16:48, Gregory Crosswhite gcr...@phys.washington.edu wrote: On 8/4/10 11:40 PM, Andrew Coppin wrote: Ivan Lazar Miljenovic wrote: Don't forget, GHC is open source: if this lack really was dumb and annoying you, there was nothing stopping you from rectifying this situation up until now. Except that, in the real world, this is actually completely infeasible. Yes, I know it's the basic tenant of OSS that you can modify the program to do whatever you want. But in reality, something like GHC is far too large and complex for this to be a realistic possibility. And this holds for most other nontrivial software too. Fair enough, but if one can't do better one's self then one should be careful about calling the work of others dumb, which was the original point. Exactly. Either do it yourself or be grateful that someone has done _something_, even if it isn't as good as you like. It's not like you're paying for it... My bad, no offense was meant, and perhaps I should choose my words better. I've read Manuel's papers and worked with Simon, and they're both very smart people. I wasn't commenting at all on the quality of their implementation, but rather trying to make the point that it's really a bug that it doesn't work, and, AFAIK, a bug that is going to be fixed. I think everyone can relate to the frustration that occurs when you are surprised by a feature being missing. I actually think it's a testament to the quality of GHC that things just work so often that I can be so surprised when they don't. -- ryan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Why is toRational a method of Real?
Yes, for instance to be able to use functions as number. Or to be able to use constructive real numbers as numbers, since equality is not computable. -- Lennart On Thu, Aug 5, 2010 at 4:17 AM, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: On 5 August 2010 10:15, Lennart Augustsson lenn...@augustsson.net wrote: You're right. It's bad to have toRational in Real. It's also bad to have Show and Eq as superclasses to Num. I understand why it's bad to have Show as a superclass, but why Eq? Because it stops you from using functions as numbers, etc. ? -- Ivan Lazar Miljenovic ivan.miljeno...@gmail.com IvanMiljenovic.wordpress.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] subversion with haskell
hackage contains a package Hs2SVN HsSVN seems to do what i need, but unfortunately, i cannot install it - i have the error : checking for stdint.h... yes checking for unistd.h... yes checking svn_error.h usability... no checking svn_error.h presence... no checking for svn_error.h... no configure: error: SVN headers are required. Hint: EXTRA_CPPFLAGS cabal: Error: some packages failed to install: HsSVN-0.4.3 failed during the configure step. The exception was: ExitFailure 1 i installed all development packages i could see related to svn - which one is really needed? can you clarify and point me in the right direction? (and put the information in the package cabal file so it is copied to hackage) thank you andrew ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] can Haskell do everyting as we want?
On 4 August 2010 21:21, Jason Dagit da...@codersbase.com wrote: Is scion still being developed? I have the impression it's dead now. Really a shame, I think it has a good solid design and just needs work/polish. It is: http://github.com/nominolo/scion/network I changed the architecture to use separate processes (I tried to hold it off, but in the end it was necessary). I hope that this will make a few things easier. The other issue is time of course. Also JP has been adding some features in his Scion branch for EclipseFP. The plan is to merge that back eventually. / Thomas ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] packages on hackage: how to download files which are not included in the darcs inventory
i try to use jsmw. i see that there are multiple example files in a directory. this directory is not included in darcs and does not download automatically. is there an easy way to download directories (i can get the files individually with curl - but this is slow and errorprone)? help is appreciated! andrew ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] packages on hackage: how to download files which are not included in the darcs inventory
Andrew U. Frank fran...@geoinfo.tuwien.ac.at writes: i try to use jsmw. i see that there are multiple example files in a directory. this directory is not included in darcs and does not download automatically. is there an easy way to download directories (i can get the files individually with curl - but this is slow and errorprone)? http://code.haskell.org/yc2js/examples/ (using wget, curl or the down-them-all extension for firefox) ? -- Ivan Lazar Miljenovic ivan.miljeno...@gmail.com IvanMiljenovic.wordpress.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Why is toRational a method of Real?
On Thu, 5 Aug 2010, David Virebayre wrote: On Thu, Aug 5, 2010 at 11:35 AM, Henning Thielemann lemm...@henning-thielemann.de wrote: What else shall a rounding function return if not integers? Getting from 29.84645 to 29.85 isn't rounding ? Sure, it is, I missed that. Maybe such rounding functions are not provided in Prelude because, say, rounding to a certain number of decimal places cannot be computed exactly with binary floating point numbers. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Why is toRational a method of Real?
On Thu, Aug 05, 2010 at 11:35:04AM +0200, Henning Thielemann wrote: Why should realToFrac do this? NaN, Infinity and +/-0 are IEEE hacks for the common numerical applications you do with floating point numbers. These special values could be supported by floating point specific, or even IEEE specific type classes, but they should not be part of mathematically motivated type classes . Because IEEE floating point values are both extremely useful in practice and generally map exactly onto the underlying hardware implementation. Proper support for them is very useful and allows an efficient implementation of the language. and the rounding functions discard information too by trying to convert a floating point value to an integral one... What else shall a rounding function return if not integers? The same type that was passed in, round NaN should be NaN for instance, and they should be implementable by the underlying hardware primitive. the rounding functions have IEEE specified behavior but the current classes inhibit actually implementing them properly. I was probably going to introduce a 'FloatMax' type in jhc that is guarenteed to be able to represent all values representable by native floating point types, then replace the use of Rational as an intermediate type with it.. not that that helps things right now really. Integer and Rational represent all possible integers and rationals, respectively, apart from memory restrictions. They are not very efficient, but that's why GHC's optimizer rules replace common conversions by more efficient conversions. But the problem is that it doesn't replace them with more efficient conversions, it replaces them with code that behaves differently, whether a RULE fires can dramatically affect the behavior of code, this is because the functions specified by the haskell report don't actually map to the fast hardware primitives we want to use and have available to use. This isn't to say ghc is doing the wrong thing, I don't think there really is a right thing to do here given the broken class specifications in the report. John -- John Meacham - ⑆repetae.net⑆john⑈ - http://notanumber.net/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] subversion with haskell
Hi, As reported by the configure script, file svn_error.h is missing. It presence in latest svn api (http://subversion.apache.org/docs/api/latest/svn__error_8h.html) It can be installed in some unusual location, you can try find / -name svn_error.h If you are using debian based system, you can try apt-file to find the correspondent package. 2010/8/5 Andrew U. Frank fran...@geoinfo.tuwien.ac.at: hackage contains a package Hs2SVN HsSVN seems to do what i need, but unfortunately, i cannot install it - i have the error : checking for stdint.h... yes checking for unistd.h... yes checking svn_error.h usability... no checking svn_error.h presence... no checking for svn_error.h... no configure: error: SVN headers are required. Hint: EXTRA_CPPFLAGS cabal: Error: some packages failed to install: HsSVN-0.4.3 failed during the configure step. The exception was: ExitFailure 1 i installed all development packages i could see related to svn - which one is really needed? can you clarify and point me in the right direction? (and put the information in the package cabal file so it is copied to hackage) thank you andrew ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Problem with System.Timeout in Windows
I tried your example on 6.12.3 and it worked fine for me (Windows 7). Ryan Yates On Thu, Aug 5, 2010 at 1:35 AM, Adolfo Builes builes.ado...@googlemail.comwrote: Hi All: I have been trying to use System.timeout in windows, but for some reason it doesn't work, a concrete example is: import Network.HTTP import System.Timeout main = do rsp - timeout 1000 $ simpleHTTP $ getRequest http://10.1.2.3; case rsp of Just rsp - print $ show rsp Nothing - error Nothing In this case I would expect to receive Nothing after 10 seconds, but it ignores the timeout function. I'm compiling with -threaded, but it does not work either, I'm using ghc 6.12.2. Does someone know what could be going wrong ? Thanks ! ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Why is toRational a method of Real?
On Thu, Aug 5, 2010 at 1:11 PM, John Meacham j...@repetae.net wrote: use. This isn't to say ghc is doing the wrong thing, I don't think there really is a right thing to do here given the broken class specifications in the report. I often read that the numerical classes are problematic. At the same time, there are many programs and packages that rely on Haskell being that way. What would it take to redesign the numeric class so that the new design eventually becomes the new Haskell standard ? ( not just an alternative prelude ) Is it doable at all ? Would a first step be trying to compile all of hackage with the numeric prelude and see what breaks ? If it's doable, how many years would it take to make it happen ? Just curious. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANN: blaze-builder 0.1
Sweet! =) About the 'binary' package, does it speed up if you dump its own Data.Binary.Builder and use the blaze builder? Does it stay with the same performance? Thanks for working on blaze! -- Felipe. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Why is toRational a method of Real?
On Thu, 5 Aug 2010, David Virebayre wrote: On Thu, Aug 5, 2010 at 1:11 PM, John Meacham j...@repetae.net wrote: use. This isn't to say ghc is doing the wrong thing, I don't think there really is a right thing to do here given the broken class specifications in the report. I often read that the numerical classes are problematic. At the same time, there are many programs and packages that rely on Haskell being that way. I think the numeric type classes of Haskell 98 are better than the way of handling numbers in most other existing languages. They are ok for the applications that do not need polymorphic numeric types. What would it take to redesign the numeric class so that the new design eventually becomes the new Haskell standard ? ( not just an alternative prelude ) Is it doable at all ? Would a first step be trying to compile all of hackage with the numeric prelude and see what breaks ? Almost nothing would compile, because the organization is too different, not to speak of the more mathematically oriented names of the classes. If it's doable, how many years would it take to make it happen ? All functions that use polymorphic numeric types would have to be adapted. However it would be a great test case for a refactoring tool! It's even worse: The NumericPrelude is in progress, certainly currently better than Haskell 98's type classes, but there are known problems. Sometimes new numeric types are implemented and require to refine or restructure the classes, again. And there are not only problems with the numeric type classes, think of Functor, Applicative, Monad, and so on. In my opinion before trying to move to an improved numerical type hierarchy we should have class aliases designed, implemented and thoroughly tested in GHC. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Why is toRational a method of Real?
On Thu, Aug 5, 2010 at 1:55 PM, Henning Thielemann lemm...@henning-thielemann.de wrote: It's even worse: The NumericPrelude is in progress, certainly currently better than Haskell 98's type classes, but there are known problems. Sometimes new numeric types are implemented and require to refine or restructure the classes, again. And there are not only problems with the numeric type classes, think of Functor, Applicative, Monad, and so on. In my opinion before trying to move to an improved numerical type hierarchy we should have class aliases designed, implemented and thoroughly tested in GHC. It's sad because the class alias proposal was dropped from Haskell' two years ago, isn't it ? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: [web-devel] statically compiled css
On Thu, Aug 5, 2010 at 11:33 PM, Mark Bradley barkmad...@gmail.com wrote: but CSS type checking might be possible within hamlet. I have often wondered OK haml implemented now what about sass. Michael Snoyman what is your opinions on sass? Would a sass inspired syntax like you did with the haml-hamlet fit in well and if so, as it often best to keep styles separate, could a quasi quoted language live in in a separate haskell module and then at run time it recreates the separate css files on first launch? Thanks Tim Matthews ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Why is toRational a method of Real?
On Thu, 5 Aug 2010, David Virebayre wrote: It's sad because the class alias proposal was dropped from Haskell' two years ago, isn't it ? I don't know, but I think before an extension can go into Haskell' it should be at least implemented somewhere. (Is it implemented in JHC at all?) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Why is toRational a method of Real?
It's sad because the class alias proposal was dropped from Haskell' two years ago, isn't it ?Haskell' is an ongoing process of language revision. ClassAliases did not get into Haskell 2010, but it could certainly be adopted in 2011 or 2012, if there were consensus support for it. Usually, proposals also need to have been implemented in practice in at least one compiler, to demonstrate their feasibility (that compiler need not always be ghc :-).Here is the haskell' ticket for ClassAliases: http://hackage.haskell.org/trac/haskell-prime/ticket/101And John Meacham's detailed proposal: http://repetae.net/recent/out/classalias.html ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: [web-devel] statically compiled css
On Thu, Aug 5, 2010 at 9:41 AM, Tim Matthews tim.matthe...@gmail.com wrote: I have often wondered OK haml implemented now what about sass. Michael Snoyman what is your opinions on sass? Would a sass inspired syntax like you did with the haml-hamlet fit in well and if so, as it often best to keep styles separate, could a quasi quoted language live in in a separate haskell module and then at run time it recreates the separate css files on first launch? A wholly statically-verified-by-the-compiler Web framework?! We are going to avoid success at all costs even more, I'd say. ;-) Cheers! -- Felipe. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Playing with ATs again
On Thu, Aug 5, 2010 at 7:18 AM, Ryan Ingram ryani.s...@gmail.com wrote: I actually think it's a testament to the quality of GHC that things just work so often that I can be so surprised when they don't. Well said. That's the feeling most Haskellers have, and that's part of the awesomeness of programming with Haskell. Cheers! -- Felipe. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: [web-devel] statically compiled css
On Thu, Aug 5, 2010 at 3:41 PM, Tim Matthews tim.matthe...@gmail.comwrote: On Thu, Aug 5, 2010 at 11:33 PM, Mark Bradley barkmad...@gmail.comwrote: but CSS type checking might be possible within hamlet. I have often wondered OK haml implemented now what about sass. Michael Snoyman what is your opinions on sass? Would a sass inspired syntax like you did with the haml-hamlet fit in well and if so, as it often best to keep styles separate, could a quasi quoted language live in in a separate haskell module and then at run time it recreates the separate css files on first launch? Tim and Mark, Firstly, let me come clean about something: I got really lucky with Hamlet ;). I'd never used Haml before, and was planning on writing a templating system. I saw the Haml syntax, thought it might be easy to implement, and everything turned out for the best. (Actually, first I thought of the name Hamlet and then decided I *had* to base my templating system on a Haml syntax, but that's beside the point ;)). Anyway, regarding sass: I have no idea. I've never used it, and have looked at it even less than I had looked at Haml. It has always seemed like it didn't give enough bang-for-the-buck versus plain CSS, but if we can get static typing out of it, that it's *definitely* worth it. So the real question: how can we get static typing for CSS? And more importantly, what would that mean? It seems that it really applies to specifically two issues: ids and class names. Perhaps the right approach here is to allow Yesod to generate these names automatically; given the Widget framework, something along the lines of: myWidget = do className - newIdent -- yes, addStyle currently uses Hamlet templates, with the release of blaze-builder, that will probably change addStyle [$hamlet|p.$className${color:red}|] addBody [$hamlet|%p.$className$ Red Text|] There's also the approach of having a datatype for the CSS classes: data MyClassNames = Red myWidget = do addStyle [$hamlet|p.$Red${color:red}|] addBody [$hamlet|%p.$Red$ Red Text|] Or if we decide to create a sass quasi-quoter: data MyClassNames = Red myWidget = do addStyle [$sass| whatever this looks like |] addBody [$hamlet|%p.$Red$ Red Text|] This is really just a random collection of thoughts I have on the topic, I haven't really thought anything out fully. Michael ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Preview the new haddock look and take a short survey
On Wed, 4 Aug 2010, Mark Lentczner wrote: The Haddock team has spent the last few months revamping the look of the generated output. We're pretty close to done, but we'd like to get the community's input before we put it in the main release. Please take a look, and then give us your feedback through a short survey Sample pages: http://www.ozonehouse.com/mark/snap-xhtml/index.html Frame version: http://www.ozonehouse.com/mark/snap-xhtml/frames.html One thing I haven't seen anyone else comment on is the width of the new docs. I have a large (26) monitor and use the browser full-screen (with xmonad, so even more screen space). When I load these pages, particularly the non-frame one, something like 50% of my screen real-estate is empty whitespace on either side of the doc content. There is also wasted space in the frames version, just a little less of it. I wish the docs were using that space like the current Haddock does. Is the plan to use a fixed width like this? Please say no, it's a disappointing trend that you see everywhere. Like Twitter's web interface, for instance, very narrow. -- Dino Morelli email: d...@ui3.info web: http://ui3.info/d/ irc: dino- pubkey: http://ui3.info/d/dino-4AA4F02D-pub.gpg twitter: dino8352 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Preview the new haddock look and take a short survey
On Thu, Aug 5, 2010 at 3:35 PM, Dino Morelli d...@ui3.info wrote: On Wed, 4 Aug 2010, Mark Lentczner wrote: The Haddock team has spent the last few months revamping the look of the generated output. We're pretty close to done, but we'd like to get the community's input before we put it in the main release. Please take a look, and then give us your feedback through a short survey Sample pages: http://www.ozonehouse.com/mark/snap-xhtml/index.html Frame version: http://www.ozonehouse.com/mark/snap-xhtml/frames.html One thing I haven't seen anyone else comment on is the width of the new docs. I have a large (26) monitor and use the browser full-screen (with xmonad, so even more screen space). When I load these pages, particularly the non-frame one, something like 50% of my screen real-estate is empty whitespace on either side of the doc content. There is also wasted space in the frames version, just a little less of it. I wish the docs were using that space like the current Haddock does. Is the plan to use a fixed width like this? Yes. There's research suggesting that the line length should be between 65 and 75 characters per line. http://psychology.wichita.edu/surl/usabilitynews/42/text_length.htm ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] can Haskell do everyting as we want?
David Leimbach wrote: On Wed, Aug 4, 2010 at 3:16 AM, Alberto G. Corona agocor...@gmail.comwrote: Just to clarify, I mean: Haskell may be seriously addictive. Sounds like a joke, but it is not. I do not recommend it for coding something quick and dirty. I use it for quick and dirty stuff all the time, mainly because what I want is often something that can be broken down into stages of processing, and pure functions are really nice for that. If I know the input is coming from a reliable enough stream (like a unix pipe to stdin) I can use functions like interact to create filters, or parse some input, and produce some output. It's pretty nice. I may be mistaken (in which case, I'm sorry for putting words in his mouth) but I understood what he was saying not as that Haskell is not suited for quick and dirty projects, but rather that Haskell for small projects could be a dangerous gateway drug that could seriously impact one's ability to continue to enjoy working in other languages. -- James ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Preview the new haddock look and take a short survey
On Thu, Aug 5, 2010 at 10:48 AM, Johan Tibell johan.tib...@gmail.com wrote: One thing I haven't seen anyone else comment on is the width of the new docs. I have a large (26) monitor and use the browser full-screen (with xmonad, so even more screen space). When I load these pages, particularly the non-frame one, something like 50% of my screen real-estate is empty whitespace on either side of the doc content. There is also wasted space in the frames version, just a little less of it. I wish the docs were using that space like the current Haddock does. Is the plan to use a fixed width like this? Yes. There's research suggesting that the line length should be between 65 and 75 characters per line. http://psychology.wichita.edu/surl/usabilitynews/42/text_length.htm Perhaps on large monitors the Synopsis could auto-open to use the available space? My 2 cents, ;) -- Felipe. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: [web-devel] statically compiled css
On Thu, Aug 5, 2010 at 3:51 PM, Felipe Lessa felipe.le...@gmail.com wrote: On Thu, Aug 5, 2010 at 9:41 AM, Tim Matthews tim.matthe...@gmail.com wrote: I have often wondered OK haml implemented now what about sass. Michael Snoyman what is your opinions on sass? Would a sass inspired syntax like you did with the haml-hamlet fit in well and if so, as it often best to keep styles separate, could a quasi quoted language live in in a separate haskell module and then at run time it recreates the separate css files on first launch? A wholly statically-verified-by-the-compiler Web framework?! We are going to avoid success at all costs even more, I'd say. ;-) I hope you mean *fail* to avoid success at all costs ;) Michael ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] real-time audio processing [Was: can Haskell do everyting as we want?]
Yeah Atom is pretty slick, though unfortunately it's not quite powerful enough for much of the stuff that we do. John Van Enk and I are actually working on a language that's similar to C (and compiles to C), but has polymorphism, type inference and other goodies. The goal is to make working on embedded systems a bit less painful, while still being able to do anything that C can do (like run on an 8 bit micro). Hopfully, if things go as planned, we'll have a working beta out by the end of the month :) - Job On Wed, Aug 4, 2010 at 5:58 PM, Don Stewart d...@galois.com wrote: job.vranish: + 1 This is probably the biggest obstacle to using Haskell where I work. (Aviation industry, software for flight management systems for airplanes) We often need to perform some computations with hard deadlines, say every 20ms, with very little jitter. Major GC's spoil the fun; It's quite easy to have a major GC take longer than 20ms, and currently they are not pauseable (nor is it trivial to make them so). It would be very nice to have some annotation/DSL/compiler-flag that would let me run a small block of mostly regular haskell code under hard, real-time constraints. Hmm, it looks like the HASP project is working on some of this, though I'm not sure how portable their work is back to GHC: http://hasp.cs.pdx.edu/ Or look at EDSLs, like Atom: http://hackage.haskell.org/package/atom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Preview the new haddock look and take a short survey
On Thu, 5 Aug 2010, Johan Tibell wrote: On Thu, Aug 5, 2010 at 3:35 PM, Dino Morelli d...@ui3.info wrote: One thing I haven't seen anyone else comment on is the width of the new docs. I have a large (26) monitor and use the browser full-screen (with xmonad, so even more screen space). When I load these pages, particularly the non-frame one, something like 50% of my screen real-estate is empty whitespace on either side of the doc content. There is also wasted space in the frames version, just a little less of it. I wish the docs were using that space like the current Haddock does. Is the plan to use a fixed width like this? Yes. There's research suggesting that the line length should be between 65 and 75 characters per line. I understand, I've read that too in the context of publishing with long paragraph style material. But I think the majority of generated programming API docs are not done with fixed width. Here are several examples: JavaDoc at Sun: http://download.oracle.com/javase/7/docs/api/ Scala API docs, very recently redesigned for 2.8.x: http://www.scala-lang.org/api/current/index.html Google Android API docs: http://developer.android.com/reference/packages.html Erlang docs: http://www.erlang.org/doc/ Microsoft F# lang and API docs: http://msdn.microsoft.com/library/dd233154%28VS.100%29.aspx The Python Standard Library: http://docs.python.org/library/ Ruby-doc: http://www.ruby-doc.org/core/ I did find one that uses fixed width though, this Perl5 documentation site: http://perldoc.perl.org/perlapi.html -- Dino Morelli email: d...@ui3.info web: http://ui3.info/d/ irc: dino- pubkey: http://ui3.info/d/dino-4AA4F02D-pub.gpg twitter: dino8352___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANNOUNCE: DSTM 0.1.1
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 8/5/10 00:47 , Gregory Crosswhite wrote: The documentation is a little confusing on this issue. It sounded to me when I read the documentation that all of the *OS* threads were blocked by the FFI, when what was meant was that all of the *IO* threads assigned to the calling OS thread are what is blocked, because the docs just say that threads are blocked without being clear that they are only referring to a particular subset of the threads. To be fair, until relatively recently (6.8? 6.6?) there wasn't a difference; the docs are out of date, not incomplete. - -- brandon s. allbery [linux,solaris,freebsd,perl] allb...@kf8nh.com system administrator [openafs,heimdal,too many hats] allb...@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.10 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkxa0C0ACgkQIn7hlCsL25V+xACgoINpPvqWAsXXfqJqN8PfjzCw NVMAoNbCMShzmm8mi8T8niWy18pLanJu =G9AH -END PGP SIGNATURE- ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] hGetContents: resource exhausted
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 8/5/10 03:47 , Lally Singh wrote: Sadly that just gets me far enough to Setup +RTS -V0 -RTS build, which runs ghc, which then dies from the same signal problem :-( export GHCRTS=-V0 However, I don't think that's a permanent solution. - -- brandon s. allbery [linux,solaris,freebsd,perl] allb...@kf8nh.com system administrator [openafs,heimdal,too many hats] allb...@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.10 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkxa0zUACgkQIn7hlCsL25Vo0QCghmstJwsJNnPgFSEajWKqC/K2 /vMAoJ24hBOhbktVWYC3Zriztv4pM0mj =miDR -END PGP SIGNATURE- ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] hGetContents: resource exhausted
Quoth Lally Singh lally.si...@gmail.com, ... That fixed the signal problem! Sadly that just gets me far enough to Setup +RTS -V0 -RTS build, which runs ghc, which then dies from the same signal problem :-( Well, yeah - a solution it is not, but we sure know a lot about the problem now. Your ghc is fundamentally broken - hGetContents, a very commonly used base library function, can't survive the runtime's own timer signals. Obviously this doesn't happen for other users, maybe even on OpenSolaris? I'm sure someone has a clue how this could happen. Donn Cave, d...@avvanta.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Why is toRational a method of Real?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 8/5/10 05:47 , David Virebayre wrote: On Thu, Aug 5, 2010 at 11:35 AM, Henning Thielemann lemm...@henning-thielemann.de wrote: What else shall a rounding function return if not integers? Getting from 29.84645 to 29.85 isn't rounding ? It is, but it's also easy to achieve given round-to-integer. - -- brandon s. allbery [linux,solaris,freebsd,perl] allb...@kf8nh.com system administrator [openafs,heimdal,too many hats] allb...@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.10 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkxa1j0ACgkQIn7hlCsL25UKfQCggmZID1fCQ6VuqysRp4eAGtk2 K8MAmwWstczYxKVEQzDUZghXTy8aMkYM =f4L6 -END PGP SIGNATURE- ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
OT Re: [Haskell-cafe] Preview the new haddock look and take a short survey
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 8/5/10 09:35 , Dino Morelli wrote: Please say no, it's a disappointing trend that you see everywhere. Like Twitter's web interface, for instance, very narrow. Twitter's web interface isn't really intended for serious use, IMO. Tweetdeck for desktops, tweetgrid/hootsuite/etc. for browser based. - -- brandon s. allbery [linux,solaris,freebsd,perl] allb...@kf8nh.com system administrator [openafs,heimdal,too many hats] allb...@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.10 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkxa2PgACgkQIn7hlCsL25UUtACggsp0tOxK9GqPU6qZYunpuFq0 egEAoKjqmjOGlCgkVJTGHE98MX9+HvoZ =PhUs -END PGP SIGNATURE- ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANNOUNCE: DSTM 0.1.1
Fair enough; I was not complaining so much as pointing out that the exact manner in which Haskell threads interact with the FFI is not obvious (as you described it) given that the documentation is confusing. Should I file a bug report to request that the documentation be updated? Cheers, Greg On 8/5/10 7:52 AM, Brandon S Allbery KF8NH wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 8/5/10 00:47 , Gregory Crosswhite wrote: The documentation is a little confusing on this issue. It sounded to me when I read the documentation that all of the *OS* threads were blocked by the FFI, when what was meant was that all of the *IO* threads assigned to the calling OS thread are what is blocked, because the docs just say that threads are blocked without being clear that they are only referring to a particular subset of the threads. To be fair, until relatively recently (6.8? 6.6?) there wasn't a difference; the docs are out of date, not incomplete. - -- brandon s. allbery [linux,solaris,freebsd,perl] allb...@kf8nh.com system administrator [openafs,heimdal,too many hats] allb...@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.10 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkxa0C0ACgkQIn7hlCsL25V+xACgoINpPvqWAsXXfqJqN8PfjzCw NVMAoNbCMShzmm8mi8T8niWy18pLanJu =G9AH -END PGP SIGNATURE- ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] hsb2hs preprocessor looking for a maintainer
Hi Max, I believe the main reason why ghci isn't available on all platforms is the dynamic linker. I don't think it would be easy (or even feasible) to switch to something like 'ld', though. Some serious problems can be solve this way. This one is a nice example: http://hackage.haskell.org/trac/ghc/ticket/2615 I like the way GHC abstracted from foreign function call interface via libffi. It works on everything where i tried GHC. Would be nice to have exactly the same thing for ELF(and more) loader. AFAIK the current linker is meant to support Mach O, ELF and COFF, which should cover almost every platform GHC is able to run on. Now, it's not ideal that GHC maintains its own dynamic linker implementation, but if someone has discovered a bugs with it (or any other bug preventing TH from working) I'm sure GHC HQ would be interested in knowing. Unfortunately, GHC itself not just 'dlopen's shared objects. It loads them by pieces manually setting up relocations (see makeSymbolExtra by link below). Each operating system on certaion $ARCH defines it's own ELF spec, which consists of two parts: 1. common part. platform agnostic (byte sex, byte width, symbol string table, section flags, dynamic section attributes and etc.) 2. platform dependant. certain section types, such as TOC sections (ppc64), are implemented to solve some certain architecture constraints. You cannot program them in advance. $ grep PPC64 /usr/include/elf.h will show way more fun things to be implemented for perfect .so support. The best thing to make sure is to look at the real support for ELF in ghci: Please, look at file ghc/rtc/Linker.c and function do_Elf_Rela_relocations() http://darcs.haskell.org/cgi-bin/darcsweb.cgi?r=ghc;a=headblob;f=/rts/Linker.c Conclusion: having ELF aware system is not enough to have ghci support in any form. Practically, current gentoo supports ghci on: i386, amd64, ppc32, sparc(i'm unsure) and does not support it on: alpha, ia64, ppc64 Ideally, GHC (and haddock as a result) should support 'ghci'less template-haskell support at least on platforms w/o ghci. Or alternatively haddock could be buildable on 'ghci'less GHC. It could ignore template-haskell statements (anyway you will not be able to build 'TH'ful source on such platform) -- Sergei signature.asc Description: PGP signature ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Handling absent maintainers
On Thu, Aug 5, 2010 at 5:07 AM, Erik de Castro Lopo mle...@mega-nerd.com wrote: The permissiveness of hackage uploads suggests that Hackage needs to start using something like GPG signing and GPG webs of trust. The Debian project has stuff like this in place and I'm sure this community could learn a lot from what Debian is currently using. Erik It's worth mentioning that Hackage accounts aren't just given out for free - one has to specifically request them, and they can presumably just as easily be revoked. Thanks Mark, I'll request a Hackage account within the next couple of days and then make the upload. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Handling absent maintainers
On Thu, Aug 5, 2010 at 6:38 PM, Ben Millwood hask...@benmachine.co.uk wrote: It's worth mentioning that Hackage accounts aren't just given out for free - one has to specifically request them Er, to clarify, I mean signup can't be automated, because account creation is done by a human. Not that hackage charges for accounts or something. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Problem with System.Timeout in Windows
Am 05.08.2010 07:35 schrieb Adolfo Builes: Hi All: I have been trying to use System.timeout in windows, but for some reason it doesn't work, a concrete example is: import Network.HTTP import System.Timeout main = do rsp - timeout 1000 $ simpleHTTP $ getRequest http://10.1.2.3; case rsp of Just rsp - print $ show rsp Nothing - error Nothing In this case I would expect to receive Nothing after 10 seconds, but it ignores the timeout function. Hi Adolfo, the same behaviour for me with GHC 6.10.4 on Windows XP. If I set the timeout value to 0, I get *** Exception: Nothing immediately. Any other value results in *** Exception: connect: failed (Connection timed out (WSAETIMEDOUT)) after about 20 seconds. I don't know where the problem is, but I have similar problems with the threadDelay function. There must be something broken somewhere for some windows systems. Regards, Matthias ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Why do unsafe foreign calls block other threads?
John Meacham wrote: 'reentrant' and 'blocking' which could be specified independently would be better and would be more future-proof against changes in the RTS or between compilers. +1. Perhaps we should propose it to the haskell' committee. -- Live well, ~wren ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Why do unsafe foreign calls block other threads?
On 2010-08-03 15:23 -0700, John Meacham wrote: It is more an accident of ghc's design than anything, the same mechanism that allowed threads to call back into the runtime also allowed them to be non blocking so the previously used 'safe' and 'unsafe' terms got re-used. personally, I really don't like those terms, they are non-descriptive in terms of what they actually mean and presuppose a RTS similar to ghcs current design. 'reentrant' and 'blocking' which could be specified independently would be better and would be more future-proof against changes in the RTS or between compilers. I thought safe meant the foreign function is allowed to call Haskell functions, which seems to not have anything to do with whether the function is re-entrant (a very strong condition). -- Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Wildly off-topic: de Boor's algorithm
mo...@deepbondi.net wrote: Andrew Coppin wrote: Given a suitable definition for Vector2 (i.e., a 2D vector with the appropriate classes), it is delightfully trivial to implement de Casteljau's algorithm: de_Casteljau :: Scalar - [Vector2] - [[Vector2]] de_Casteljau t [p] = [[p]] de_Casteljau t ps = ps : de_Casteljau t (zipWith (line t) ps (tail ps)) line :: Scalar - Vector2 - Vector2 - Vector2 line t a b = (1-t) *| a + t *| b Now, de Boor's algorithm is a generalisation of de Casteljau's algorithm. It draws B-splines instead of Bezier-splines (since B-splines generalise Bezier-splines). But I think I may have ACTUALLY MELTED MY BRAIN attempting to comprehend it. Can anybody supply a straightforward Haskell implementation? It took me a while to get around to it, and another while to work it out, but here's what I've come up with. OK, cool. First, here's a restatement of your code with a concrete choice of types (using Data.VectorSpace from the vector-space package) My types *are* concrete. They're from AC-Vector. ;-) To generalize to De Boor's algorithm, the primary change is the interpolation operation. In De Casteljau's algorithm, every interpolation is over the same fixed interval 0 = x = 1. For De Boor's algorithm we need a more general linear interpolation on the arbitrary interval [x0,x1], because all the interpolations in De Boor's recurrence are between pairs of knots, which have arbitrary values instead of just 0 or 1. Right. That's basically what I figured. I'm having trouble wrapping my brain about the exact relationship between the number of control points, the number of knots, the degree of the spline, which knots and control points are active at a given parameter value, etc. There seems to be an utterly *huge* avenue for off-by-one errors here. Because of Haskell's laziness, we can also take care of searching the result table for the correct set of control points at the same time, just by clamping the input to the desired interval and pre-emptively returning the corresponding 'y' if the input is outside that interval. This way, to find the final interpolant we only need to go to the end of the table, as in 'deCasteljau'. Unlike 'deCasteljau', only a portion of the table is actually computed (a triangular portion with the active control points as base and a path from the vertex of the triangle to the final entry in the table). Right. Because only a subset of the control points affect a given region of spline. (That's what makes B-splines superior, after all...) Computing the table is now nearly as straightforward as in De Casteljau's algorithm: deBoor p _ [] x = [] deBoor p (_:us) ds x = ds : deBoor (p-1) us ds' x where ds' = zipWith (interp x) (spans p us) (spans 1 ds) Making use of a simple list function to select the spans: spans n xs = zip xs (drop n xs) Don't you need an uncurry in there? Or am I missing something? Note that the algorithm does not make use of @us!!0@ at all. Yeah, that's the killer, isn't it? Figuring out exactly which combination of list function you need to pipe the correct values to the right places. (You might remember be asking about expression dye for this exact reason...) I believe this is correct, based both on the Wikipedia description of the algorithm and the implementations I've seen. Heh, prove it. ;-) (I guess just go draw some splines and see if they look... spliney.) De Boor's recurrence seems to require an irrelevant choice of extra control point that would be, notionally, @ds!!(-1)@. This control point has no actual influence inside the domain of the spline, although it /can/ affect values outside the domain (The domain being taken as the central portion of the knot vector where there are @p+1@ non-zero basis functions, forming a complete basis for the degree @p@ polynomials on that interval). This implementation makes the arbitrary but justifiable choice that the extra control point be identical to the first, so that the position of the first knot is irrelevant. It could alternatively be written to take the extra control point as an argument or as a part of @ds@, in which case the caller would be required to supply an additional control point that does not actually influence the spline. I initially found this result difficult to convince myself of even though it seems very plausible mathematically, because it seems to indicate that in general the position of the first and last knots are utterly irrelevant and I never saw any remarks to that effect in any of my reading on B-splines. Empirically, though, it seems to hold. Moving an internal knot at one end of a basis function does not alter the shape of that function in the segment furthest opposite, which is basically the same effect the first knot should have on the first basis function (and the opposite segment is the only one that falls inside the domain of the spline). It still may be that I'm
Re: [Haskell-cafe] Why is toRational a method of Real?
Henning Thielemann wrote: On Wed, 4 Aug 2010, John Meacham wrote: The numeric classes are sort of messed up when it comes to non integral values. (not that they are perfect for other things) for instance, realToFrac doesn't preserve NaN or Infinity, Why should realToFrac do this? NaN, Infinity and +/-0 are IEEE hacks for the common numerical applications you do with floating point numbers. These special values could be supported by floating point specific, or even IEEE specific type classes, but they should not be part of mathematically motivated type classes . If we assume +/-Infinity, then NaN comes along too--- unless you want pure expressions to throw exceptions whenever messing with infinities in the wrong way. Silent exceptional values are evil, but throwing exceptions willy nilly is even more evil. You could argue that including the limits of the type as values in the type is wrong, but it does allow for some nice mathematics like log 0 = -Inf. -- Live well, ~wren ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] real-time audio processing [Was: can Haskell do everyting as we want?]
On 5 August 2010 15:41, Job Vranish job.vran...@gmail.com wrote: John Van Enk and I are actually working on a language that's similar to C (and compiles to C), but has polymorphism, type inference and other goodies. I guess you have seen BitC (http://www.bitc-lang.org/)? It has the performance of C but also type inference, polymorphism, type classes, first class functions... I've never used it but have heard nice things. Cheers, Max ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] hsb2hs preprocessor looking for a maintainer
Hi Sergei On 5 August 2010 18:23, Sergei Trofimovich sly...@gmail.com wrote: I like the way GHC abstracted from foreign function call interface via libffi. It works on everything where i tried GHC. Would be nice to have exactly the same thing for ELF(and more) loader. OK, I've put the text of your email on the tracker as 4244 (http://hackage.haskell.org/trac/ghc/ticket/4244) so we don't lose this information. If you can think of anything to add please do so. Cheers, Max ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] ANN: Elerea 2.x.x + question about AOP in Haskell
Hello all, I silently updated Elerea [1] to version 2 about half a month ago, which deprecated the old interface in favour of the 'experimental' branch of version 1. The most important change besides this swap is the addition of the clocked variant of the library, which allows the programmer to easily freeze parts of the data-flow network, a feature similar to the clock system of Lucid Synchrone. Also, as of version 2.1.0 (today's update), the parametric variant was revised and simplified, which is reflected in the types of the combinators. Feel free to play with the new features! On to my question. There are three main variants of the library: a basic one and two others that extend it in some way. The extensions are orthogonal -- on the level of denotational semantics they could be represented as monad transformers (at least I strongly believe so, but I haven't verified yet). This means that there should be a fourth variant that combines the two extensions. Also, it might easily be the case that there will be more independent extensions in the future. This smells like a perfect opportunity to turn to aspect oriented programming techniques, but unfortunately I couldn't find a sensible way to exploit the similarities (of which there are plenty!) and share the core logic of the library across these slightly distinct variants. So the question: how does one go about doing aspect oriented programming in Haskell? Any nice examples in the wild? Gergely [1] http://hackage.haskell.org/package/elerea -- http://www.fastmail.fm - Does exactly what it says on the tin ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Haskell Platform OPENGL dependencies
aditya.siram: Hi folks, I just installed the latest Haskell Platform on a fresh Ubuntu Lucid machine and I had to install the following packages to satisfy Open GL: libgmp3-dev,libgl1-mesa-dev, libglu1-mesa-dev, freeglut3-dev Just thought you might want to document that on the Haskell Platform page. -deech Thanks. The best way to install the Haskell Platform is via a distro package, e.g. the haskell-platform on Debian. Ubuntu will import this soonish. Until then, you will need to manually install the dependencies, as listed on the Debian package page: http://packages.debian.org/squeeze/haskell-platform -- Don ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Why do unsafe foreign calls block other threads?
On Thu, Aug 05, 2010 at 03:48:57PM -0400, wren ng thornton wrote: John Meacham wrote: 'reentrant' and 'blocking' which could be specified independently would be better and would be more future-proof against changes in the RTS or between compilers. +1. Perhaps we should propose it to the haskell' committee. It is already on the wiki mixed in under 'concurrency'. It was discussed at length, the general consensus was that even if concurrency isn't in the standard, we should make these annotations part of it so FFI bindings could be written that would be portable between concurrent and non-concurrent implementations. The actual naming of the annotations and what the default should be got into some serious dogshedding which I'd hate to re-hash, but most anything would be better than 'safe' and 'unsafe' IMHO. John -- John Meacham - ⑆repetae.net⑆john⑈ - http://notanumber.net/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] jswm - how to manipulate strings?
i try to use jswm to build some web applications, but i got quickly stuck. I used the example programs provided and tried to change them. starting with the calculator, i would like to use the string that the user puts in and apply a function to it (say transform it to capitals, later i want to do more complex operations). now i cannot find a way to apply a function to the type returned from the input: get'value :: (Monad mn, CHTMLTextAreaElement this) = Expression this - mn (Expression String) how can i apply some function to the string in the input : mn (Expression String) ? or how can i get the string out such that i can change it and later put it back into an expression? help is appreciated - there seems to be only a small piece missing.. andrew ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Why do unsafe foreign calls block other threads?
On Thu, Aug 05, 2010 at 04:08:38PM -0400, Nick Bowler wrote: On 2010-08-03 15:23 -0700, John Meacham wrote: It is more an accident of ghc's design than anything, the same mechanism that allowed threads to call back into the runtime also allowed them to be non blocking so the previously used 'safe' and 'unsafe' terms got re-used. personally, I really don't like those terms, they are non-descriptive in terms of what they actually mean and presuppose a RTS similar to ghcs current design. 'reentrant' and 'blocking' which could be specified independently would be better and would be more future-proof against changes in the RTS or between compilers. I thought safe meant the foreign function is allowed to call Haskell functions, which seems to not have anything to do with whether the function is re-entrant (a very strong condition). Yeah, that is probably not the right term, I was thinking 're-entrant' as in it re-enters the haskell run-time, but that could cause confusion with other meanings of that word. Perhaps 'nocallbacks' or 'nohs' 'nonnative'. John -- John Meacham - ⑆repetae.net⑆john⑈ - http://notanumber.net/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: using Network.CGI
On Thu, 5 Aug 2010, Andrew U. Frank wrote: which is clearly not producing the second part of the code, namely output a greeting. That’s what it’s supposed to output. Have you considered typing in a name and submitting the form? It works fine for me: http://andersk.mit.edu/greet.cgi. i try to use the Network.CGI package from darcs. (Note also that the current version is maintained in Git, not Darcs, but that’s a minor detail. See http://hackage.haskell.org/package/cgi .) Anders ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANNOUNCE: DSTM 0.1.1
Looks interesting. One point: you seem to be using Read and Show typeclasses for serialisation. I think you would be better off using Binary, which is much more efficient. Paul. On 03/08/10 09:35, Frank Kupke wrote: Hi, DSTM is an implementation of a robust distributed Software Transactional Memory (STM) library for Haskell. Many real-life applications are distributed by nature. Concurrent applications may profit from robustness added by re-implementation as distributed applications. DSTM extends the STM abstraction to distributed systems and presents an implementation efficient enough to be used in soft real-time applications. Further, the implemented library is robust in itself, offering the application developer a high abstraction level to realize robustness, hence, significantly simplifying this, in general, complex task. The DSTM package consists of the DSTM library, a name server application, and three sample distributed programs using the library. Provided are a simple Dining Philosophers, a Chat, and a soft real-time Bomberman game application. Distributed communication is transparent to the application programmer. The application designer uses a very simple name server mechanism to set up the system. The DSTM library includes the management of unavailable process nodes and provides the application with abstract error information thus facilitating the implementation of robust distributed application programs. For usage please look into the documentation file: DSTMManual.pdf. The package including the documentation can be found on: http://hackage.haskell.org/package/DSTM-0.1.1 Best regards, Frank Kupke ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Preview the new haddock look and take a short survey
On 5 August 2010 23:35, Dino Morelli d...@ui3.info wrote: On Wed, 4 Aug 2010, Mark Lentczner wrote: One thing I haven't seen anyone else comment on is the width of the new docs. I have a large (26) monitor and use the browser full-screen (with xmonad, so even more screen space). When I load these pages, particularly the non-frame one, something like 50% of my screen real-estate is empty whitespace on either side of the doc content. There is also wasted space in the frames version, just a little less of it. I wish the docs were using that space like the current Haddock does. Is the plan to use a fixed width like this? I too thought this at first, but found it very useable. Also, it doesn't seem to be a fixed width: if you increase font size/zoom in, then the width increases as well (unlike most sites where the font size is increased but the width of the column it's in doesn't). -- Ivan Lazar Miljenovic ivan.miljeno...@gmail.com IvanMiljenovic.wordpress.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Preview the new haddock look and take a short survey
On Thu, Aug 5, 2010 at 11:48 PM, Johan Tibell johan.tib...@gmail.com wrote: On Thu, Aug 5, 2010 at 3:35 PM, Dino Morelli d...@ui3.info wrote: On Wed, 4 Aug 2010, Mark Lentczner wrote: One thing I haven't seen anyone else comment on is the width of the new docs. I have a large (26) monitor and use the browser full-screen (with xmonad, so even more screen space). When I load these pages, particularly the non-frame one, something like 50% of my screen real-estate is empty whitespace on either side of the doc content. There is also wasted space in the frames version, just a little less of it. I wish the docs were using that space like the current Haddock does. Is the plan to use a fixed width like this? Yes. There's research suggesting that the line length should be between 65 and 75 characters per line. http://psychology.wichita.edu/surl/usabilitynews/42/text_length.htm http://psychology.wichita.edu/surl/usabilitynews/72/LineLength.asp This study examined the effects of line length on reading speed, comprehension, and user satisfaction of online news articles. I completely agree with the case of news articles, but not in the case of Haskell documentation, it's structured differently and different parts such as bold or larger typeface serve as points of reference when reading, in contrast to plain old paragraphs found in a news article. The current layout works very well for me, I don't like the additional whitespace in the proposed version. I feel the colour scheme is a step backwards from what we have already, which offers high visibility. Jeff ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: Haskell in Industry
Hi Eil, Sorry, your email got lost in my inbox. I hope you don't mind me copying haskell-cafe. I saw a video of a presentation you gave at CUFP awhile back and was hoping to ask you a couple of questions. I'm currently a junior at UT Dallas and trying to figure out what I'm going to do after finishing undergrad. For the past two years or so one of my main interests has been language implementations. It's something that I'd like to continue to work with. For a long time I thought I wanted to stay in academia and do research, but recently I've realized that I'm more interested in applying these advanced programming languages to real-world problems, such as what you have done with the Atom DSL. Good, we need more functional programmers actually solving real problems. But please put your skills to work in an industry other than investment banking. So, I'm curious about your experiences with functional programming in industry. Have you found it hard to get companies interested in Haskell? Yes, it is very hard. But it can also be very easy. The best approach is to find a job or industry that does not already have a large software component, but desperately needs one. This was the reason Haskell was successful at Eaton. Though Eaton is a huge company, this particular division had surprisingly few software developers, and even fewer managers who understood software development. In short, there was no one to question the move to Haskell. IMO, the biggest obstacle to Haskell are programmers -- especially shear numbers of them. Is it difficult to hire good programmers for a less mainstream language? No. Every time I put a call out for resumes, I've gotten several candidates that would have fit the bill. The problem has been convincing my management to interview these leads. Have you had any trouble training people to use Haskell? Yes. I find that out of 10 people I train, only about 2 pick it up and run with it. I'm starting to believe you are either wired for functional programming, or you're not. Do many of the engineers using Haskell at Eaton have advanced degrees? Actually most of Eaton's Haskell programmers do not have advanced degrees; myself included. In fact one of our most successful programmers was an automotive technician in his previous job. This supports my hypothesis that your functional programming aptitude is determined at birth. Best of luck with the job hunt. If by chance Eaton starts hiring again, I'll give you a ping. -Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] what's the best environment for haskell work?
On 5 Aug 2010, at 21:12, David Virebayre wrote: For example, . Here's an example without, and with candy : listeEtageres = flip zip [1..] -- on les numérote . nub -- on élimine les doublons . sort-- on les trie . map simple -- on ne garde que le type et la position $ listeEtagTot-- on part de la liste totale des étagères where simple (_arm,tpe,pos) = (tpe,pos) f n (t,p) = (n,t,p) listeEtageres = flip zip [1..] -- on les numérote ∘nub -- on élimine les doublons ∘sort-- on les trie ∘map simple -- on ne garde que le type et la position $ listeEtagTot-- on part de la liste totale des étagères where simple (_arm,tpe,pos) = (tpe,pos) f n (t,p) = (n,t,p) --- I can't think of a solution to this that will work for people who don't care about non candy alignment and want . to appear as a single character. I am afraid for the foreseeable you only have two options 1) Turn of candy 2) Edit your candy configuration file Does your existing editor handle candy better? If so how? It doesn't handle them at all :) Switch it off then. You won't miss it :-) Thanks for the feedback, please let us know if you think of anything else. This is an example of how i'm confused. In this example, I'm trying to load a single file. It's for test purposes only, I only need it made by ghc --make, I don't need a cabal package. $ cd code/euler $ leksah Euler.hs Ok so the problem here is that for leksah to work properly we really want a .cabal file. The other issue is that you can only have one cabal file per directory. This came up recently on the Leksah group and I have been pondering what to do. Can you try out this... ~/haskell/test$ cat ~/bin/cabal_quick_init #!/bin/sh SOURCE_FILE=$1 CABAL_NAME=`basename -s .lhs $SOURCE_FILE` CABAL_NAME=`basename -s .hs $CABAL_NAME` echo Creating Cabal Package $CABAL_NAME echo For file $SOURCE_FILE mkdir $CABAL_NAME.package || exit cd $CABAL_NAME.package || exit cabal init -n -p $CABAL_NAME --is-executable --source-dir=.. || exit sed -e s/-- *[mM]ain-[iI]s *\:/Main-is:$SOURCE_FILE/ -i $CABAL_NAME.cabal || exit ~/haskell/test$ cabal_quick_init Euler.hs Creating Cabal Package Euler For file Euler.hs Generating LICENSE... Warning: unknown license type, you must put a copy in LICENSE yourself. Generating Setup.hs... Generating Euler.cabal... Warning: no synopsis given. You should edit the .cabal file and add one. You may want to edit the .cabal file and add a Description field. This will make a Euler/Euler.cabal file. You can then simply add that .cabal file to your workspace (right click in the Workspace pane). If this works I will add something like it in Leksah as Package - Cabalize Existing Code. You will then be asked to choose a Main source file and if you need the package to be in a subdirectory. I'll try to fix leksah Euler.hs so it does the following * if the file belongs to an package in the workspace open the file and activate the package * if not ask the user if they want to simply open it or cabalize it So I understand why the package menus didn't work, but there was no alert while I was in leksah. And it did crash when I clicked on Package-Edit flags (reproductible) Now I create a workspace since I have to. On the browser I still don't have access to my file. Make workspace does nothing, and tells me nothing. I suspect I need a package. This is a bit crap. We have been thinking of adding a default workspace. But perhaps a better/simple solution is to prompt the user whenever this happens and ask if they would like to create a workspace or open an existing one. So I'm creating a package. When I click save, it creates a Main.hs file for me. Right now I'm kind of annoyed, I just wanted to edit Euler.hs, add another problem to it, compile, run, and get on with something else. That's usually where I close leksah, and lauch kate. For another programs (that compile fine with ghc --make), I didn't bother making the package. But I had to find out the package dependencies by building, checking where it fails, and trying to add a package to the dependency list. Maybe there's a better way, didn't find it. We do plan to fix this in the same way we resolve missing imports. I had a look to see if I could do it when a user cabalizes the source, but ghc --make -v does not include the packages automatically loaded in its output. Instead we will need to wait for the error then resolve it when the user presses Ctrl+R. Hamish___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] lambdacats
Hello, does anyone happen to have the lambdacats page cached? The domain ( arcanux.org) and server have disappeared and the wayback machine doesn't have the images. -- Tony Morris http://tmorris.net/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] lambdacats
On 6 August 2010 14:12, Tony Morris tonymor...@gmail.com wrote: Hello, does anyone happen to have the lambdacats page cached? The domain (arcanux.org) and server have disappeared and the wayback machine doesn't have the images. arcanux.org used to be run by someone whose IRC nick was shillelagh (I believe lambdabot still has a quote by him). He suddenly disappeared one day, and then lambdacatz stopped working about 6 months after that. /me wonders if the same mysterious creature was also responsible for mmorrow disappearing... -- Ivan Lazar Miljenovic ivan.miljeno...@gmail.com IvanMiljenovic.wordpress.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] lambdacats
ivan.miljenovic: On 6 August 2010 14:12, Tony Morris tonymor...@gmail.com wrote: Hello, does anyone happen to have the lambdacats page cached? The domain (arcanux.org) and server have disappeared and the wayback machine doesn't have the images. Plenty of stuff shows up on google: http://images.google.com/images?q=lambdacats ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] lambdacats
I wonder if the original site is recoverable from this, but I suspect there are some missing. On Fri, Aug 6, 2010 at 2:33 PM, Don Stewart d...@galois.com wrote: ivan.miljenovic: On 6 August 2010 14:12, Tony Morris tonymor...@gmail.com wrote: Hello, does anyone happen to have the lambdacats page cached? The domain (arcanux.org) and server have disappeared and the wayback machine doesn't have the images. Plenty of stuff shows up on google: http://images.google.com/images?q=lambdacats -- Tony Morris http://tmorris.net/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe