[Haskell-cafe] Problems with installing type-level package
Hi, cafe, I have a stange thing when trying to install type-level package: $ sudo ./Setup.hs configure Configuring type-level-0.2.4... $ sudo ./Setup.hs build Preprocessing library type-level-0.2.4... Building type-level-0.2.4... [1 of 8] Compiling Data.TypeLevel.Num.Reps ( src/Data/TypeLevel/Num/Reps.hs, dist/build/Data/TypeLevel/Num/Reps.o ) [2 of 8] Compiling Data.TypeLevel.Num.Sets ( src/Data/TypeLevel/Num/Sets.hs, dist/build/Data/TypeLevel/Num/Sets.o ) [3 of 8] Compiling Data.TypeLevel.Num.Aliases.TH ( src/Data/TypeLevel/Num/Aliases/TH.hs, dist/build/Data/TypeLevel/Num/Aliases/TH.o ) [4 of 8] Compiling Data.TypeLevel.Num.Aliases ( src/Data/TypeLevel/Num/Aliases.hs, dist/build/Data/TypeLevel/Num/Aliases.o ) Loading package ghc-prim ... linking ... done. Loading package integer ... linking ... done. Loading package base ... linking ... done. Loading package syb ... linking ... done. Loading package array-0.2.0.0 ... linking ... done. Loading package containers-0.2.0.1 ... linking ... done. Loading package pretty-1.0.1.0 ... linking ... done. Loading package template-haskell ... linking ... done. Generating and compiling a zillion numerical type aliases, this might take a while $ sudo ./Setup.hs haddock Running Haddock for type-level-0.2.4... Preprocessing library type-level-0.2.4... Warning: The documentation for the following packages are not installed. No links will be generated to these packages: rts-1.0, template-haskell-2.4.0.0 Generating and compiling a zillion numerical type aliases, this might take a while $ sudo ./Setup.hs install Installing library in /usr/local/lib/type-level-0.2.4/ghc-6.10.4 Setup.hs: Error: Could not find module: Data.TypeLevel with any suffix: [hi] in the search path: [dist/build] I have ghc-6.10.4 (that's what is mentioned in tested-with in type-level.cabal file) and cabal-1.8.0.2. Has anyone had some similar problems? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Unified Haskell login
* Michael Snoyman mich...@snoyman.com [2010-09-17 08:47:02+0200] * OpenID. Fixes the extra password problem, but doesn't give us any extra information about the user (email address, etc). This is a popular misconception. As was noted on this thread, many OpenID provideers may provide you an email or other information if you asked for it and user had supplied it. But even if not, nothing actually prevents you from *just asking the user* for the email if you need it. See stackoverflow for an example when you authenticate yourself and then can supply more information about yourself. These things are simply unrelated. -- Roman I. Cheplyaka :: http://ro-che.info/ Don't let school get in the way of your education. - Mark Twain ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Unified Haskell login
OpenID sounds like a plan. I'll probably add OpenID support to hpaste.org for management over pastes/remembering user details/default language, tracking annotations of your pastes, etc. We already have an OpenID Haskell implementation. Programming sites are already using it (Google, StackOverflow), we should follow suite. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Web development work
FWIW we're still looking for web programming Haskellers at CREATE-NET! http://www.haskell.org/pipermail/haskell-cafe/2010-September/083550.html On 16 September 2010 09:52, Michael Snoyman mich...@snoyman.com wrote: Hi all, Often times when trying to pitch Haskell to potential clients the concern is the lack of qualified developers willing to take on projects. As I'm sure many of you are familiar with, clients prefer not to be locked in to a single programmer: an errant bus can significantly reduce the value of their investment. So I'd like to get an idea of how many people out there would be interested in Haskell web development work. For the moment I'm just interested in doing this informally via email, though perhaps in the future it would be beneficial to the community to have this information centralized on a website. I think it would be useful to have some basic skills and experience information, including system administration abilities. I might also have one or two Yesod projects that I'll need to pass off in the future, though it's still unclear if this will happen. If you're interested in that, please let me know, I can give some more details privately. Michael ___ 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] Problems with installing type-level package
On Sunday 19 September 2010 09:58:02, Николай Кудасов wrote: $ sudo ./Setup.hs haddock Running Haddock for type-level-0.2.4... Preprocessing library type-level-0.2.4... Warning: The documentation for the following packages are not installed. No links will be generated to these packages: rts-1.0, template-haskell-2.4.0.0 Generating and compiling a zillion numerical type aliases, this might take a while $ sudo ./Setup.hs install Installing library in /usr/local/lib/type-level-0.2.4/ghc-6.10.4 Setup.hs: Error: Could not find module: Data.TypeLevel with any suffix: [hi] in the search path: [dist/build] I have ghc-6.10.4 (that's what is mentioned in tested-with in type-level.cabal file) and cabal-1.8.0.2. Has anyone had some similar problems? I think the cause is haddock invoking TH again, which destroys your previously built .hi and .o files for the pertinent modules. Try running ./Setup haddock before ./Setup build. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Problems with installing type-level package
The same thing happens without using haddock at all. .hi and .o files are created only for Data.TypeLevel.Num.Reps, Data.TypeLevel.Num.Sets and Data.TypeLevel.Num.Aliases.TH modules. I have no idea for wich reason other modules are ignored. They are in exposed-modules like those three. Maybe TH deals with some magic? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] how to measure memory usage?
How could I measure the amount of memory that my ghc-compiled program is actually using, from inside the program? It is expanding nodes in a (game) tree, and I need to stop this when it gets near the physical limits of the system (or some other limit that I want to set on the command line) The node size is varying so I cannot just pre-compute a maximal number of nodes. Thanks - J.W. PS: the program is this: http://www.littlegolem.net/jsp/info/player.jsp?plid=22146 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: Unified Haskell login
Thank you everyone for the feedback. Based on what people have been saying, here's a more concrete proposal: * Creates a website haskellers.com where people can create profiles. * Logins to haskellers.com will be via OpenID. There will probably be some kind of widget to make that simpler[1]. * Multiple OpenIDs can be tied into a single profile on Haskellers. * A profile on Haskellers will have a unique number and corresponding unique URL associated with it (http://www.haskellers.com/profile/1/, for example). * On Haskellers you will be able to associate your Hackage username somehow. I'll probably need some cooperation from the Hackage side. (Ideally, I would have wanted a system where we could do away with having a separate Hackage username, but I doubt that will happen.) * The profile's unique URL will actually be a RESTful API, providing data as HTML, JSON, possible a Haskell-specific format, etc. * There will also be a RESTful API for discovering the profiles available on Haskellers. * And here's the important bit: there will be an API to lookup a profile by OpenID URL. This is what will allow the universal login: any site can simply allow OpenID login and query any information it wants from Haskellers. * Another feature I'd like to explore is allowing some kind of OAuth protocol for other websites to gain authorization to make modifications to profiles on Haskellers. The question of *what* information we want as part of a profile is also very important, but is really a tangential discussion to the universal login issue. The question I have is whether this kind of a system will provide the support other sites/services would want? Notably absent here is the use of services besides OpenID for authentication. I personally would have thought allowing Twitter and Facebook logins would be a win, but there seems to be lackluster interest in this. Also, having some kind of login via Hackage probably would be nice as well, but once again does not seem like there is demand for it. Michael [1] http://code.google.com/p/openid-selector/ On Fri, Sep 17, 2010 at 8:47 AM, Michael Snoyman mich...@snoyman.com wrote: Hi cafe, Let me preface this by stating that this is purposely a half-baked idea, a straw man if you will. I'd like to hear what the community thinks about this. I mentioned yesterday that I was planning on building haskellers.com. The first technicality I considered was how login should work. There are a few basic ideas: * Username/password on the site. But who wants to deal with *another* password? * OpenID. Fixes the extra password problem, but doesn't give us any extra information about the user (email address, etc). * Facebook/Twitter/Google: We get the users email address, but do we *really* want to force users to have one of those accounts? I then started thinking about the Yesod documentation site[1], and realized in the not-too-distant future I'm going to want to provide a feature tracker. Once again, I'll need to face the exact same problem. And then I realized something: I already have *two* Haskell-centric logins: one for Hackage, and one for the Haskell wiki. Consolidating our logins as a community could be a huge plus. If we keep the same kind of system as we have now with Hackage and the wiki, we can verify each new user to keep things clean. Or even better: we could have a built-in permissions system: permissions for uploading to Hackage, modifying the wiki, feature requests, etc. Users get simplification of only needing to apply for an account once and only need to remember one password. (In fact, if we wanted to, we could bypass the password some of the time by allowing OpenID authentication.) But perhaps the biggest advantage would be the community building advantage. Imagine if you go to Hackage and the upload by field is a link to someone's Haskellers profile. Imagine going to Haskellers and seeing a list of all the users uploaded packages and wiki contributions. We could even start with some clever things like badges per user. I'm sure there are lots of possibilities out there I haven't considered. Obviously there are some technical hurdles to overcome. We would probably need to do some significant work on the wiki to get this to happen. But given that we seem to have had trouble with mediawiki in the past (I remember hearing about some migration issues), maybe it's time to eat our own dog food and switch to a Haskell-based wiki[2] that could be more easily modified to suit our needs. We would also need some kind of protocol for the cross-site authentication; OAuth 2.0 might be worth considering for this. All of this may just be the ramblings of a mad-man (I haven't had breakfast yet), but I do think that *some* form of unified login could really push Haskell forward. Michael [1] http://docs.yesodweb.com/ [2] http://hackage.haskell.org/package/gitit ___ Haskell-Cafe mailing
[Haskell-cafe] Re: how to measure memory usage?
How could I measure the amount of memory [...] OK, I call getrusage() via FFI. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Ultra-newbie Question
I like this one! Here's a variant using fold: lastk :: Int - [a] - [a] lastk k xs = foldl' (const.tail) xs (drop k xs) or point free: lastk = ap (foldl' (const. tail)). drop Hallo Luke Palmer, je schreef op 18-09-10 22:42: I think this is O(n) time, O(1) space (!). lastk :: Int - [a] - [a] lastk k xs = last $ zipWith const (properTails xs) (drop k xs) where properTails = tail . tails -- Met vriendelijke groet, =@@i ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Hackage hierarchical module naming conventions
Hi folks, I'm almost ready to upload my first-ever package to Hackage, but there's one thing that's bothering me for quite some time now: Are there any hierarchical module naming conventions in Hackage?! Well, I've came across this: http://www.haskell.org/haskellwiki/Hierarchical_module_names This is nice, but obviously (intentionally?) underspecified, and consequently the structure we have now doesn't really seem all that consistent. For example, consider these three packages (just an example, no offense intended): Data.KMeans Data.Datamining.Clustering.Gsom Data.Clustering.Hierarchical (I actually prefer Data.Clustering.*) It seems like anyone is building his or her own taxonomies of modules, and we end up with a lot of space in between. Has this issue been brought up before? Are there any additional guidelines? Best, Jan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Unified Haskell login
On Fri, Sep 17, 2010 at 6:47 PM, Michael Snoyman mich...@snoyman.comwrote: * OpenID. Fixes the extra password problem, but doesn't give us any extra information about the user (email address, etc). I have my open id with verisign. https://pip.verisignlabs.com/ Verisign doesn't give me an email address but stores info about me including what my email address is, nickname, dob, time zone etc. In this case I have my verisign pip store my gmail address among other things and when I signed up for stackoverflow among a few other sites I had a page showing what my verisign pip stores and which of those infos I would like copied to my newly created stackoverflow account. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Unified Haskell login
Let me respond to this directly since a number of people have brought this up: Due to spam reasons we can't trust the email given via an OpenID provider in general. For example, it would be trivial for me to create an OpenID provider for myself, set my email address as insert someone else's address here and essentially spam them. By going with a service like Facebook or Google, we know (or at least assume) that they do proper email validation, so we could immediately accept this value without needing to verify it ourselves. In other words: Yes, I know there are extensions to OpenID. And no, we can't use it to get a verified email address. Michael On Sun, Sep 19, 2010 at 4:54 PM, Tim Matthews tim.matthe...@gmail.com wrote: On Fri, Sep 17, 2010 at 6:47 PM, Michael Snoyman mich...@snoyman.com wrote: * OpenID. Fixes the extra password problem, but doesn't give us any extra information about the user (email address, etc). I have my open id with verisign. https://pip.verisignlabs.com/ Verisign doesn't give me an email address but stores info about me including what my email address is, nickname, dob, time zone etc. In this case I have my verisign pip store my gmail address among other things and when I signed up for stackoverflow among a few other sites I had a page showing what my verisign pip stores and which of those infos I would like copied to my newly created stackoverflow account. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] haltavista - look for functions by example
Hi, i'ts on hackage now. Thanks to Jun Inoue, stack overflows are now catched. Paul On Sat, Sep 18, 2010 at 11:47:07AM +0200, Paul Brauner wrote: Hello, I just hacked together something I've been talking about a while ago on that mailing list. It's a program that looks for functions given a set of input/outputs. Example session 1: brau...@worf:~$ haltavista 2 2 4 EOF Prelude (*) Prelude (+) Prelude (^) Example session 2 (refining previous search): brau...@worf:~$ haltavista 2 2 4 1 2 3 EOF Prelude (+) Example session 3 (higher-order functions): brau...@worf:~$ haltavista (+1) (+2) (1,1) (2,3) EOF Data.Graph.Inductive.Query.Monad () Under the hood, uses: - hint for type inference; - hoogle to get a list of candidate functions; - hint for testing. Hoogle calling facility has been copy-pasted (and later modified) from the Yi project. It's availaible on github (http://github.com/polux/haltavista) and I plan to release it on hackage as soon as I catch stack overflows that occur during testing using hint. So far I didn't manage to do it, even by catching asynchronous exceptions. Every suggestion/help is welcome. Also, if I got something wrong with the licences (Yi uses GPL-2 and code is copy-pasted, Hint BSD3 and is linked, Hoogle is called as an external process, haltavista is GPL-3 for now) please tell me. Paul ___ 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] Problems with installing type-level package
2010/9/19 Николай Кудасов crazy.fiz...@gmail.com: Hi, cafe, I have a stange thing when trying to install type-level package: $ sudo ./Setup.hs configure Configuring type-level-0.2.4... $ sudo ./Setup.hs build Preprocessing library type-level-0.2.4... Building type-level-0.2.4... [1 of 8] Compiling Data.TypeLevel.Num.Reps ( src/Data/TypeLevel/Num/Reps.hs, dist/build/Data/TypeLevel/Num/Reps.o ) [2 of 8] Compiling Data.TypeLevel.Num.Sets ( src/Data/TypeLevel/Num/Sets.hs, dist/build/Data/TypeLevel/Num/Sets.o ) [3 of 8] Compiling Data.TypeLevel.Num.Aliases.TH ( src/Data/TypeLevel/Num/Aliases/TH.hs, dist/build/Data/TypeLevel/Num/Aliases/TH.o ) [4 of 8] Compiling Data.TypeLevel.Num.Aliases ( src/Data/TypeLevel/Num/Aliases.hs, dist/build/Data/TypeLevel/Num/Aliases.o ) Loading package ghc-prim ... linking ... done. Loading package integer ... linking ... done. Loading package base ... linking ... done. Loading package syb ... linking ... done. Loading package array-0.2.0.0 ... linking ... done. Loading package containers-0.2.0.1 ... linking ... done. Loading package pretty-1.0.1.0 ... linking ... done. Loading package template-haskell ... linking ... done. Generating and compiling a zillion numerical type aliases, this might take a while $ [...] It looks like the Setup.hs build step is only compiling 4 of 8 modules? Does this stage appear to exit successfully? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] haltavista - look for functions by example
Very interesting! It got me thinking: if you combine this with the Arbitrary class [1] of QuickCheck you can use it check if you have defined a function that is equal to an already defined function. Let's say I write the following function: intMul ∷ Integer → Integer → Integer intMul x 0 = 0 intMul x n = x + intMul x (n - 1) No you can automatically apply this function to a list of 100 generated inputs to get a list of input output pairs. Feed this into haltavista and it should tell you that you can replace your definition with Prelude (*). While such an observation is certainly not a proof it is still useful. It would be a nice addition to a Haskell editor. Especially for those new to the language. Regards, Roel 1 - http://hackage.haskell.org/packages/archive/QuickCheck/2.3/doc/html/Test-QuickCheck-Arbitrary.html ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] haltavista - look for functions by example
In my haste to reply I made an error in my 'newby' multiplication function. Pesky negative numbers... intMul ∷ Integer → Integer → Integer intMul x n | n 0 = -(intMul x $ abs n) | n == 0 = 0 | n 0 = x + intMul x (n - 1) I do wonder what happens when haltavista encounters a function that diverges. Like my original intMul applied to a negative number: intMul 2 (-1). ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] haltavista - look for functions by example
That's a great idea! In the same vein, have you had a look at quickspec by Koen Claessen, Nicholas Smallbone and John Hughes? www.cse.chalmers.se/~nicsma/quickspec.pdf This reminds me of another idea, suggested by Jun inoue: look for functions by specification instead of examples. I will try your idea ASAP. As you say, I think that might be helpful for beginners, as you suggest, or even when you're not a beginner anymore but you start using a new library. Paul On Sun, Sep 19, 2010 at 07:41:21PM +0200, Roel van Dijk wrote: Very interesting! It got me thinking: if you combine this with the Arbitrary class [1] of QuickCheck you can use it check if you have defined a function that is equal to an already defined function. Let's say I write the following function: intMul ∷ Integer → Integer → Integer intMul x 0 = 0 intMul x n = x + intMul x (n - 1) No you can automatically apply this function to a list of 100 generated inputs to get a list of input output pairs. Feed this into haltavista and it should tell you that you can replace your definition with Prelude (*). While such an observation is certainly not a proof it is still useful. It would be a nice addition to a Haskell editor. Especially for those new to the language. Regards, Roel 1 - http://hackage.haskell.org/packages/archive/QuickCheck/2.3/doc/html/Test-QuickCheck-Arbitrary.html ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] haltavista - look for functions by example
It works: brau...@worf:/tmp$ cat test.hs import Test.QuickCheck import Test.QuickCheck.Arbitrary import Control.Monad(forM_) intMul :: Integer - Integer - Integer intMul x n | n 0 = -(intMul x $ abs n) | n == 0 = 0 | n 0 = x + intMul x (n - 1) main = do xs - sample' arbitrary ys - sample' arbitrary zip xs ys `forM_` \(x,y) - putStrLn (show x ++ ++ show y ++ ++ (show $ intMul x y)) brau...@worf:/tmp$ runghc test.hs | haltavista Prelude (*) I will include this functionality in the next version. Thank you for this nice idea. Paul On Sun, Sep 19, 2010 at 08:16:08PM +0200, Paul Brauner wrote: That's a great idea! In the same vein, have you had a look at quickspec by Koen Claessen, Nicholas Smallbone and John Hughes? www.cse.chalmers.se/~nicsma/quickspec.pdf This reminds me of another idea, suggested by Jun inoue: look for functions by specification instead of examples. I will try your idea ASAP. As you say, I think that might be helpful for beginners, as you suggest, or even when you're not a beginner anymore but you start using a new library. Paul On Sun, Sep 19, 2010 at 07:41:21PM +0200, Roel van Dijk wrote: Very interesting! It got me thinking: if you combine this with the Arbitrary class [1] of QuickCheck you can use it check if you have defined a function that is equal to an already defined function. Let's say I write the following function: intMul ∷ Integer → Integer → Integer intMul x 0 = 0 intMul x n = x + intMul x (n - 1) No you can automatically apply this function to a list of 100 generated inputs to get a list of input output pairs. Feed this into haltavista and it should tell you that you can replace your definition with Prelude (*). While such an observation is certainly not a proof it is still useful. It would be a nice addition to a Haskell editor. Especially for those new to the language. Regards, Roel 1 - http://hackage.haskell.org/packages/archive/QuickCheck/2.3/doc/html/Test-QuickCheck-Arbitrary.html ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] haltavista - look for functions by example
There's a timeout of 1.5 second right now.. On Sun, Sep 19, 2010 at 07:46:54PM +0200, Roel van Dijk wrote: In my haste to reply I made an error in my 'newby' multiplication function. Pesky negative numbers... intMul ∷ Integer → Integer → Integer intMul x n | n 0 = -(intMul x $ abs n) | n == 0 = 0 | n 0 = x + intMul x (n - 1) I do wonder what happens when haltavista encounters a function that diverges. Like my original intMul applied to a negative number: intMul 2 (-1). ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] haltavista - look for functions by example
Impressive! I didn't think you could implement it so quickly. Now someone needs to add this functionality to Leksah or hack something up for Emacs. Regards, Roel On Sun, Sep 19, 2010 at 8:27 PM, Paul Brauner paul.brau...@inria.fr wrote: It works: brau...@worf:/tmp$ cat test.hs import Test.QuickCheck import Test.QuickCheck.Arbitrary import Control.Monad(forM_) intMul :: Integer - Integer - Integer intMul x n | n 0 = -(intMul x $ abs n) | n == 0 = 0 | n 0 = x + intMul x (n - 1) main = do xs - sample' arbitrary ys - sample' arbitrary zip xs ys `forM_` \(x,y) - putStrLn (show x ++ ++ show y ++ ++ (show $ intMul x y)) brau...@worf:/tmp$ runghc test.hs | haltavista Prelude (*) I will include this functionality in the next version. Thank you for this nice idea. Paul ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Haskell/JDK/tail-calls etc. (please vote on bug No. 6804517)
Hello, from time to time request for Haskell running on top of Java's VM pops on the haskell related mailing list and then usually dies off when someone mentions that JDK does not have proper support for tail-calls. I think haskell community might do something with this fact or at least attempt to do something with it. I think the proper request for enhancement is here: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6804517 if you agree with it (as it's proposed on the rfe's mentioned blog article[1]), then please either join or if you are already a member of SDN then just login and vote for this bug. That's something we can do for free and will take just few minutes yet perhaps push a little bit more weight behind this bug (err, just 4 votes now, why's that?). Thanks, Karel [1]: http://blogs.sun.com/jrose/entry/tail_calls_in_the_vm ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: Haskell/JDK/tail-calls etc. (please vote on bug No. 6804517)
from time to time request for Haskell running on top of Java's VM pops on the haskell related mailing list and then usually dies off when someone mentions that JDK does not have proper support for tail-calls. would it help? For eager evaluation, certainly (I understand that Clojure and Scala are suffering from this), but for Haskell? J.W. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Unified Haskell login
On Sun, 19 Sep 2010 17:12:36 +0200, Michael Snoyman mich...@snoyman.com wrote: Let me respond to this directly since a number of people have brought this up: Due to spam reasons we can't trust the email given via an OpenID provider in general. For example, it would be trivial for me to create an OpenID provider for myself, set my email address as insert someone else's address here and essentially spam them. One can verify the email address found via the OpenID. However this would not really be spam since the email contents won't be chosen by the spammer. -- Nicolas Pouillard http://nicolaspouillard.fr ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Haskell/JDK/tail-calls etc. (please vote on bug No. 6804517)
On 20/09/2010, at 6:36 AM, Johannes Waldmann waldm...@imn.htwk-leipzig.de wrote: from time to time request for Haskell running on top of Java's VM pops on the haskell related mailing list and then usually dies off when someone mentions that JDK does not have proper support for tail-calls. would it help? For eager evaluation, certainly (I understand that Clojure and Scala are suffering from this), but for Haskell? Via strictness analysis won't Haskell do as much work as possible eagerly to improve performance? J.W. ___ 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
[Haskell-cafe] searching haskell-cafe ?
is there a way to search the haskell-cafe list. I found a potential link on the haskell wiki, but the link is busted. Didn't see anything on the haskell-cafe mailing list page. Thanks, Brian ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: Ultra-newbie Question
Why not? import Data.Number.Nat as N lastN :: Integral b = b - [a] - [a] lastN n xs = N.drop (N.length xs - n') xs where n' = N.toNat n Not import Prelude maybe make more clear. []'s Henrique Becker ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] searching haskell-cafe ?
On Sun, Sep 19, 2010 at 4:01 PM, bri...@aracnet.com wrote: is there a way to search the haskell-cafe list. I found a potential link on the haskell wiki, but the link is busted. Didn't see anything on the haskell-cafe mailing list page. I usually search my gmail haskell-cafe tag. You could use gmane: http://dir.gmane.org/gmane.comp.lang.haskell.cafe There may be someway to do a google search that is restricted to just haskell-cafe archives but I'm not sure what the correct search syntax would be. Something about in-url and then the url of the archives. Jason ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Haskell/JDK/tail-calls etc. (please vote on bug No. 6804517)
On Sun, Sep 19, 2010 at 3:51 PM, Karel Gardas karel.gar...@centrum.cz wrote: Hello, from time to time request for Haskell running on top of Java's VM pops on the haskell related mailing list and then usually dies off when someone mentions that JDK does not have proper support for tail-calls. I think haskell community might do something with this fact or at least attempt to do something with it. I think the proper request for enhancement is here: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6804517 if you agree with it (as it's proposed on the rfe's mentioned blog article[1]), then please either join or if you are already a member of SDN then just login and vote for this bug. That's something we can do for free and will take just few minutes yet perhaps push a little bit more weight behind this bug (err, just 4 votes now, why's that?). Even if tail recursion is not properly supported, I've never really understood why this is an *total* impediment to getting it working on the JVM. I mean, yes it sucks, but there are ways to do it anyway (trampolining for one). They are usually _slow_ methods (which trampoline is), but if it's the difference between being able to run on the JVM and not, you would think that someone would think running on JVM slowly is better than not running on it at all... Maybe that's not the case though, maybe it would actually be bad for Haskell's rep to run slowly on JVM compared to other languages. Steve ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] searching haskell-cafe ?
if you want to use google, here[1], it suggests using the 'list:' keyword to search in a mailing list archives. eg. http://www.google.co.uk/#hl=enq=fundep+list%3Ahaskell-cafe.haskell.org hope this helps, [1] http://mail.google.com/support/bin/answer.py?hl=enanswer=7190 On 20 September 2010 00:01, bri...@aracnet.com wrote: is there a way to search the haskell-cafe list. I found a potential link on the haskell wiki, but the link is busted. Didn't see anything on the haskell-cafe mailing list page. Thanks, Brian ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- Ozgur Akgun ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Haskell/JDK/tail-calls etc. (please vote on bug No. 6804517)
On Sun, Sep 19, 2010 at 5:15 PM, Stephen Sinclair radars...@gmail.com wrote: On Sun, Sep 19, 2010 at 3:51 PM, Karel Gardas karel.gar...@centrum.cz wrote: Hello, from time to time request for Haskell running on top of Java's VM pops on the haskell related mailing list and then usually dies off when someone mentions that JDK does not have proper support for tail-calls. I think haskell community might do something with this fact or at least attempt to do something with it. I think the proper request for enhancement is here: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6804517 if you agree with it (as it's proposed on the rfe's mentioned blog article[1]), then please either join or if you are already a member of SDN then just login and vote for this bug. That's something we can do for free and will take just few minutes yet perhaps push a little bit more weight behind this bug (err, just 4 votes now, why's that?). Even if tail recursion is not properly supported, I've never really understood why this is an *total* impediment to getting it working on the JVM. I mean, yes it sucks, but there are ways to do it anyway (trampolining for one). They are usually _slow_ methods (which trampoline is), but if it's the difference between being able to run on the JVM and not, you would think that someone would think running on JVM slowly is better than not running on it at all... Maybe that's not the case though, maybe it would actually be bad for Haskell's rep to run slowly on JVM compared to other languages. I don't think the biggest hurdles to running Haskell on the JVM are related to tail call [1]. Lazy evaluation mostly gets rid of the need, but having it has been shown to be beneficial [2]. There have been successful attempts to get Haskell on the JVM [3]. The big problems, as I understand them, are maintenance and type interaction at the source to source level (Haskell -- Java). Rewriting GHC's RTS to work on the JVM is a big engineering effort and maintaining the JVM RTS and compiler backend is a task that the Simons have said they don't want to take on. They have said that they would accept those changes in GHC if someone else was willing and able to maintain that part of the compiler [4]. The source to source interactions between Java and Haskell have been solved in packages like jvm-bridge [5], but I'm not sure if that approach would work for a Haskell to JVM compiler. I think the lack of tail call hurts the effort but is not a show stopper by any means. In fact, I don't believe there are any show stoppers at the technical level and if GHC ever gets a proper volunteer to maintain the JVM support then I think it would be all green lights. As SPJ points out in [1], Scala gets by without the JVM supporting proper tail call. I hope that helps! Jason [1] http://www.mail-archive.com/haskell-cafe@haskell.org/msg47997.html [2] http://cgi.cse.unsw.edu.au/~dons/blog/2008/05/16#fast [3] http://www.cs.rit.edu/~bja8464/lambdavm/ [5] http://haskell.org/haskellwiki/GHC:FAQ#Why_isn.27t_GHC_available_for_.NET_or_on_the_JVM.3F [5] http://semantic.org/jvm-bridge/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Problems with installing type-level package
Setup.hs actually compiles 3 modules, because only they could be found in dist/build. As I understand, something fails on Data.TypeLevel.Num.Aliases.TH but does not give any report on that. Can anybody try to install package to test if it is my problem or, probably, bug in package? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] cabal problem on OS X
On 10 June 2010 01:08, Gregory Collins g...@gregorycollins.net wrote: Jeroen Weijers jeroenweijers+haskellc...@gmail.com writes: Hi, For me it turned out to be some problem with MacPorts, removing MacPorts (with all its installed ports) solved the problem regarding ZLib. I assume that a less drastic measure would also work (only remove selected ports or remove the ports from your path). This specific error happens when you try to link with a 64-bit library from 32-bit GHC. So the odds are good either your flags aren't set right in /usr/bin/ghc and friends (which was an issue on 6.10), or you're linking to a non-universal copy of zlib (like the one macports will build). I was having this problem too, so I searched through my mail and found this thread. I upgraded to the latest Haskell Platform 2010.2.0.0, but the problem persisted. I noticed that macports has a universal variant of zlib, so I installed that: sudo port install zlib +universal Then I rebuild cabal, and now it works properly. Cheers, Bernie. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] ANN: ieee version 0.7
ieee is a Haskell library for dealing with IEEE floating numbers. It was originally written to make testing with floating point values less painful. The library provides an approximate equality type class, AEq, with approximate equality operator ~==. One property of ~== is that nearby floating point numbers are deemed equivalent, so that, for example, 1 ~== 1.0001 evaluates to True. Documentation is on hackage: http://hackage.haskell.org/package/ieee Changes since the last release: * Add IEEE type class with instances for Double, Float, CDouble, and CFloat * Add functions for getting/setting NaN payloads * Add succIEEE/predIEEE for advancing up and down the IEEE number line (ported from Tango's nextUp and nextDown) * Add bisectIEEE for midpoints of two numbers on the IEEE number line (ported from Tango's ieeeMean) * Add identicalIEEE for exact (bitwise) equality of IEEE numbers * Add copySign for setting the sign bit of an IEEE number * Add sameSignificandBits for seeing how many significand bits of two IEEE numbers agree, ported from Tango's feqrel * Add nan, infinity, maxFinite, minNormal constants for IEEE numbers * Add maxNum and minNum * Rename maxF and minF to maxNaN and minNaN * Switch to a simpler ~== comparison for complex numbers * Make ~== comparison use sameSignificandBits for IEEE types * Make === comparison use bitwise equality for IEEE types * Remove old eqRel comparisons. * Remove old epsilon' and delta constants * Remove (RealFloat a) = AEq (Complex a) instance in favor of explicit instances for Complex {Double,Float,CDouble,CFloat} ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANN: ieee version 0.7
On Sun, Sep 19, 2010 at 6:49 PM, Patrick Perry patpe...@gmail.com wrote: ieee is a Haskell library for dealing with IEEE floating numbers. It was originally written to make testing with floating point values less painful. The library provides an approximate equality type class, AEq, with approximate equality operator ~==. One property of ~== is that nearby floating point numbers are deemed equivalent, so that, for example, 1 ~== 1.0001 evaluates to True. Given that IEEE is actually a standards body and they have many standards, wouldn't it be more appropriate to call this library ieee754? Note: The library itself seems cool, thanks for publishing it regardless of name! Jason ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANN: ieee version 0.7
Given that IEEE is actually a standards body and they have many standards, wouldn't it be more appropriate to call this library ieee754? If it seems important to people, I'd be happy to change the name. I'm not religious about these things. Will it clutter up hackage, though? Patrick ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] searching haskell-cafe ?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 9/19/10 20:12 , Jason Dagit wrote: There may be someway to do a google search that is restricted to just haskell-cafe archives but I'm not sure what the correct search syntax would be. Something about in-url and then the url of the archives. site:gmane.org inurl:comp.lang.haskell.cafe, but Google knows about standards-compliant mailing lists so list:haskell-cafe.haskell.org should work fine. - -- 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/ iEYEARECAAYFAkyWy5IACgkQIn7hlCsL25XAugCgrDYo0nLI3hraIRjrFDck9wbI IecAniCGwf85AZ1lDFyEeH20gi+c+x1w =za+s -END PGP SIGNATURE- ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANN: ieee version 0.7
On 20 September 2010 11:18, Patrick Perry patpe...@gmail.com wrote: Given that IEEE is actually a standards body and they have many standards, wouldn't it be more appropriate to call this library ieee754? If it seems important to people, I'd be happy to change the name. I'm not religious about these things. Will it clutter up hackage, though? I reckon it's worth making it obvious that this library does 754 and not, say, 1394 or 802.11 ;-) On the other hand if you intend on expanding the package to implement every IEEE standard ... (j/k) Anyway, good work. Does this have any overlap with data-binary-ieee754? There was some recent discussion here about the encoding speed in that package. Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] ANNOUNCE: text 0.9.0.0 and text-icu 0.4.0.0
I've issued new releases of the text and text-icu packages, the fast, comprehensive Unicode text manipulation libraries. http://hackage.haskell.org/package/text http://hackage.haskell.org/package/text-icu Features of text: - Compact array-based data representation. - Library code based on stream fusion automatically reduces copying in your application, compared to a more naive library. - The lazy text type supports streaming of data much larger than RAM. Features of text-icu: - - Locale sensitive case mapping. - [NEW] Language sensitive text boundary analysis. - Text normalization. (What is normalization? http://unicode.org/faq/normalization.html) - [NEW] Access to the Unicode Character Database. - Locale sensitive string collation. - Conversion to and from a huge number of native encodings. - Efficient comparison of ByteString and Text. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANN: ieee version 0.7
I'm looking at data-binary-754 right now, and it seems pretty complicated. Why don't they just cast the values bitwise to integers and then serialize those? Forgive my naivete-- I don't know much about binary encoding issues. I went the route of implementing everything in C and then using the FFI. There's a lot of lot of bit-twiddling involved when you work with the guts of IEEE754, which is a lot easier to do in C. See http://github.com/patperry/hs-ieee/blob/master/cbits/feqrel_source.c for a truly ugly example. I ported this code from the Tango math library for D ( http://www.dsource.org/projects/tango/browser/trunk/tango/math/IEEE.d ). It's original author, Don Clugston, claims that the function is about as fast as a comparison. Haskell's great, but I don't think it could get nearly as fast for a function like this. Patrick On Sun, Sep 19, 2010 at 11:16 PM, Conrad Parker con...@metadecks.org wrote: On 20 September 2010 11:18, Patrick Perry patpe...@gmail.com wrote: Given that IEEE is actually a standards body and they have many standards, wouldn't it be more appropriate to call this library ieee754? If it seems important to people, I'd be happy to change the name. I'm not religious about these things. Will it clutter up hackage, though? I reckon it's worth making it obvious that this library does 754 and not, say, 1394 or 802.11 ;-) On the other hand if you intend on expanding the package to implement every IEEE standard ... (j/k) Anyway, good work. Does this have any overlap with data-binary-ieee754? There was some recent discussion here about the encoding speed in that package. Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANN: ieee version 0.7
On Sun, Sep 19, 2010 at 20:16, Conrad Parker con...@metadecks.org wrote: Anyway, good work. Does this have any overlap with data-binary-ieee754? There was some recent discussion here about the encoding speed in that package. I should probably make it more clear that data-binary-ieee754 is for special use cases; for most people, using something like this will be much faster since it doesn't have to poke around the individual bits: putFloat32be :: Float - Put putFloat32be = putWord32be . unsafeCoerce I needed real IEEE754 binary support for round-trip parsing, where (for example) maintaining the particular bit pattern of a NaN is important. For 99% of people, the unsafe method will work fine. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANNOUNCE: text 0.9.0.0 and text-icu 0.4.0.0
On Sun, Sep 19, 2010 at 21:17, Bryan O'Sullivan b...@serpentine.com wrote: I've issued new releases of the text and text-icu packages, the fast, comprehensive Unicode text manipulation libraries. http://hackage.haskell.org/package/text http://hackage.haskell.org/package/text-icu What's new in text-0.9 ? All I see in darcs is a newtype'd param in the Foreign module. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANN: ieee version 0.7
I needed real IEEE754 binary support for round-trip parsing, where (for example) maintaining the particular bit pattern of a NaN is important. For 99% of people, the unsafe method will work fine. How does a C-style cast not preserve the bit pattern of a NaN? Again, sorry if this is a stupid question. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANN: ieee version 0.7
On Sun, Sep 19, 2010 at 21:43, Patrick Perry patpe...@gmail.com wrote: I needed real IEEE754 binary support for round-trip parsing, where (for example) maintaining the particular bit pattern of a NaN is important. For 99% of people, the unsafe method will work fine. How does a C-style cast not preserve the bit pattern of a NaN? Again, sorry if this is a stupid question. It's not a stupid question, and I don't know the answer. But if you plug a C-style cast into the data-binary-ieee754 unit tests, some of them (the fiddly ones, like roundtripping -NaN) will fail. Presumably, this is due to some optimization deep in the bowels of GHC, but I don't understand even a fraction of what goes on in there. For what it's worth, d-b-ieee754 was the very first Haskell library I ever wrote -- and it shows. If anybody knows how to make unsafeCoerce (or equivalent) roundtrip-safe, I would love to rip out all the ugly and make it sane. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe