[Haskell-cafe] Sun OpenSPARC project?
Hello, Is this project open to the entire Haskell community or only students? Regards, Vasili ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] duplicate symbols for ODBC-1.1.4.4 when running with GHCi
when i run a program (which works with GHC) under GHCi (in eclipse with FP support) then i get GHCi linker duplicate definition for symbol _sqlSucceeded whilst processing HSHDBC-odbc-1.1.4.4.o what is wrong here? any suggestion what i can change? thank you andrew ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] duplicate symbols for ODBC-1.1.4.4 when running with GHCi
additional information - the problem occurs only under windows (with ghc 6.8.3), not under linux (ubuntu) - with ghc 6.8.2 with linux (ghc 6.8.2) it executes under ghci. On Sun, 2008-08-17 at 12:21 +0200, Andrew U. Frank wrote: when i run a program (which works with GHC) under GHCi (in eclipse with FP support) then i get GHCi linker duplicate definition for symbol _sqlSucceeded whilst processing HSHDBC-odbc-1.1.4.4.o what is wrong here? any suggestion what i can change? thank you andrew ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Houston-area FPers?
Hi, In less than a week I'll be moving to Houston TX in order to start school at university (University of Houston.) I'm wondering if there are any functional programmers (particularly haskellers) in that part of the state? If so, a group meeting and perhaps eventually a user-group would be lovely - if only to chat and talk about what everybody is working on for the time being until something more formal can be set up. I'm posting this a little early to try and get the most responses possible - unfortunately at the moment I will not have my own mode of transportation around town (see: car) and I'm not a houston native as you can see, so it will take time for me to get up to speed with college *and* getting around town, but if anybody is in that area I'd like to hear back from you. Austin ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] permutations and performance
John D. Ramsdell [EMAIL PROTECTED] wrote: I tried to replace a permutation generator with one that generates each permutation from the previous one, in a stream-like fashion. I had hoped the stream-based algorithm would be more efficient because I use only one permutation at a time, so only the permutation and the previous one need be in memory at one time. I thought I'd share the results of testing the two algorithms. Yes, thanks for the interesting discussion. You may also be interested in the following recent thread: http://www.haskell.org/pipermail/libraries/2007-December/008788.html There, Twan van Laarhoven designs the implementation of the permutations function that is slated to be included in GHC 6.10. That implementation is pretty well tweaked for speed, while satisfying the following condition suggested by David Benbennick: map (take n) (take (factorial n) $ permutations [1..]) == permutations [1..n] It's also interesting that this function has an unusually long history for computer science. Some of the best algorithms were first discovered by English church bell ringers nearly 400 years ago. Knuth discusses permutations in Volume 4 Fascicle 2. Regards, Yitz ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Cabal has trouble with projects that have both src and lib directories?
On Thu, 2008-08-14 at 22:32 -0400, Nicholas Andrews wrote: Hi! I'm trying to set up a project with both src and lib directories with cabal. My blah.cabal file looks like: Library Build-Depends: base Exposed-Modules:Foo hs-source-dirs: lib/foo Executable hai Build-depends: base Main-is:Bar.hs ghc-options:-O hs-source-dirs: src/bar Other-Modules: Foo extra-libraries:Foo extra-lib-dirs: lib/bar You will have to use: Library Build-Depends: base Exposed-Modules:Foo hs-source-dirs: lib/foo Executable hai Build-depends: base Main-is:Bar.hs hs-source-dirs: src/bar, lib/bar Other-Modules: Foo Theo only downside is that the module Foo will be built twice. What's wrong? Currently there is no way for the hai executable to use build-depends: blah, (though that's the obvious way in future that we could let an exe depend on a lib in the same package). See: http://hackage.haskell.org/trac/hackage/ticket/89 http://hackage.haskell.org/trac/hackage/ticket/276 Duncan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] GHC 6.8.3 binary for older linux
On Thu, 2008-08-14 at 16:31 +0800, Agent Zhang wrote: Halo~ I ran into the following error while trying to run a binary generated by GHC 6.8.x on our production machines with a not-so-recent linux installed (kernel 2.6.9). $ ./restyscript restyscript: timer_create: Invalid argument You know we ran into this recently while trying to set up the new hoogle beta on haskell.org itself. (You may be surprised to know that haskell.org does not have ghc installed on it.) So I decided to build a GHC 6.8.3 from source on that old system using GHC 6.4.2. Fortunately, the binary GHC 6.4.2 from haskell.org does work there. The newly-built GHC solves all the problem. No floating-point exception nor invalid argument for timer_create. I've put my binary distribution on my site here: http://agentzh.org/misc/ghc-6.8.3-i386-old-linux.tar.bz2 That may well be useful to people. Thanks for doing the work. Duncan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] darcs hacking sprint (25-26 October)
Dear Haskellers, As Jason mentions, there has been recently been a lot of interest in darcs and an influx of new contributors. Thanks, everybody! Things are moving faster now with a few extra brains on board. We have some very ambitious plans, though and we still need all the help we can get. Do you think you might be interested in participating, but don't really know where to start? We may have just the solution for you: Darcs hacking sprint You are cordially invited to hack on darcs with us for a weekend, specifically, that of 25-26 October. We will primarily be working on performance hacking of all sorts http://wiki.darcs.net/DarcsWiki/Roadmap If there are sufficient new hackers, I plan to prepare an overview and a set of starter tasks to help you get to grips with the darcs code. Venues -- The venues are not yet fixed, although we have some tentative offers for space in London (thanks to Ganesh) and Portland (thanks to Galois). We will also be available via IRC, with some possibility for video-conferencing of some sort. For more information, please see http://wiki.darcs.net/index.html/Sprints If you have any suggestions for possible venues in London, please let me know. Our current London host can accommodate a handful of people, but we would love to have more people joining in on the fun! Also, if there are people who cannot make it to either London and Portland, perhaps you could gather into satellite teams? I hear Boulder, Colorado is a possibility. RSVP If you would like to participate in any way, please let me know * when you are available (25/26 October) * roughly where you are based * if you are willing to travel Again, if you have suggestions for a good London venue, please send them my way. Many thanks! -- Eric Kow http://www.nltg.brighton.ac.uk/home/Eric.Kow PGP Key ID: 08AC04F9 pgpyIQqJiPlj9.pgp Description: PGP signature ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: darcs hacking sprint (25-26 October)
On Sun, Aug 17, 2008 at 21:33:17 +0100, Eric Y. Kow wrote: The venues are not yet fixed, although we have some tentative offers for space in London (thanks to Ganesh) and Portland (thanks to Galois). Correction! We have a tentative offer for space near *Cambridge* (thanks to Ganesh) and to Ian for picking up on the blunder. Thanks! -- Eric Kow http://www.nltg.brighton.ac.uk/home/Eric.Kow PGP Key ID: 08AC04F9 pgp5pu5RzF7Bu.pgp Description: PGP signature ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] FRP question
I'm interested in FRP, have read several of the papers and am wondering if it could be applied to writing multi-client server programs. What would be the input type events for such a system? What would be the output type events? How would the system handle the fact that it has to multiplex several IO streams (sockets)? I'm trying to answer these questions myself and having a hard time. Should input events include new connection requests and shutdowns? Individual bytes? Streams of bytes? or higher level PDUs? What kind of output should be generated? Full PDUs? streams of bytes? Pairs of (connection identifier,data)? How would such a system effectively hide the multiplexed IO going on? Is this sort of problem poorly suited for FRP? Tim Newsham http://www.thenewsh.com/~newsham/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] FRP question
Hi, I'm interested in FRP, have read several of the papers and am wondering if it could be applied to writing multi-client server programs. That's funny: in the last few months, I have developed a functional-reactive framework for large scale distributed system programming. You can find the source code and a technical report here: http://perso.eleves.bretagne.ens-cachan.fr/~dagand/opis/ This code is in OCaml but the concepts can be translated in Haskell: advised by Conal Elliott, I have already written the core of Opis in Haskell (i.e the Arrow instances and a small network simulator) to ensure the feasibility of a purely functional implementation. The implementation in Haskell is based on the Mealy automaton while my code in OCaml efficiently emulates this construct (based on suggestions of Zheng Li, Oleg Kiselyov and Jacques Garrigue). What would be the input type events for such a system? What would be the output type events? How would the system handle the fact that it has to multiplex several IO streams (sockets)? In my system, the input events are network events -- such as a received TCP message or a UDP packet as well as notifications (connection closed, listening on port X, ...) -- or timer events -- such as a timer has just fired, the timer is correctly set up or the timer has been removed -- or user events -- whatever the user wants to signal. The outputs are commands to the launcher system: the launcher will collect these outputs and interpret them in term of (side-effecting) actions. For example, the reactive function might ask to send the data D to peer x: thus, the launcher will connect to x, marshal the data and send it to x. Similarly, you can ask to listen on a network port, set up a timer, send an event to the user, ... The multiplexing is done out of the reactive function, in the launcher system. For networking, for instance, it opens one thread per open connection. Once a thread has retrieved a complete message, it sends it to reactive processing by a Chan (in Control.Concurrent). I hope the technical report is clearer than this rough description. I can send you a more haskeller-friendly paper if you are interested. Should input events include new connection requests and shutdowns? New connection requests are silent whereas a connection shutdown raises an input event. Individual bytes? Streams of bytes? or higher level PDUs? What kind of output should be generated? Full PDUs? streams of bytes? Pairs of (connection identifier,data)? I work at the message level. For instance, the reactive function outputs Send( destination_ip , TCP, data ), then the launcher marshals data and sends it to destination_ip. On the other side, the launcher marshals the received buffer of bytes to the same type and transmits TCP_in( source_ip , data ) to the reactive function. Hence, for the reactive function, values are typed end-to-end, hence reducing the risk of error in marshaling. How would such a system effectively hide the multiplexed IO going on? Personally, I chose to hide this multiplexing on the launcher side, ie. out of the reactive function. As the launcher side is developed once and for all (by me), a Opis' user will not have to deal with multiplexing: she just has to care with processing well-defined inputs by reacting with the correct outputs. Is this sort of problem poorly suited for FRP? According to my experience, developing peer-to-peer systems in Opis has been a great pleasure, because of its simplicity. On the other hand, my architecture is based on the Arrow type to build the reactive functions. Hence, I work hand-in-hand with the type-checker. When developing a protocol in Opis, it is sometimes like working with a theorem prover: if you forget that a given event could occur, the type-checker complains, for example. Hence, in the P2P field, my tool is a complete alien: people say that it looks great but don't want to invest time to learn it... :-( The side-effects of using purely functional structures are plentiful (and well-known here): ease of debugging of pure functions, modularity (given a reactive function, I can run it live on a network, simulate, debug, or model-check it without modification), ease of backtracking (useful for the debugger and the model-checker), reproducibility (see the complexity profiler), provability (see the use of Isabelle's certified code), and so on ... Currently, I'm developing a complete formalisation of the Mealy arrow instance in Coq and, hopefully, one day, I will be able to develop a complete P2P protocol in Coq ;-) Hope this inspires you, Regards, -- Pierre-Evariste DAGAND http://perso.eleves.bretagne.ens-cachan.fr/~dagand/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] X Haskell Bindings
On Sat, Aug 16, 2008 at 04:07:25PM -0500, Antoine Latter wrote: Haskellers, I'm slowly porting XCB (the X C Bindings) to Haskell, and I would like input from any interested parties. The following is a summary of my plan so far. I'm interested in hearing any suggestions or concerns about what a Haskell library for writing X clients should look like. This is not a release announcement, and I can't make any promises about when this will be delivered. Code is available in darcs: -- darcs get http://community.haskell.org/~aslatter/code/xhb Some of the advantages XCB claims over xlib are: + smaller API + latency hiding when communicating with the X server + direct access to the X protocol + improved threading support + easier to extend What I plan for the X Haskell Bindings (XHB) are as follows: + All requests to the server are non-blocking (under most circumstances) + Requests which produce a reply from the server return a token or receipt + The caller may then, at a time of their choosing, query the receipt for the response (or error) from the server. This query is blocking. The API will look something like: -- | Create a window as specified createWindow :: Connection - CreateWindow - IO () -- | Instruct the server that it should begin displaying the named window mapWindow :: Connection - WINDOW - IO () -- | List all of the extensions supported by the server listExtensions :: Connection - IO (Receipt (ListExtensionsReply)) -- | Query a receipt for a response getReply :: Receipt a - IO (Either XError a) Note that the first two requests do not have replies, whereas the third request expects a reply from the server. Since the request to create a window has so many parameters, these parameters are all wrapped up into a CreateWindow data type, which is only ever used by the createWindow function. The mapWindow request only has one parameter, so it does not need it's own MapWindow data type. I think this is a nice idea. This type signature from the X11 library is absolutely unmanageable: createWindow :: Display - Window - Position - Position - Dimension - Dimension - CInt - CInt - WindowClass - Visual - AttributeMask - Ptr SetWindowAttributes - IO Window What I don't have planned out is what to do with the stream of events and errors that come back from the server. If an error is related to an outstanding receipt, it gets dumped there for the caller to examine directly. Other errors go into an error queue. Events go into a similar event queue. How should this queue be exposed in the API? Should the user of the library register an error/event callback? registerErrorCallback :: Connection - (XError - IO ()) - IO () Classic libX11 does this, and it is rather inconvenient to program with. Occasionally it is necessary to handle an error thrown by a specific request, yielding code like this: do h - getHandler c -- save the old handler so we can restore it later setHandler c myHandlingFn performSomeActionsWhichMayFail setHandler c h Not only is this code ugly, it does not work correctly when the connection may be concurrently used by several threads. Or is something like this enough: pollForError :: Connection - IO (Maybe (XError)) waitForError :: Connection - IO XError I think XCB's error system is particularly nice. Requests with no corresponding responses have two variants: unchecked (the default), and checked. Unchecked requests have a void return type, and any errors they generate go in the error queue. Checked requests return a cookie (the same mechanism used for requests with responses) which can be used to collect any errors generated by that response. Each X extension defines its own set of errors and events (potentially). Should all of these be lumped together into one giant sum-type for errors and one for events? Take care, Antoine Cheers, Spencer Janssen ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] X Haskell Bindings
On 2008 Aug 17, at 20:34, Spencer Janssen wrote: On Sat, Aug 16, 2008 at 04:07:25PM -0500, Antoine Latter wrote: Since the request to create a window has so many parameters, these parameters are all wrapped up into a CreateWindow data type, which is only ever used by the createWindow function. The mapWindow request only has one parameter, so it does not need it's own MapWindow data type. I think this is a nice idea. This type signature from the X11 library is absolutely unmanageable: It's never been manageable, even from C (hence XCreateSimpleWindow() in Xlib which defaults most of that). do h - getHandler c -- save the old handler so we can restore it later setHandler c myHandlingFn performSomeActionsWhichMayFail setHandler c h Not only is this code ugly, it does not work correctly when the connection may be concurrently used by several threads. or when the async response comes after the handler's been reset (i.e. you need to call XSynchronize() and handle any errors before resetting the handler). -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [EMAIL PROTECTED] system administrator [openafs,heimdal,too many hats] [EMAIL PROTECTED] electrical and computer engineering, carnegie mellon universityKF8NH ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] permutations and performance
On Sun, Aug 17, 2008 at 11:27 AM, Yitzchak Gale [EMAIL PROTECTED] wrote: There, Twan van Laarhoven designs the implementation of the permutations function that is slated to be included in GHC 6.10. I look forward to Twan's design. I found the Haskell 1.3 definition. -- permutations xs returns the list of all permutations of xs. -- e.g., permutations abc == [abc,bac,bca,acb,cab,cba] permutations:: [a] - [[a]] permutations [] = [[]] permutations (x:xs) = [zs | ys - permutations xs, zs - interleave x ys ] where interleave :: a - [a] - [[a]] interleave x [] = [[x]] interleave x (y:ys) = [x:y:ys] ++ map (y:) (interleave x ys) I like the use of list comprehension, but I was surprised the last line was not: interleave x (y:ys) = (x:y:ys) : map (y:) (interleave x ys) John ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] permutations and performance
On Sat, Aug 16, 2008 at 5:28 PM, Henning Thielemann [EMAIL PROTECTED] wrote: There is _one_ permutation with no elements, namely [], thus it must be | n == 0 = [[]] I see. John ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Houston area FPers....
Hi Austin, I live next to the NASA Johnson Space Center. JSC is minutes away from Uof H Clear Lake. Which campus are you going to? (main campus?). Kind regards, Vasili ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: Fwd: Haskell job opportunity: Platform Architect at Peerium, Inc.
On Fri, 15 Aug 2008 11:29:46 -0700, Don Stewart [EMAIL PROTECTED] wrote: DekuDekuplex: On Thu, 14 Aug 2008 14:17:05 -0700, Don Stewart [EMAIL PROTECTED] wrote: [...] Skills: Proficiency and a strong interest in Haskell programming :) Bachelor's degree in computer science or equivalent from a four-year institution. This is the required background of Haskell-related job offering that I am looking for, except that I happen to be located in Tokyo, Japan. Have you been to the Tokyo user group meetings? They're organised by Starling software, so perhaps a good place to network, http://www.starling-software.com/en/tsac.html Yes, but they were only interested in having me do some writing projects on a non-commercial basis, and I had to work a little late last time and wasn't able to arrive until shortly before the meeting was over, so I wasn't able to network much. Thanks for the tip, though. There is also a Japanese-language Category Theory study group that I often attend (see http://www.sampou.org/cgi-bin/haskell.cgi?CategoryTheory%3A%B7%F7%CF%C0%CA%D9%B6%AF%B2%F1) (the link target is in Japanese). Please let me know if you find anything else. -- Benjamin L. Russell ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] the cabal category field and uploads
Hi Ross, When I upload a code contribution, how do I specify which category in the Hackage database, e.g. System? Kind regards, Vasili ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: Houston area FPers....
Austin, I have a friend (a former tech lead) at Google who told me that http://www.cs.rice.edu/~taha/ ... is doing FP research Rice U. Kind regards, Vasili On Sun, Aug 17, 2008 at 9:47 PM, Galchin, Vasili [EMAIL PROTECTED]wrote: Hi Austin, I live next to the NASA Johnson Space Center. JSC is minutes away from Uof H Clear Lake. Which campus are you going to? (main campus?). Kind regards, Vasili ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] the cabal category field and uploads
vigalchin: Hi Ross, When I upload a code contribution, how do I specify which category in the Hackage database, e.g. System? add: category: System to your project's .cabal file ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] the cabal category field and uploads
thanks, Don! Vasili ;^) On Sun, Aug 17, 2008 at 11:37 PM, Don Stewart [EMAIL PROTECTED] wrote: vigalchin: Hi Ross, When I upload a code contribution, how do I specify which category in the Hackage database, e.g. System? add: category: System to your project's .cabal file ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe