[Haskell-cafe] Library Versioning
Hello, I have a question about cabal versioning. It's possible to export in a cabal library a version, so instead of getting version from: import Paths_my_package( version ) I want to get version from my library using: import MyPackage( version ) And then using this from programs. Thanks, Luis ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Library Versioning
You can export things from one module that are defined in other modules. > For example: > > > module MyPackage ( version, ... ) > > > import Paths_my_package( version ) > > ... > > Yes indeed, but I getting ugly errors (undefined references to version I think) when use Paths_my_package from library, and i don't know a better fix: /home/cabellos/.cabal/lib/skema-server-0.1.0/ghc-6.12.3/libHSskema-server-0.1.0.a(Main.o): In function `r4HU_info': (.text+0x3ef9): undefined reference to `skemazmserverzm0zi1zi0_Pathszuskemazuserver_version1_closure' /home/cabellos/.cabal/lib/skema-server-0.1.0/ghc-6.12.3/libHSskema-server-0.1.0.a(Main.o): In function `s5TE_info': (.text+0x8e03): undefined reference to `__stginit_skemazmserverzm0zi1zi0_Pathszuskemazuserver_' Also, I'm using Dyre, It's possible that recompile proccess of dyre cause the error. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Library Versioning
> > Did you tell cabal that Paths_my_package is a part of your library? If it > is referenced by your code, then it should be listed in either > "exposed-modules" or "other-modules", otherwise it won't be installed. I've > never used dyre so I don't know whether it would cause any issues, but I > suspect not. > > Thank's a lot, the use of other-models fix my problem! ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Haskell Platform Older Releases for Linux
Hi, I search the Haskell Platform webpage for older releases, I found it but maybe it's worth to put a table of older releases as tar.gz file with their ghc dependency, like (versions totally make up): HP 2011.2.0.0 source, March 2011. -> ghc 13.1 HP 2010.2.0.0 source, July 2010. -> ghc 3.14 HP 2010.1.0.0 source, March 2010. -> ghc 616 HP 2009.2.0.2 source, July 2009. -> ghc 1 HP 2009.2.0.1 source, June 2009. -> ghc 0 HP 2009.2.0 source, May 2009. -> ghc -1 Thanks, Luis ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Haskell Platform Older Releases for Linux
Thanks, i can check the ghc version on cabal file. On Fri, Sep 9, 2011 at 6:53 PM, Joachim Breitner wrote: > Hi, > > Am Freitag, den 09.09.2011, 13:02 +0200 schrieb Luis Cabellos: > > > >I search the Haskell Platform webpage for older releases, I found > > it but maybe it's worth to put a table of older releases as tar.gz > > file with their ghc dependency, like (versions totally make up): > > > > > > HP 2011.2.0.0 source, March 2011. -> ghc 13.1 > > HP 2010.2.0.0 source, July 2010. -> ghc 3.14 > > HP 2010.1.0.0 source, March 2010. -> ghc 616 > > HP 2009.2.0.2 source, July 2009. -> ghc 1 > > HP 2009.2.0.1 source, June 2009. -> ghc 0 > > HP 2009.2.0 source, May 2009. -> ghc -1 > > > > some of the releases have a stable link such as > http://hackage.haskell.org/platform/2010.1.0.0/ > but unfortunately not all. > > Greetings, > Joachim > > > -- > Joachim "nomeata" Breitner > m...@joachim-breitner.de | nome...@debian.org | GPG: 0x4743206C > xmpp: nome...@joachim-breitner.de | http://www.joachim-breitner.de/ > > > ___ > 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] ANN: OpenCL 1.0.1.3 package
Hello, all. I want to show you the OpenCL package. I have done this using Jeff Heard OpenCLRaw package, but I create a new one due the lack of updates of the former. # Where to get it * Hackage page (http://hackage.haskell.org/package/OpenCL) * Repository (https://github.com/zhensydow/opencl) * Bugs (https://github.com/zhensydow/opencl/issues) * Examples (https://github.com/zhensydow/opencl/tree/master/examples). # Things: * I write it's high-level binding to OpenCL libraries, but only because I added more types to hide most of the alloc/free of the API, and hide the enums using c2hs enums. * The worst problem of the OpenCLRaw is the bad types it use, I learn to fix 32/64 bits issues with c2hs, and test it on linux machines. * Tested on Linux + NVidia only. * Jason Dagit is helping with Windows, OSX testing in own fork, also the call-conv fork in github has changes to work on Windows Please, Consider it's on experimental status but it works, I need lots of feedbacks for detect posible errors, Thanks, ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANN: OpenCL 1.0.1.3 package
On Mon, Oct 3, 2011 at 6:04 PM, Jason Dagit wrote: > On Mon, Oct 3, 2011 at 3:56 AM, Luis Cabellos > wrote:Your bindings are a higher quality than the the OpenCLRaw bindings and > you're doing good technical work, but I stopped using your bindings > for a couple reasons: > * The main reason is that I'm not comfortable with the license > you're using. The original code by Jeff Heard was BSD3 with an > additional copyright notice. Your code is AGPL3. The GPL is known to > cause problems with Haskell code due to cross module inlining. I > don't know how the "A" in AGPL changes things. > I understand your point. I didn't know the problems with cross module inlining that Haskell suffers. I learned the BSD3, I think is a good and I'll change it on github and I'll put in the next release. > * Some of the exposed function names have been changed from the > original name in the OpenCL specification. This is the same thing > that was done with the OpenGL bindings and it is very confusing for > people who come to the Haskell bindings from the official > documentation. I realize that some of the API functions require some > bit of name mangling, but I think the current way is not the right > way. For example with this function: > > http://www.khronos.org/registry/cl/sdk/1.0/docs/man/xhtml/clGetDeviceInfo.html I use the pattern get[Type]Info -> to get[Type][specificInfo] where specificInfo is the OpenCL name of an enumerate. I don't know if your proposal, I open a ticket on github to think about. > We could have a different version of the function for each return > type, clGetDeviceInfo_FPConfig, clGetDeviceInfo_AddressBits, etc. > It's a great naming convention but it has the property that someone > searching the bindings or the bindings' haddocks for clGetDeviceInfo > will find those functions. I think this is better than naming it > clGetDeviceExtensions, which is not in the OpenCL specification. > > I'd still be willing to test the changes you have, I just don't want > to contribute to your bindings due to the license. I currently > thinking of starting my own bindings (Jeff's bindings contain too many > small bugs and if I'm going to change most lines of code then I might > as well start from scratch so that it can have a standard BSD3 > license). > > Jason > I'll change the License to BSD3, Please, keep testing the code and merge back your changes. I thank for your help. Thanks for the feedback. Luis ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANN: OpenCL 1.0.1.3 package
On Tue, Oct 4, 2011 at 7:46 PM, Jason Dagit wrote: > On Tue, Oct 4, 2011 at 12:54 AM, Luis Cabellos > wrote: > > > I understand your point. I didn't know the problems with cross module > > inlining that Haskell suffers. I learned the BSD3, I think is a good and > > I'll change it on github and I'll put in the next release. > > Oh cool. Thanks! I think that's for the best. Someone sent me a > link to this offline: > https://github.com/judah/HsOpenCL > > Maybe the two implementations can be merged into one super implementation > :) Thanks for the hint. It appears to be a good source (great source, far better than OpenCL), It's worth to follow it. > I see. My experience with the OpenGL bindings is that it can still be > confusing for users of the library. The reason is simple, there are > good docs for using the API from C and those docs tend to match the > official specification. So people who are new to the Haskell bindings > will need some documentation that explains how to go from the C API to > the Haskell API. Otherwise users will need to read the source code > directly to figure out where the function they need to call is > located. Good haddocks help, but that's just one part of the > solution. Being able to search for the function by name is also > useful, so that's why I proposed adding something on to the end of the > function name. So that people using search in their browser on the > haddocks or using grep at the command line would find the function(s) > they are looking for and (hopefully) minimize time spent searching. > > It's a shame because, if we had dependent types we could encode the C > API directly into Haskell. > I'll think about, i put it in the issue. > Thanks and I'll probably look at it some more this weekend. I have a > test program I'm working on but I would need to port it to your > bindings. Thank again, :) > Also, if you use the #fun macro from c2hs to create the foreign > imports you will need to use at least version 0.16.4 as previous > versions do not honor stdcall. > > Jason > ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANN: OpenCL 1.0.1.3 package
On Thu, Oct 13, 2011 at 9:13 PM, Martin Dybdal wrote: > Hi everyone > > I just found this thread today, as I don't read Haskell-cafe that > often (too bad, I know). I have been working on a set of OpenCL > bindings for the last months myself, which I'm using to implement an > OpenCL backend to the Data.Array.Accelerate library. The work is done > at the HIPERFIT research center, Uni. Copenhagen. > > My bindings are even further from the naming conventions of the OpenCL > library, but I really can't see the problem with that. People which > are used to programming OpenCL from C/C++ might have to learn how the > naming conventions of the Haskell library are, but they only need to > do this once. When the mapping between the old and the new naming > conventions are learned, they will benefit from having a more clean > interface for all future times. (No Haskell hacker should have a > problem with a steep learning curve.) I'll just add, haddock + hoogle has done a lot remove the learn all names necessity. > It is somewhat troubling that we now have five different interfaces to > OpenCL (that I know of), and I think we should join efforts and make > one library that is as stable as possible. The five libraries are: > > * OpenCL > * OpenCLRaw > * HsOpenCL > * hopencl > * The library presented by Benedict Gaster at AMD (yet to be released) > ( > http://developer.amd.com/zones/OpenCLZone/publications/assets/MakingOpenCLSimplewithHaskell.pdf > ) * OpenCLRaw for me is a dead one. The main developer make no reply. * OpenCL, HsOpenCL and hopencl are the packages more suitable tu fuse. I think that the best aproach is to use the OpenCL standard API as it is, and let more libraries that use *opencl* packages decide what high-level API offer. I like the Accelerate approach to show a better API to users. I currently working in the application that need the use of OpenCL. The package that I develop offers all I need for now, so I not upgrading it, only bugs or requested features for users. But in the future I plan for two options: a) change to the *opencl* package that gets mainstream, or b) continue with own OpenCL package because it feels ok. > My own library is available at https://github.com/HIPERFIT/hopencl and > will be released on hackage very soon (next week probably). Please > take a look at it. It is currently tested on x86_64 Linux with both > the AMD x86/x86_64 bindings and NVIDIAs CUDA bindings. They will > probably not work on Windows in their present state, and I don't have > access to a Windows machine to test it on. As Jason Dagit say, I put the stdcall call convention option in OpenCL for windows: https://github.com/zhensydow/opencl/blob/master/OpenCL.cabal Other issues to solve, How to compile in hackage server to generate documentation online? opencl.h isn't in the server so I getting errors. > > -- > Martin Dybdal > ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] ANN: OpenCL 1.0.2.2 package
Hello, all. I update the OpenCL package with a better error handle using Control.Exception. Thanks all comments in the previous version, and issues in github. # Where to get it * Hackage page (http://hackage.haskell.org/package/OpenCL) * Repository (https://github.com/zhensydow/opencl) * Bugs (https://github.com/zhensydow/opencl/issues) # Changes: * Changed LICENSE to BSD3 * Changed error from 'IO (Either CLError a)' to IO a + CLError exceptions * Added creation of programs using precompiled binaries (added example program) * Better documentation. Thanks, Luis Cabellos ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANN: OpenCL 1.0.2.2 package
I update the package to 1.0.2.3 addid several changes from Elliott Hird, in special a better install proccess with includes added to package tree. On Wed, Nov 23, 2011 at 4:00 PM, Luis Cabellos wrote: > Hello, all. > > I update the OpenCL package with a better error handle using > Control.Exception. > > Thanks all comments in the previous version, and issues in github. > > # Where to get it > > * Hackage page (http://hackage.haskell.org/package/OpenCL) > * Repository (https://github.com/zhensydow/opencl) > * Bugs (https://github.com/zhensydow/opencl/issues) > > # Changes: > > * Changed LICENSE to BSD3 > * Changed error from 'IO (Either CLError a)' to IO a + CLError exceptions > * Added creation of programs using precompiled binaries (added example > program) > * Better documentation. > > Thanks, > Luis Cabellos > > ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Traypoweroff questions
Hi, I just put an application into hackage http://hackage.haskell.org/package/traypoweroff. I made this application to allow a tray icon in xmonad to poweroff and reboot my computer. But I dislike two things I made. The first one is the use of */sbin/poweroff* and */sbin/reboot* with system call. I feel than i should be a better way to do the poweroff or the reboot. err <- system "sudo /sbin/reboot" The second issue is, the user need to put into sudoers the permission to execute reboot and poweroff. The use of *sudo* seems a little awkward. I'll like a cleaner installation without force user touch configuration files. myuser ALL=(ALL) NOPASSWD: /sbin/poweroff Thanks for the help, Luis Cabellos p.d: I'll add suspend with pm-suspend command in the next version BTW ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] ANN: OpenCL 1.0.3.0 package
Hello, I update the OpenCL package with the last changes. The most important thing, currently it fully implements OpenCL 1.0. IMPORTANT, some functions change signature (e,g: clSetKernelArg, and clCreateContext* ) Thanks all comments in the previous version, issues and pulls in github. # Where to get it * Hackage page (http://hackage.haskell.org/package/OpenCL) * Repository (https://github.com/zhensydow/opencl) * Bugs (https://github.com/zhensydow/opencl/issues) # Changes * Move to Control.Parallel.OpenCL (thanks Jason Dagit) * Added Image functions * Added clExecuteNativeKernel * Fixes on Windows, Macos and Linux versions (thanks Anthony Cowley, ehird, axman6) * Fix bug with preprocessor code in OpenCL source code * Fix clSetKernelArg to allow cannot specify size of local memory arrays Thanks, Luis Cabellos ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Haddock question
Hello, I follow the How to Write a Haskell program from http://www.haskell.org/haskellwiki/How_to_write_a_Haskell_program, but I have a problem with Haddock. I use Windows XP, I when I install GHC + Haddock I have this warning output C:\code\haskell\test> runhaskell Setup.hs haddock Preprocessing executables for Test-0.0... Running Haddock for Test-0.0... Warning: cannot use package Test-0.0: ghc-pkg failed Warning: cannot use package base-2.0: does not exist.y $topdir\html\libraries\base There is something generated in dist\doc\html\test path but only the main function page but it don't has the comments from *.hs file. I use --prefix=c:\programs instead of --prefix=$HOME in configure. Because I am working on Windows. I don't use darcs, but I think that it's not the problem. -- Thanks a lot, Luis Cabellos ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Haddock question
Ok, With your example I realized that I don't write the type signature declaration of anything. Without the type Haddock don't put the comments from code in the generated doc. Now it works. Thanks. Luis On 11/26/06, Donald Bruce Stewart <[EMAIL PROTECTED]> wrote: It appears to be an error in current haddock when interacting with ghc 6.6. If you use haddock 0.8, the error message is there, but the documentation is still generated, so should be ok: $ runhaskell Setup.lhs haddock Preprocessing executables for haq-0.0... Running Haddock for haq-0.0... Warning: cannot use package haq-0.0: ghc-pkg failed Warning: cannot use package base-2.0: HTML directory /home/dons/share/ghc-6.6/html/libraries/base does not exist. Warning: Main: the following names could not be resolved: IO $ w3m -dump dist/doc/html/haq/Main.html haq Contents Index Main Synopsis main :: IO () Documentation main :: IO () main runs the main program Produced by Haddock version 0.8 So grab haddock 0.8 and try that. http://haskell.org/haddock/#Download -- Don ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] 9.3 - (2 * 4.5) => 0.3000000000000007
You should read http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.22.6768 If you want to be efficient with floats. Language independent. Luis On Wed, Jan 16, 2013 at 2:25 PM, ivan dragolov wrote: > > 9.3 - (2 * 4.5) => 0.3007 > > I expected 0.3 > > ? > > -- > Иван Драголов > dragolov.net > > GSM: 0888 63 19 46 > GSM за SMS: 0878 82 83 93 > facebook.com/ivan.dragolov > twitter.com/dragolov > > ___ > 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] Poll & plea: State of GUI & graphics libraries in Haskell
However, I would prefer to have two different types of libraries in haskell: For graphics, something like SFML or SDL, no GUI implicit. but with good/modern OpenGL. Maybe we won't need a direct binding, but rethinking who should be done a SDL-like library in Haskell. Yep, FRP is cool, but need clever people. Whenever I try to do a pet-game with that.. I always come back to C++. And for GUI, I had good feeling of gtk bindings in the past. Luis On Fri, Sep 27, 2013 at 5:32 AM, Conal Elliott wrote: > I'm polling to see whether there are will and expertise to reboot graphics > and GUIs work in Haskell. I miss working on functional graphics and GUIs in > Haskell, as I've been blocked for several years (eight?) due to the absence > of low-level foundation libraries having the following properties: > > * cross-platform, > * easily buildable, > * GHCi-friendly, and > * OpenGL-compatible. > > The last several times I tried Gtk2hs, I was unable to compile it on my > Mac. Years ago when I was able to compile, the GUIs looked and interacted > like a Linux app, which made them awkward and upleasant to use. wxHaskell > (whose API and visual appearance I prefered) has for years been > incompatible with GHCi, in that the second time I open a top-level window, > the host process (GHCi) dies abruptly. Since my GUI & graphics programs are > often one-liners, and I tend to experiment a lot, using a full compilation > greatly thwarts my flow. For many years, I've thought that the situation > would eventually improve, since I'm far from the only person who wants GUIs > or graphics from Haskell. > > About three years ago, I built a modern replacement of my old Pan and > Vertigo systems (optimized high-level functional graphics in 2D and 3D), > generating screamingly fast GPU rendering code. I'd love to share it with > the community, but I'm unable to use it even myself. > > Two questions: > > * Am I mistaken about the current status? I.e., is there a solution for > Haskell GUI & graphics programming that satisfies the properties I'm > looking for (cross-platform, easily buildable, GHCi-friendly, and > OpenGL-compatible)? > * Are there people willing and able to fix this situation? My own > contributions would be to test and to share high-level composable and > efficient GUI and graphics libraries on top of a working foundation. > > Looking forward to replies. Thanks, > > -- Conal > > ___ > 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