Re: [Haskell-cafe] Re: Fix plugins package.
src/System/Plugins/Process.hs:59:4: Warning: A do-notation statement discarded a result of type GHC.Conc.ThreadId. Suppress this warning by saying _ - forkIO (() E.evaluate (length errput) return GHC.Unit.()), or by using the flag -fno-warn-unused-do-bind [ 3 of 15] Compiling System.Plugins.Parser ( src/System/Plugins/Parser.hs, dist/build/System/Plugins/Parser.o ) src/System/Plugins/Parser.hs:31:0: Warning: The import of `Data.Either' is redundant except perhaps to import instances from `Data.Either' To import instances alone, use: import Data.Either() [ 4 of 15] Compiling System.Plugins.PackageAPI ( src/System/Plugins/PackageAPI.hs, dist/build/System/Plugins/PackageAPI.o ) src/System/Plugins/PackageAPI.hs:61:24: Not in scope: `package' src/System/Plugins/PackageAPI.hs:62:25: Not in scope: `package' ... You can just replace 'package' with 'sourcePackageId' ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Fix plugins package.
Yuras Shumovich shumovi...@gmail.com writes: src/System/Plugins/Process.hs:59:4: Warning: A do-notation statement discarded a result of type GHC.Conc.ThreadId. Suppress this warning by saying _ - forkIO (() E.evaluate (length errput) return GHC.Unit.()), or by using the flag -fno-warn-unused-do-bind [ 3 of 15] Compiling System.Plugins.Parser ( src/System/Plugins/Parser.hs, dist/build/System/Plugins/Parser.o ) src/System/Plugins/Parser.hs:31:0: Warning: The import of `Data.Either' is redundant except perhaps to import instances from `Data.Either' To import instances alone, use: import Data.Either() [ 4 of 15] Compiling System.Plugins.PackageAPI ( src/System/Plugins/PackageAPI.hs, dist/build/System/Plugins/PackageAPI.o ) src/System/Plugins/PackageAPI.hs:61:24: Not in scope: `package' src/System/Plugins/PackageAPI.hs:62:25: Not in scope: `package' ... You can just replace 'package' with 'sourcePackageId' After replace 'package' with 'sourcePackageId' Another error : -- error start -- Preprocessing library plugins-1.4.1... Building plugins-1.4.1... [ 7 of 15] Compiling System.Plugins.Env ( src/System/Plugins/Env.hs, dist/build/System/Plugins/Env.o ) src/System/Plugins/Env.hs:315:45: Couldn't match expected type `PackageDBStack' against inferred type `PackageDB' In the second argument of `getInstalledPackages', namely `(SpecificPackageDB f)' In a stmt of a 'do' expression: pkgIndex - getInstalledPackages silent (SpecificPackageDB f) pc In the expression: do { pc - configureAllKnownPrograms silent defaultProgramConfiguration; pkgIndex - getInstalledPackages silent (SpecificPackageDB f) pc; return $ allPackages pkgIndex } cabal: Error: some packages failed to install: plugins-1.4.1 failed during the building phase. The exception was: ExitFailure 1 -- error end -- Thanks, -- Andy ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Fix plugins package.
Another error : -- error start -- Preprocessing library plugins-1.4.1... Building plugins-1.4.1... [ 7 of 15] Compiling System.Plugins.Env ( src/System/Plugins/Env.hs, dist/build/System/Plugins/Env.o ) src/System/Plugins/Env.hs:315:45: Couldn't match expected type `PackageDBStack' against inferred type `PackageDB' In the second argument of `getInstalledPackages', namely `(SpecificPackageDB f)' In a stmt of a 'do' expression: pkgIndex - getInstalledPackages silent (SpecificPackageDB f) pc In the expression: do { pc - configureAllKnownPrograms silent defaultProgramConfiguration; pkgIndex - getInstalledPackages silent (SpecificPackageDB f) pc; return $ allPackages pkgIndex } cabal: Error: some packages failed to install: plugins-1.4.1 failed during the building phase. The exception was: ExitFailure 1 -- error end -- It looks like it is not the last error :) Try this: pkgIndex - getInstalledPackages silent [SpecificPackageDB f] pc Not sure it will work as expected after that, but you can just try :) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Fix plugins package.
Yuras Shumovich shumovi...@gmail.com writes: Another error : -- error start -- Preprocessing library plugins-1.4.1... Building plugins-1.4.1... [ 7 of 15] Compiling System.Plugins.Env ( src/System/Plugins/Env.hs, dist/build/System/Plugins/Env.o ) src/System/Plugins/Env.hs:315:45: Couldn't match expected type `PackageDBStack' against inferred type `PackageDB' In the second argument of `getInstalledPackages', namely `(SpecificPackageDB f)' In a stmt of a 'do' expression: pkgIndex - getInstalledPackages silent (SpecificPackageDB f) pc In the expression: do { pc - configureAllKnownPrograms silent defaultProgramConfiguration; pkgIndex - getInstalledPackages silent (SpecificPackageDB f) pc; return $ allPackages pkgIndex } cabal: Error: some packages failed to install: plugins-1.4.1 failed during the building phase. The exception was: ExitFailure 1 -- error end -- It looks like it is not the last error :) Yes, it's not last error. :) I got another error: -- error start -- [ 8 of 15] Compiling System.MkTemp( src/System/MkTemp.hs, dist/build/System/MkTemp.o ) src/System/MkTemp.hs:214:26: Couldn't match expected type `IOError' against inferred type `Maybe FilePath - IOException' In the first argument of `ioError', namely `err' In the expression: ioError err In the expression: if b then ioError err else openFile f ReadWriteMode cabal: Error: some packages failed to install: plugins-1.4.1 failed during the building phase. The exception was: ExitFailure 1 -- error end -- Thank you very much help me so far. I hope Don can taking some time to fix those problems. Cheers, -- Andy ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Fix plugins package.
I got another error: -- error start -- [ 8 of 15] Compiling System.MkTemp ( src/System/MkTemp.hs, dist/build/System/MkTemp.o ) src/System/MkTemp.hs:214:26: Couldn't match expected type `IOError' against inferred type `Maybe FilePath - IOException' In the first argument of `ioError', namely `err' In the expression: ioError err In the expression: if b then ioError err else openFile f ReadWriteMode cabal: Error: some packages failed to install: plugins-1.4.1 failed during the building phase. The exception was: ExitFailure 1 -- error end -- I checked out sources and tried it myself. You need: [mkTemp:217] err = IOError Nothing AlreadyExists open0600 already exists Nothing Nothing if you will get error in readBinIface', then [Load.hs:725] e - newHscEnv undefined undefined if you will get error in loadFunction__, then [Load.hs: 441] ptr@(Ptr addr) - withCString symbol c_lookupSymbol It should compile now, but I don't know will it work or no. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Fix plugins package.
Yuras Shumovich shumovi...@gmail.com writes: I got another error: -- error start -- [ 8 of 15] Compiling System.MkTemp ( src/System/MkTemp.hs, dist/build/System/MkTemp.o ) src/System/MkTemp.hs:214:26: Couldn't match expected type `IOError' against inferred type `Maybe FilePath - IOException' In the first argument of `ioError', namely `err' In the expression: ioError err In the expression: if b then ioError err else openFile f ReadWriteMode cabal: Error: some packages failed to install: plugins-1.4.1 failed during the building phase. The exception was: ExitFailure 1 -- error end -- I checked out sources and tried it myself. You need: [mkTemp:217] err = IOError Nothing AlreadyExists open0600 already exists Nothing Nothing if you will get error in readBinIface', then [Load.hs:725] e - newHscEnv undefined undefined if you will get error in loadFunction__, then [Load.hs: 441] ptr@(Ptr addr) - withCString symbol c_lookupSymbol It should compile now, but I don't know will it work or no. Thanks for your time and help. I think best to let author fix those problem. Cheers, -- Andy ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: Memoization in Haskell?
Gregory Crosswhite wrote: Heinrich Apfelmus wrote: Gregory Crosswhite wrote: You're correct in pointing out that f uses memoization inside of itself to cache the intermediate values that it commutes, but those values don't get shared between invocations of f; thus, if you call f with the same value of n several times then the memo table might get reconstructed redundantly. (However, there are other strategies for memoization that are persistent across calls.) It should be f = \n - memo ! n where memo = .. so that memo is shared across multiple calls like f 1 , f 2 etc. That actually doesn't work as long as memo is an array, since then it has fixed size; you have to also make memo an infinitely large data (but lazy) structure so that it can hold results for arbitrary n. One option for doing this of course is to make memo be an infinite list, but a more space and time efficient option is to use a trie like in MemoTrie. Oops, silly me! I erroneously thought that the code was using f instead of (memo !) in the definition of the array, like this f :: (Integral a, Ord a, Ix a) = a - a f n = memo ! n where memo = array (0,n) $ (0,0) : [(i, max i (f (i `quot` 2) + f (i `quot` 3) + f (i `quot` 4))) | i - [1 .. n]] But since memo depends on n , it cannot be lifted outside the lambda abstraction. Regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] building ghc-6.12.3 from source on Open Solaris
Hi, does anyone here have experience what it takes to build ghc-6.12.3 from source on Open Solaris, with binary ghc-6.12.1 installed? Günther ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] building ghc-6.12.3 from source on Open Solaris
Günther Schmidt gue.schm...@web.de writes: Hi, does anyone here have experience what it takes to build ghc-6.12.3 from source on Open Solaris, with binary ghc-6.12.1 installed? Have you tried following the generic building instructions at http://hackage.haskell.org/trac/ghc/wiki/Building/QuickStart ? i.e.: unpack the source, and then run: , | $ ./configure | $ make | $ make install ` (if you want to install it somewhere non-standard, then check the ./configure options). -- 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] Transformers versus monadLib versus...
On Mon, 5 Jul 2010, Gregory Crosswhite wrote: Hey everyone, What is the current state regarding transformers versus monadLib versus mmtl versus ... etc.? Transformers seems to be the blessed replacement for mtl, so when is it worthwhile to use the other libraries instead? I like 'transformers' most, compared with MTL and monadLib, because it is Haskell 98 (especially only single parameter type classes and thus portable to JHC) and nicely split into modules for every monad class. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] building ghc-6.12.3 from source on Open Solaris
Hi Ivan, yes I did. It keeps failing so I wonder if there is someone who has successfully compiled ghc-6.12.3 on Open Solaris. Günther Am 10.07.10 16:27, schrieb Ivan Lazar Miljenovic: Günther Schmidtgue.schm...@web.de writes: Hi, does anyone here have experience what it takes to build ghc-6.12.3 from source on Open Solaris, with binary ghc-6.12.1 installed? Have you tried following the generic building instructions at http://hackage.haskell.org/trac/ghc/wiki/Building/QuickStart ? i.e.: unpack the source, and then run: , | $ ./configure | $ make | $ make install ` (if you want to install it somewhere non-standard, then check the ./configure options). ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell] Re: [Haskell-cafe] ANN: HaRe-0.6, now on Hackage
Chris BROWN schrieb: Daniel, Ivan, One comment on your .cabal file: it's usually preferred to write base = 3 5 rather than base = 3 = 4. In particular if e.g. base-4.2.0.0 doesn't fall in the latter range. I don't know how exactly Cabal interprets these bounds, but it's a possibility since 4.2 4.0. Thanks for the tip: we will get this into the next release of Cabal HaRe 0.6.1 ASAP. Any other comments or suggestions would be greatly appreciated. I think for extending the version range for 'base' it would be enough to move from HaRe-0.6 to HaRe-0.6.0.1. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] hs-dotnet with Mono?
A native-managed bridge for the clr while being cross platform is quite possible but unfortunately the developers of hs-dotnet reference ole32 and oleaut32 as extra libraries. This means that the code relies on the com/ole/activex layer in windows which is what Microsoft's implementation of the clr is built upon and their low level clr apis are written in. Mono doesn't use this and afaik there isn't a com layer for nix (unless of course you use wine but that may be overkill). The salsa project seems to have similar bindings although it does say on it's wiki page Supporting Mono shouldn't be too much work though ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] building ghc-6.12.3 from source on Open Solaris
2010/7/10 Günther Schmidt gue.schm...@web.de Hi, does anyone here have experience what it takes to build ghc-6.12.3 from source on Open Solaris, with binary ghc-6.12.1 installed? This isn't specific to Open Solaris, but it's where I would start: http://hackage.haskell.org/trac/ghc/wiki/Building/Solaris See also: http://hackage.haskell.org/trac/ghc/wiki/Platforms#Tier2platforms Jason ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: new haskell project (Was Re: [Haskell-cafe] Subtype polymorphism in Haskell)
Hi Daniel, Thanks for getting in touch - I would recommend, if you are interested in the project, that you join the project mailing lists, and let me know your sourceforge account name so I can add you to the project membership list. About the design question that you raise. The aim is to create a version of Quantlib in haskell in the sense that what is available in Quantlib is available in the Haskell version - for example, to create pricing engines and apply them to products. No-one currently involved on the project - certainly not me - is such an expert on quantitative finance that we could do this from scratch. In fact, I hope to learn a lot about this subject as a result of doing the project. In addition, since Quantlib has already a large user base that is used to the way components are composed together to get things done, I thought it would be useful to allow similar components to be composed (functionally, of course) in a similar way to allow knowledge about the one to be used with the other. Quantlib, therefore, provides a knowledge-base and reference architecture for the new haskell project. My (naive) idea, at the beginning, for all these reasons, was to follow and be guided by, but not faithfully recreate or replicate, the structure of the C++ code. I'm open to new ideas about design, and anyone who wishes to contribute is more than welcome to join the project! Regards Simon On Fri, Jul 9, 2010 at 5:15 PM, Daniel Cook danielkc...@gmail.com wrote: Hi Simon, I'm interested in this as well (you might have seen my other posts about getting QuickFIX interfaced with Haskell). One question (Yitzchak raises a valid point): Why port QuantLib's structure rather than directly build an idiomatic Haskell quantitative finance library? Especially given that the task lends itself so nicely to functional programmming (cf the canonical Functional Pearl by SPJ on composing financial contracts). Just curious about your rationale... Cheers, - Dan On Tue, Jul 6, 2010 at 7:26 PM, Simon Courtenage courten...@gmail.com wrote: Hi, Just to add some details about the project I'm working on in case anyone is interested. The project is called Quanthas and is being hosted on sourceforge at http://sourceforge.net/projects/quanthas/. The aim of the project is to produce a Haskell implementation of Quantlib (http://sourceforge.net/projects/quantlib/)- an open source library for quantitative finance written in C++. Haskell is starting to be used seriously in quantitative finance and risk modelling circles within the investment banking and finance community, so I thought there would be some value in producing such a version. If anyone is interested in helping out, we would be more than happy to hear from you, since the project has just started and there's a great deal to do (and learn!). Best regards Simon Courtenage On Tue, Jul 6, 2010 at 2:32 PM, Yitzchak Gale g...@sefer.org wrote: Hi Simon, Did you intentionally not reply to the list? Simon Courtenage wrote: This is for a project to port an open-source C++ library to haskell. Great! We'd love to give you whatever support you need for your efforts. My initial plan is to more or less preserve the way the library works in the first draft of the port and see how far we can get like that That's fine, as long as you truly mean the way it works, and not the way the code is structured. Haskell is a post-OO language. Its abstractions are very different than class structures in C++. There is no direct translation - any given C++ class structure could correspond to many totally different kinds of Haskell programs, depending on what the program is trying to do. If you are trying to find a method to transliterate a strongly OO-style C++ program more or less word for word into Haskell in a way that the class structure of the C++ will still be apparent in the result, you are likely in for a frustrating experience. You will spend a lot more time than you expected, and the results will be very unsatisfying. Many others have ended up that way. On the other hand, if you are willing to be a little more flexible in your thinking, you'll probably find the task much easier than you thought, enjoy it, and reap many benefits from the process that you never imagined. In any case, please keep us in the loop, we'd like to hear how it's going. And, uh... would you be willing to share a few more details about what it is that you're trying to port? ;) Thanks, Yitz ___ 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
[Haskell-cafe] Equivalence of two expressions
I'm not very familiar with algebra and I have a question. Imagine we have ring K. We also have two expressions formed by elements from K and binary operations (+) (*) from K. Can we decide weather these two expressions are equivalent? If there is such an algorithm, where can I find something in Haskell about it? If there is no such algorithm for a ring, maybe there is for a field? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] hs-dotnet with Mono?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 7/10/10 10:58 , Tim Matthews wrote: A native-managed bridge for the clr while being cross platform is quite possible but unfortunately the developers of hs-dotnet reference ole32 and oleaut32 as extra libraries. This means that the code relies on the com/ole/activex layer in windows which is what Microsoft's implementation of I suspect that just means that they're needed during the link phase when building on Windows; if the point is binding to the .Net CLR, I imagine Mono will have its own external dependencies in place of those. (If they were direct dependencies --- meaning that .Net bindings used them directly --- then Mono couldn't exist.) - -- 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/ iEYEARECAAYFAkw4wJ0ACgkQIn7hlCsL25XBJQCghtDCHyuHUvVT13vTlQ9f8gHZ FKAAoJ77rPr/T7AVzw4iiP4ae5Y98W5G =z9yK -END PGP SIGNATURE- ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: new haskell project (Was Re: [Haskell-cafe] Subtype polymorphism in Haskell)
On Sat, Jul 10, 2010 at 2:15 PM, Simon Courtenage courten...@gmail.comwrote: Hi Daniel, Thanks for getting in touch - I would recommend, if you are interested in the project, that you join the project mailing lists, and let me know your sourceforge account name so I can add you to the project membership list. About the design question that you raise. The aim is to create a version of Quantlib in haskell in the sense that what is available in Quantlib is available in the Haskell version - for example, to create pricing engines and apply them to products. No-one currently involved on the project - certainly not me - is such an expert on quantitative finance that we could do this from scratch. In fact, I hope to learn a lot about this subject as a result of doing the project. In addition, since Quantlib has already a large user base that is used to the way components are composed together to get things done, I thought it would be useful to allow similar components to be composed (functionally, of course) in a similar way to allow knowledge about the one to be used with the other. I've taken a fairly in-depth look at QuantLib. I think a 'direct port' would yield a fairly unnatural API from the perspective of Haskell. The basic QuantLib model is fairly mutation oriented. However, I think there is a kernel of it that can port fairly naturally. The first step in deriving something idiomatic would be figuring out how to make it work nicer in a persistent setting without mutation to get something that feels like a Haskell library. i.e. net present value calculations needs access to when 'now' is, so with some work that whole framework could be shifted to use a reader monad capturing the current time, and laziness or even memoization can be used to avoid heavy recomputation. Another option is to make NPV work in relative time. This shift in perspective would yield something like: http://conal.net/blog/posts/sequences-streams-and-segments/ The second shift in thinking is that I think most of what you are looking for in subtyping can be had readily enough by switching your view of classes around. Instrument works perfectly fine as a Haskell class and any time you need to box them up and work with a bunch of different financial instruments the same way, you can repackage them as functions, or use an existential container that can, at worst, give you access to Dynamic/Typeable to special case the handling of particular instruments. Quantlib, therefore, provides a knowledge-base and reference architecture for the new haskell project. My (naive) idea, at the beginning, for all these reasons, was to follow and be guided by, but not faithfully recreate or replicate, the structure of the C++ code. I'm open to new ideas about design, and anyone who wishes to contribute is more than welcome to join the project! There are a number of places where it would be fairly trivial to improve upon the design of quantlib due to the ease of overloading and polymorphic instantiation in Haskell, e.g. dealing with portfolios that span multiple currencies, so take care with shackling yourself to the current design. -Edward Kmett ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: [Haskell] ANNOUNCE: jhc 0.7.4
On Sat, Jul 10, 2010 at 1:47 AM, John Meacham j...@repetae.net wrote: Announcing jhc 0.7.4! There have been a few major changes, the main one being that there is now support for a garbage collector. This drastically increases the number of programs which are feasable to compile with jhc. http://repetae.net/computer/jhc/ Hi John, This looks fantastic and fun to play with. A few issues: * running DrIFT on src/E/TypeCheck.hs fails with an illegal bytesequence in hGetContents. I'm guessing that this is only an issue when building DrIFT with GHC 6.12+, and that the file contains bytes illegal in UTF8. I deleted everything funny looking in the file and then it went smooth * The way you use sed doesn't work with the BSD sed that ships with my Mac Book. Installing GNU sed and using it works. Similarly, BSD find doesn't know about '-name', so make hl-clean results in sadness. * jhci works great, but jhc crashes when I try to compile something: jhc test1.hs jhc 0.7.4 (tokfekyuvi-27) Finding Dependencies... Using Ho Cache: '/Users/alatter/.jhc/cache' Main[test1.hs] Typechecking... [1 of 1] Main (.) test1.hs:9 - Warning: defaulting: t93 = Jhc.Basics.Integer Compiling... [1 of 1] Main .. Collected Compilation... -- typeAnalyzeMethods -- BoxifyProgram -- Boxy WorkWrap -- LambdaLift E jhc: stdout: hPutChar: invalid argument (Illegal byte sequence) Again, this seems like the handle is in UTF8 mode and we're trying to output something non-UTF8. * cabal install has a --jhc flag, but it doesn't seem to work: cabal install byteorder --jhc Resolving dependencies... cabal: internal error: impossible I have jhc installed in a non-standard location (under ${HOME}/usr) so I may need to have some environment variables set up. This is wil Cabal 1.8.0.4 and cabal-install 0.8.2 Keep up the good work! I have an implementation for STRefs I threw together this afternoon for jhc if you're interested. I can't test it properly, though, with the compiler crash above. Antoine ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
RE: [Haskell-cafe] Re: Float instance of Data.Bits
Note that the Haskell report does not require IEEE 754 binary encodings. In fact, it permits 'Float' to be a decimal floating point type. True. Although I don't really understand why? Or rather, I don't understand why it can't be at least slightly more specific and at least state that Float is a 32-bit floating point value and Double is a 64-bit floating point value. The exact handling of various exceptions and denormals tends to vary across hardware, but this at least allows you to get at the representation. I realise it'll be platform-specific (assuming isIEEE returns false), but then so is the behaviour of your code if you don't require IEEE support. ta, Sam ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: [Haskell] ANNOUNCE: jhc 0.7.4
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 7/10/10 17:01 , Antoine Latter wrote: * The way you use sed doesn't work with the BSD sed that ships with my Mac Book. Installing GNU sed and using it works. Similarly, BSD find doesn't know about '-name', so make hl-clean results in sadness. Haven't looked at sed, but -name should work in any version of find. Are you sure about this? (maybe I'll suck down the source and audit for platform compatibility) - -- 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/ iEYEARECAAYFAkw44tgACgkQIn7hlCsL25WPQQCg12qq6Snxmpyuxweb56HJul5g GhwAnRu2zM0TWMJKUtY0OT76+vlF6GHY =6lf6 -END PGP SIGNATURE- ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: [Haskell] ANNOUNCE: jhc 0.7.4
On Sat, Jul 10, 2010 at 04:01:53PM -0500, Antoine Latter wrote: * running DrIFT on src/E/TypeCheck.hs fails with an illegal bytesequence in hGetContents. I'm guessing that this is only an issue when building DrIFT with GHC 6.12+, and that the file contains bytes illegal in UTF8. I deleted everything funny looking in the file and then it went smooth Hi, are you compiling from the tarball or the darcs repository? the tarball shouldn't require DrIFT to be installed. I had not tested DrIFT with 6.12 but that file should be in UTF8. Hmm... on OSX, is the default locale a UTF8 one? does ghc 6.12 properly encode to/from utf8 on it by defualt? could you check, I don't have a mac handy. * The way you use sed doesn't work with the BSD sed that ships with my Mac Book. Installing GNU sed and using it works. Similarly, BSD find doesn't know about '-name', so make hl-clean results in sadness. Hmm.. yeah, this has been reported before, but I was unable to reproduce the problem. But I may have accidentally been using a GNU sed, my mac at the time was highly gnu-ized. Could you send me a version that works. * jhci works great, but jhc crashes when I try to compile something: jhc test1.hs jhc 0.7.4 (tokfekyuvi-27) Finding Dependencies... Using Ho Cache: '/Users/alatter/.jhc/cache' Main[test1.hs] Typechecking... [1 of 1] Main (.) test1.hs:9 - Warning: defaulting: t93 = Jhc.Basics.Integer Compiling... [1 of 1] Main .. Collected Compilation... -- typeAnalyzeMethods -- BoxifyProgram -- Boxy WorkWrap -- LambdaLift E jhc: stdout: hPutChar: invalid argument (Illegal byte sequence) Again, this seems like the handle is in UTF8 mode and we're trying to output something non-UTF8. Hmm.. clearly something about the locale is wrong... It is outputing a unicode character there, but it shoudl translate adn display to utf8 just fine. perhaps ghc is not actually opening utf8 handles on your platform... * cabal install has a --jhc flag, but it doesn't seem to work: cabal install byteorder --jhc Resolving dependencies... cabal: internal error: impossible I have jhc installed in a non-standard location (under ${HOME}/usr) so I may need to have some environment variables set up. This is wil Cabal 1.8.0.4 and cabal-install 0.8.2 The cabal support for jhc never worked actually, it wasn't written by me. There really isn't any easy way to integrate cabal with jhc right now, and even if there was, all of hackage has ghc specific dependencies. No doubt the solution to this problem will be involved, I have conciously decided to not think about the issue until I have full haskell 2010 support down pat. That will be more useful for writing portable programs in the short run. Keep up the good work! I have an implementation for STRefs I threw together this afternoon for jhc if you're interested. I can't test it properly, though, with the compiler crash above. Try without the '-v' flag, it shouldn't try printing the non ascii character then. or modify src/Stats.hs and replacet all the C.char constants with ascii equivalants. If there is a good way to test whether the terminal supports non-ascii characters, that would be good to put a test in jhc for. 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] Re: [Haskell] ANNOUNCE: jhc 0.7.4
Brandon S Allbery KF8NH wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 7/10/10 17:01 , Antoine Latter wrote: * The way you use sed doesn't work with the BSD sed that ships with my Mac Book. Installing GNU sed and using it works. Similarly, BSD find doesn't know about '-name', so make hl-clean results in sadness. Haven't looked at sed, but -name should work in any version of find. Are you sure about this? FWIW -name (and -iname) are supported by OSX-10.5 find. And it seems really odd to imagine a find that wouldn't support them... -- Live well, ~wren ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: [Haskell] ANNOUNCE: jhc 0.7.4
John Meacham wrote: On Sat, Jul 10, 2010 at 04:01:53PM -0500, Antoine Latter wrote: * running DrIFT on src/E/TypeCheck.hs fails with an illegal bytesequence in hGetContents. I'm guessing that this is only an issue when building DrIFT with GHC 6.12+, and that the file contains bytes illegal in UTF8. I deleted everything funny looking in the file and then it went smooth Hi, are you compiling from the tarball or the darcs repository? the tarball shouldn't require DrIFT to be installed. I had not tested DrIFT with 6.12 but that file should be in UTF8. Hmm... on OSX, is the default locale a UTF8 one? does ghc 6.12 properly encode to/from utf8 on it by defualt? could you check, I don't have a mac handy. Generally OSX takes UTF16 to be the standard encoding (I don't recall if it's LE or BE), though UTF8 is supported almost everywhere. I haven't checked to see whether that would affect this particular task though. -- Live well, ~wren ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Comments on Haskell 2010 Report
Hi wren, x**0 := 1, by convention. [...] So far as I'm aware, the x**0=1 vs 0**y=0 conflict leads to 0**0 [being] undefined x**0 is 1 /by definition, 0**y naturally is 0, since (for example) 0**2 expands to 0*0 (being 0 of course). So there is not a conflict of two definitions, it's simply a definition somehow /overriding/ the natural attempt. I guess I'm actually messing things up using the word natural - how can expand the multiplication of zero with itself zero times be natural? [...] more helpful in mathematics. /source-please Try it yourself: * Prove the binomial theorem *without* the convention 0**0 := 1 * Consider the function f(x) := x**0 - is it continuous (over the set of natural numbers including zero)? Donald E. Knut writes on the issue [1] (see page 6 of the generated output), defending the position x**0 being 1. Further: C99, Java define it that way. GHC does it that way. Standard Prelude of Haskell 98 Report defines ^ (** for natural numbers) as x ^ 0 = 1 [sic] The convention is also used in 6.4.3: The value of x^0 or x^^0 is 1 for any x, including zero [2] I know it's about ^ in that section, but why should x^0 be 1 and x**0 be undefined? (or: is the natural zero not the real zero?) greetings, Julian [1] http://www-cs-faculty.stanford.edu/~knuth/papers/tnn.tex.gz [2] http://www.haskell.org/onlinereport/basic.html#sect6.4.3 smime.p7s Description: S/MIME cryptographic signature ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: [Haskell] ANNOUNCE: jhc 0.7.4
On Sat, Jul 10, 2010 at 05:38:02PM -0400, wren ng thornton wrote: John Meacham wrote: On Sat, Jul 10, 2010 at 04:01:53PM -0500, Antoine Latter wrote: * running DrIFT on src/E/TypeCheck.hs fails with an illegal bytesequence in hGetContents. I'm guessing that this is only an issue when building DrIFT with GHC 6.12+, and that the file contains bytes illegal in UTF8. I deleted everything funny looking in the file and then it went smooth Hi, are you compiling from the tarball or the darcs repository? the tarball shouldn't require DrIFT to be installed. I had not tested DrIFT with 6.12 but that file should be in UTF8. Hmm... on OSX, is the default locale a UTF8 one? does ghc 6.12 properly encode to/from utf8 on it by defualt? could you check, I don't have a mac handy. Generally OSX takes UTF16 to be the standard encoding (I don't recall if it's LE or BE), though UTF8 is supported almost everywhere. I haven't checked to see whether that would affect this particular task though. Console IO should use the multibyte encoding, which is different than the wide encoding used in some places. Hmm.. on my OSX system the standard multibyte coding appears to be utf8. when you type 'locale' what shows up for LC_CTYPE? mine is en_US.UTF-8, if you set it to a utf8 locale, does jhc work properly? 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: Functional dependencies and Peano numbers
On Sat, Jul 10 2010, wren ng thornton wrote: [...] Yes, you can add multiple dependencies. The syntax is to use , after the first |. While having eight parameters is surely a desperate need for refactoring, there are times when you'd want multiple dependencies. For example, you can say class F a b | a - b, b - a where... to express a bijective function on types (that is, for every pair of A and B, if you know one of them then you know what the other must be uniquely). I know i should read the relevant articles, but how would one express such a bijection using type families? TIA, jao -- You err by thinking simplicity and elegance are mostly cosmetic. Simplicity and elegance are overwhelmingly practical virtues. - William D Clinger, comp.lang.scheme ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: [Haskell] ANNOUNCE: jhc 0.7.4
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 7/10/10 17:15 , Brandon S Allbery KF8NH wrote: Haven't looked at sed, but -name should work in any version of find. Are you sure about this? (maybe I'll suck down the source and audit for platform compatibility) Makefile.in, lines 865, 903, 907: find -wholename isn't portable. Makefile.in, line 93 and many others: combining commands with ; is unreliably portable outside of a {;,,,;} construct (and portable to SVR4 only with the extra semicolons as shown above; GNU usually lets you omit them). Use multiple -e options instead. Also, all of the find invocations assume the default action is -print; this will silently fail on Solaris and other commercial Unixes based on SVR4. - -- 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/ iEYEARECAAYFAkw4/7cACgkQIn7hlCsL25XQugCdHazbd782RJEaM5zL64R1WhTm 2UcAoMrdqQEtzTw9Zh7FpKuPaqQ7rdck =Dq+I -END PGP SIGNATURE- ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: [Haskell] ANNOUNCE: jhc 0.7.4
On Sat, Jul 10, 2010 at 07:18:15PM -0400, Brandon S Allbery KF8NH wrote: On 7/10/10 17:15 , Brandon S Allbery KF8NH wrote: Makefile.in, lines 865, 903, 907: find -wholename isn't portable. Hmm.. I'll have to find a work around for that. Makefile.in, line 93 and many others: combining commands with ; is unreliably portable outside of a {;,,,;} construct (and portable to SVR4 only with the extra semicolons as shown above; GNU usually lets you omit them). Use multiple -e options instead. Hmm.. I am not sure where you mean, the Makefile.in is generated by automake and will be regenerated by autoreconf, where in the Makefile.am (which I wrote) are you refering to? Also, all of the find invocations assume the default action is -print; this will silently fail on Solaris and other commercial Unixes based on SVR4. Cool. fixed these. -- 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] Re: [Haskell] ANNOUNCE: jhc 0.7.4
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 7/10/10 20:09 , John Meacham wrote: On Sat, Jul 10, 2010 at 07:18:15PM -0400, Brandon S Allbery KF8NH wrote: On 7/10/10 17:15 , Brandon S Allbery KF8NH wrote: Makefile.in, lines 865, 903, 907: find -wholename isn't portable. Hmm.. I'll have to find a work around for that. Since you're not using (and don't need) -0, piping through grep should do fine. Makefile.in, line 93 and many others: combining commands with ; is unreliably portable outside of a {;,,,;} construct (and portable to SVR4 only with the extra semicolons as shown above; GNU usually lets you omit them). Use multiple -e options instead. Hmm.. I am not sure where you mean, the Makefile.in is generated by automake and will be regenerated by autoreconf, where in the Makefile.am (which I wrote) are you refering to? I'll have to look for the concordance; I also want to look more closely at the sed commands, as I *think* the semicolon usage should work on at least FreeBSD and OSX (no promises about Net- or Open-). - -- 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/ iEYEARECAAYFAkw5DocACgkQIn7hlCsL25W3GgCdGwJCq4x1NOJPuweo/K4zplkF us0AoLI5lCt88C631K9FsT6ZQoMhWELk =hhNF -END PGP SIGNATURE- ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: [Haskell] ANNOUNCE: jhc 0.7.4
On Sat, Jul 10, 2010 at 4:15 PM, Brandon S Allbery KF8NH allb...@ece.cmu.edu wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 7/10/10 17:01 , Antoine Latter wrote: * The way you use sed doesn't work with the BSD sed that ships with my Mac Book. Installing GNU sed and using it works. Similarly, BSD find doesn't know about '-name', so make hl-clean results in sadness. Haven't looked at sed, but -name should work in any version of find. Are you sure about this? (maybe I'll suck down the source and audit for platform compatibility) Here's the 'sed' error: sed -e 's/^{-# OPTIONS[A-Z_]*/{-# OPTIONS_GHC -w /' -i src/FrontEnd/HsParser.hs sed: -i may not be used with stdin I don't know what's wrong with find on my Mac - I'm running 10.6, and 'which find' tells me I'm running from /usr/bin/find, which I haven't messed with. It isn't build critical, though. Antoine - -- 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/ iEYEARECAAYFAkw44tgACgkQIn7hlCsL25WPQQCg12qq6Snxmpyuxweb56HJul5g GhwAnRu2zM0TWMJKUtY0OT76+vlF6GHY =6lf6 -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] hs-dotnet with Mono?
(If they were direct dependencies --- meaning that .Net bindings used them directly --- then Mono couldn't exist.) I don't know all the details but I do know that .Net is written in C++/com and mono does not have any com. Correct me if I'm wrong but I think calling native from managed is somewhat cross platform via p/invoke but the other way is achieved through either microsoft's api or through mono's api as described herehttp://www.mono-project.com/Embedding_Mono#Invoking_Methods_in_the_CIL_universe . I said in my previous email that afaik there isn't a com for *nix but I have since found this http://linux.lsdev.sil.org/wiki/index.php/Libcom that you could try as a drop in replacement. Best of luck if you try this approach. Thanks Tim ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: [Haskell] ANNOUNCE: jhc 0.7.4
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 7/10/10 23:55 , Antoine Latter wrote: Here's the 'sed' error: sed -e 's/^{-# OPTIONS[A-Z_]*/{-# OPTIONS_GHC -w /' -i src/FrontEnd/HsParser.hs sed: -i may not be used with stdin Aha. in-place sed is a GNU-ism, although NetBSD and FreeBSD ports have native sed_inplace. Most portable is to sed to a temp file and rename, or use an ed script. - -- 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/ iEYEARECAAYFAkw5QmcACgkQIn7hlCsL25XM2gCgpHim5UGl1J5ictN3HrKIAsqy 8kQAn28xZuT07Vdyad00rk3+fPaJOt9q =VYLC -END PGP SIGNATURE- ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] hs-dotnet with Mono?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 7/10/10 23:58 , Tim Matthews wrote: (If they were direct dependencies --- meaning that .Net bindings used them directly --- then Mono couldn't exist.) I don't know all the details but I do know that .Net is written in C++/com and mono does not have any com. And? The whole point of the .net CLR is that the implementation (Windows COM, Mono, etc.) is hidden; you work with the CLR directly, *not* the implementation behind it. (Otherwise, why bother talking to he relatively slow CLR instead of using a native toolkit?) hs-dotnet is binding to the CLR interfaces, *not* the implementation details that the CLR is designed to hide. The CLR itself, of course, needs to link to other libraries supplying its implementation details, but if that ever becomes visible at the level hs-dotnet is using then the CLR is completely useless. - -- 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/ iEYEARECAAYFAkw5Q0AACgkQIn7hlCsL25V8xACfWNgOKatplLerJ7bioRTgHs46 Uu0AniKrSud1cKNplEjNRkq8Qx3bAzNX =3uqb -END PGP SIGNATURE- ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Mapping a Texture in OpenGL?
Hello, I already send this to the HOpenGL list, but I'm kind of in a hurry with this and I'll probabbly get more responses from you... I've been looking for a way to map a texture into a Quad primitive with HOpenGL with no luck. I've already done this in C++ and had no problem. I did the tutorial in http://www.haskell.org/~pairwise/HOpenGL/HOpenGL.html, downloaded the sources, compiled them and it worked great (After changing a 2 lines to make it work with OpenGL's latest version), but when I change the code to use a .rgb file created by me with the program they provide from a .png file of 256x256 pixels I don't have the same luck... My OpenGL version is 2.4.0.1... I'm REALLY lost, clueless, so any kind of help would be greatly appreciated. I checked the textures in the examples of the red book, but they are procedural textures, and I need to map an image. One of the pictures I need to map is in http://dl.dropbox.com/u/1476919/Orange256.png Are six like that one and are for making a Rubik's Cube. After I finish it I'll upload it to hackage and let you all know. Thanks a lot, Héctor Guilarte ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: [Haskell] ANNOUNCE: jhc 0.7.4
On Sat, Jul 10, 2010 at 10:55:14PM -0500, Antoine Latter wrote: Here's the 'sed' error: sed -e 's/^{-# OPTIONS[A-Z_]*/{-# OPTIONS_GHC -w /' -i src/FrontEnd/HsParser.hs sed: -i may not be used with stdin I just removed the sed command, it was just to suppress a bunch of warnings. I am not sure what OSX's sed had an issue with actually. I don't know what's wrong with find on my Mac - I'm running 10.6, and 'which find' tells me I'm running from /usr/bin/find, which I haven't messed with. It isn't build critical, though. I switch the -wholename to -path which my 10.5.8 OSX seems to think is okay and it works on linux. It isn't in the POSIX standard but appears widely supported. I was able to run and compile jhc on my 10.5.8 box, and run the regression test. but when the garbage collector is enabled (enabled with -fjgc) it doesn't work because posix_memalign does not exist. Can you check whether -fjgc works on 10.6? I wish I had some way to regression test OSX builds as part of my standard pre-release tests. Hmm... Windows cross compiling seems a little broken too, but the fix looks easy. I can add windows compilation to the regression test thankfully due to wine so I can fix it for the next release. 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] Re: [Haskell] ANNOUNCE: jhc 0.7.4
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 7/11/10 00:10 , John Meacham wrote: I switch the -wholename to -path which my 10.5.8 OSX seems to think is okay and it works on linux. It isn't in the POSIX standard but appears widely supported. SVR4 find doesn't support either option, sadly. Then again, you may not care about Solaris or HP at this point. I was able to run and compile jhc on my 10.5.8 box, and run the regression test. but when the garbage collector is enabled (enabled with -fjgc) it doesn't work because posix_memalign does not exist. Can you http://stackoverflow.com/questions/196329/osx-lacks-memalign - -- 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/ iEYEARECAAYFAkw5RPwACgkQIn7hlCsL25WxugCgpCyUEWnpCjP9cNFEN4BP1V1z LngAn2WsutlcGGIqjY8DgyPYzY2SpN3q =Yi9P -END PGP SIGNATURE- ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: [Haskell] ANNOUNCE: jhc 0.7.4
On Sun, Jul 11, 2010 at 12:13:48AM -0400, Brandon S Allbery KF8NH wrote: On 7/11/10 00:10 , John Meacham wrote: I switch the -wholename to -path which my 10.5.8 OSX seems to think is okay and it works on linux. It isn't in the POSIX standard but appears widely supported. SVR4 find doesn't support either option, sadly. Then again, you may not care about Solaris or HP at this point. Hey, I used to work for sun on solaris :) Actually, I won't worry about it for now. It is fairly common to have gnu tools available on solaris machines, if it comes up again, I'll look into making an autoconf macro to find a working find or complain appropriately. It is only relevant for people compiling from the darcs repository and not the tarball so it isn't a huge issue. I was able to run and compile jhc on my 10.5.8 box, and run the regression test. but when the garbage collector is enabled (enabled with -fjgc) it doesn't work because posix_memalign does not exist. Can you http://stackoverflow.com/questions/196329/osx-lacks-memalign Hmm.. but this pages seems to indicate it may exist on 10.6, In any case, I can work around missing it at the cost of some wasted memory. http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/man3/posix_memalign.3.html 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] Re: [Haskell] ANNOUNCE: jhc 0.7.4
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 7/11/10 00:26 , John Meacham wrote: On Sun, Jul 11, 2010 at 12:13:48AM -0400, Brandon S Allbery KF8NH wrote: On 7/11/10 00:10 , John Meacham wrote: I switch the -wholename to -path which my 10.5.8 OSX seems to think is okay and it works on linux. It isn't in the POSIX standard but appears widely supported. SVR4 find doesn't support either option, sadly. Then again, you may not care about Solaris or HP at this point. Hey, I used to work for sun on solaris :) Actually, I won't worry about You *really* don't want to see what Horricle has done to poor old Sun. :( De facto, many of us have given up on it. I was able to run and compile jhc on my 10.5.8 box, and run the regression test. but when the garbage collector is enabled (enabled with -fjgc) it doesn't work because posix_memalign does not exist. Can you http://stackoverflow.com/questions/196329/osx-lacks-memalign Hmm.. but this pages seems to indicate it may exist on 10.6, In any case, I can work around missing it at the cost of some wasted memory. mress:50014 Z$ nm /System/Library/Frameworks/System.framework/System|grep mema 000425a9 T _malloc_zone_memalign 000dd5d8 T _posix_memalign 000e1047 t _purgeable_memalign 0003b233 t _szone_memalign ...yep, looks as if. http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/man3/posix_memalign.3.html John - -- 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/ iEYEARECAAYFAkw5SeoACgkQIn7hlCsL25UsGQCgzxBAhm/EuMrw7ljz7TYIb7Rr thoAmQFxxedFHZwmVDkhN8iOzI/kaSi4 =M3g7 -END PGP SIGNATURE- ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Equivalence of two expressions
Hi. On 10.07.10 21:40, Grigory Sarnitskiy wrote: I'm not very familiar with algebra and I have a question. Imagine we have ring K. We also have two expressions formed by elements from K and binary operations (+) (*) from K. In what follows I assume elements from K == variables Can we decide weather these two expressions are equivalent? If there is such an algorithm, where can I find something in Haskell about it? Using distributivity of ring you convert an expression to a normal form. A normal form is a sum of products. If normal forms are equal (up to associativity and commutativity of ring), expressions are equivalent. I am not aware whether Haskell has a library. -- Best regards, Roman Beslik. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe