Re: [Haskell-cafe] Poll plea: State of GUI graphics libraries in Haskell
Hi Conal! Yes. I'd be very interested to help get Pan and Vertigo working. Do you have a repo somewhere? Conrad. On 27 September 2013 13:32, Conal Elliott co...@conal.net 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
Re: [Haskell-cafe] ordNub
On 16 July 2013 10:31, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: On 16 July 2013 11:46, John Lato jwl...@gmail.com wrote: In my tests, using unordered-containers was slightly slower than using Ord, although as the number of repeated elements grows unordered-containers appears to have an advantage. I'm sure the relative costs of comparison vs hashing would affect this also. But both are dramatically better than the current nub. Has anyone looked at Bart's patches to see how difficult it would be to apply them (or re-write them)? If I understand correctly, this function is proposed to be added to Data.List which lives in base... but the proposals here are about using either Sets from containers or HashSet from unordered-containers; I thought base wasn't supposed to depend on any other package :/ This discussion (on -cafe@) is just about what course of action to take; adding such functions to containers or unordered-containers would not require a libraries@ proposal. Conrad. On Mon, Jul 15, 2013 at 8:43 PM, Clark Gaebel cgae...@uwaterloo.ca wrote: Apologies. I was being lazy. Here's a stable version: import qualified Data.HashSet as S hashNub :: (Ord a) = [a] - [a] hashNub l = go S.empty l where go _ [] = [] go s (x:xs) = if x `S.member` s then go s xs else x : go (S.insert x s) xs Which, again, will probably be faster than the one using Ord, and I can't think of any cases where I'd want the one using Ord instead. I may just not be creative enough, though. - Clark On Mon, Jul 15, 2013 at 12:46 AM, Brandon Allbery allber...@gmail.com wrote: On Sun, Jul 14, 2013 at 7:54 AM, Clark Gaebel cgae...@uwaterloo.ca wrote: Oops sorry I guess my point wasn't clear. Why ord based when hashable is faster? Then there's no reason this has to be in base, it can just be a Did the point about stable fly overhead? -- brandon s allbery kf8nh sine nomine associates allber...@gmail.com ballb...@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net ___ 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 -- Ivan Lazar Miljenovic ivan.miljeno...@gmail.com http://IvanMiljenovic.wordpress.com ___ 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] ordNub
On 15 July 2013 09:54, Joey Adams joeyadams3.14...@gmail.com wrote: On Sun, Jul 14, 2013 at 7:31 AM, Clark Gaebel cgae...@uwaterloo.ca wrote: Similarly, I've always used: import qualified Data.HashSet as S nub :: Hashable a = [a] - [a] nub = S.toList . S.fromList And i can't think of any type which i can't write a Hashable instance, so this is extremely practical. This won't yield results lazily (e.g. nub (repeat 'x') = _|_ instead of 'x' : _|_), but Niklas' ordNub will. His ordNub can be translated directly to HashSet and still have the stability and laziness properties. A difficulty with putting ordNub in Data.List is that it depends on containers, which is outside of the base package. Some options: * Move the implementation of Set to base. * Implement a lean version of Set in base that only provides 'insert' and 'member'. * Define ordNub in Data.Set instead. Adding a Hashable-based nub to base would be even more problematic, since you'd need Hashable in base. Right, I suggest the following community course of action: 1a) add ordNub to Data.Set 1b) add ordNub to Data.Hashable (1 day) 2) make a libraries@ proposal to include a stripped-down Data.Set-like balanced binary tree implementation to base. (2 weeks) 3) bikeshed about the name, eg.: * is nub really intuitive? how about uniq, like in perl/ruby/underscore.js? * but uniq in unix only removes _adjacent_ duplicates, confusing! * how about distinct? sole? unique? azygous? (7 weeks) 4) Failing consensus on technical grounds (that the stripped-down Data.Set implementation is overkill for one library function), agree that anyone who really cares should just use the version from containers or hashable. Only newbs and textbook authors actually use base anyway, and it's impossible to change the language definition. Prelude will continue to fulfil its role of avoiding success at all costs, quadratic or otherwise. (Please, let's have both 1a and 1b :) Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] tangential request...
On 24 June 2013 23:02, Mark Lentczner mark.lentcz...@gmail.com wrote: Again, I'd say the sample doesn't bear that out. The samples with console fonts showed no signs of customization, and so one might infer that it is more likely that people are using them because they just came that way (and/or changing it is too difficult for the perceived benefit.) Haha, you've succumbed to my adroit minimalism again, Mr. Lentczner. I have taken much pride in customizing my console font for readability, codeability and /pizzazz/. Next time you ask for a screenshot I shall rather send you a copy of my .Xdefaults file, pirate. Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Testing invasive proposals with Hackager
On 13 June 2013 09:59, Niklas Hambüchen m...@nh2.me wrote: In many discussions we make guesses about how much code proposals like Functor = Monad would break. You can use https://github.com/dterei/Hackager to build all of Hackage (preferably in a VM). Of course many packages have external dependencies, so I'd like to share the following list of packages to save you some time. (These are the names of packages suited for a Ubuntu 13.04 VM, and with these installed, 2800 packages are successfully built and 1700 failing, so it's quite good coverage. If you find more packages that improve on this, please add them.) awesome! How do we add packages to the list; do you have a github repo for it? Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Hackage Update Brigade
On 29 May 2013 08:54, Lyndon Maydwell maydw...@gmail.com wrote: How can I join the group? by asking any of the current members :) I've added you. P.S. I've attached a simple image for the Gravatar if it looks okay. great, can you add it? Conrad. On Tue, May 28, 2013 at 12:40 PM, Conrad Parker con...@metadecks.org wrote: On 28 May 2013 05:29, Alexander Solla alex.so...@gmail.com wrote: As per recent discussions, I'm making a list of volunteers who are willing to pick up some slack in Hackage package maintenance, so that we can submit an amendment to the Haskell Prime Committee's ticket 113 (http://hackage.haskell.org/trac/haskell-prime/ticket/113) I think that showing that people are willing to pick up missing package maintainer's slack will alleviate the concern of breaking lots of code by refactoring the monad/applicative/functor hierarchy. Code will be broken, but publicly available packages can be fixed by the community during a staging period. To that end, I have made a Google Form to collect some volunteer information. If you are interested in helping, please visit: https://docs.google.com/forms/d/1o4B8CEE_42u9f-sgmu2t5iSEvm0cq6-um6g_fHJt6GE/viewform For that proposal, there is also an informal github group for updating unmaintained packages, which anyone willing is welcome to join: https://github.com/haskell-pkg-janitors cheers, Conrad. ___ 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 mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Hackage Update Brigade
On 28 May 2013 05:29, Alexander Solla alex.so...@gmail.com wrote: As per recent discussions, I'm making a list of volunteers who are willing to pick up some slack in Hackage package maintenance, so that we can submit an amendment to the Haskell Prime Committee's ticket 113 (http://hackage.haskell.org/trac/haskell-prime/ticket/113) I think that showing that people are willing to pick up missing package maintainer's slack will alleviate the concern of breaking lots of code by refactoring the monad/applicative/functor hierarchy. Code will be broken, but publicly available packages can be fixed by the community during a staging period. To that end, I have made a Google Form to collect some volunteer information. If you are interested in helping, please visit: https://docs.google.com/forms/d/1o4B8CEE_42u9f-sgmu2t5iSEvm0cq6-um6g_fHJt6GE/viewform For that proposal, there is also an informal github group for updating unmaintained packages, which anyone willing is welcome to join: https://github.com/haskell-pkg-janitors cheers, Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Stream processing
On 11 May 2013 19:24, Ertugrul Söylemez e...@ertes.de wrote: However, my real question hasn't been answered so far. Is my formulation of the stream processing problem accurate/complete? Yes, you've summarized the commonly asked questions well. Perhaps you could make a wiki page which lists out these questions, and provide links to each of the answers from Oleg's site or elsewhere. cheers, Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Hackage checking maintainership of packages
On 6 May 2013 09:42, Felipe Almeida Lessa felipe.le...@gmail.com wrote: Just checking the repo wouldn't work. It may still have some activity but not be maintained and vice-versa. ok, how about this: if the maintainer feels that their repo and maintenance activities are non-injective they can additionally provide an http-accessible URL for the maintenance activity. Hackage can then do an HTTP HEAD request on that URL and use the Last-Modified response header as an indication of the last time of maintenance activity. I'm being a bit tongue-in-cheek, but actually this would allow you to point hackage to a blog as evidence of maintenance activity. I like the idea of just pinging the code repo. Conrad. On Sun, May 5, 2013 at 2:19 PM, Doug Burke dburke...@gmail.com wrote: On May 5, 2013 7:25 AM, Petr Pudlák petr@gmail.com wrote: Hi, on another thread there was a suggestion which perhaps went unnoticed by most: -- Forwarded message -- From: Niklas Hambüchen m...@nh2.me Date: 2013/5/4 ... I would even be happy with newhackage sending every package maintainer a quarterly question Would you still call your project X 'maintained'? for each package they maintain; Hackage could really give us better indications concerning this. This sounds to me like a very good idea. It could be as simple as If you consider yourself to be the maintainer of package X please just hit reply and send. If Hackage doesn't get an answer, it'd just would display some red text like This package seems to be unmaintained since D.M.Y. Best regards, Petr For those packages that give a repository, a query could be done automatically to see when it was last updated. It's not the same thing as 'being maintained', but is less annoying for those people with many packages on hackage. Doug ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- Felipe. ___ 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] Google Summer of Code Proposal - Communicating with mobile devices
On 3 May 2013 08:53, Marcos Pividori marcospivid...@gmail.com wrote: Greetings, I am a Computer Science student from Argentina. I am interested in working this summer in a project related to Haskell for the Google Summer of Code. I have been discussing my idea with Michael Snoyman in order to have a clearer idea. Now, I would like to know the community interest in this project. I want to develop a server-side library in Haskell for sending push notifications to devices running different OS, such as Android, iOS, Windows Phone, BlackBerry, and so on. To pass a subject, I have recently worked with Yesod (a Web Framework based in Haskell) developing a server to comunicate with Android-powered devices through Google Cloud Messaging. (It is available: https://github.com/MarcosPividori/Yesod-server-for-GCM – It is a Spanish commented version because it was a project for my University, I will replace it for an English version in the next weeks) To develop this project, I have read a lot about this service and Yesod libraries, and I developed two programs, a server written in Haskell and an Android application for mobile phones. Also, I developed an EDSL to write programs which exchange information with the devices. I would be really grateful if you could give me your opinion about this project and the proposal. I want some feedback in order to know if this would be a useful tool and what you would like to get out of it. Communicating with mobile devices Abstract The aim of this project is to develop a server-side library in Haskell for sending push notifications to devices running different OS, such as Android, iOS, Windows Phone, BlackBerry, and so on. The fact is that every company is developing Push Notification services, and these are very similar. Then, I want to find the fundamental concepts to construct a library which enable to configure the options for the different services and send messages easily. When I say they are very similar, I refer to the fact that they all are asynchronous, best-effort services that offers third-party developers a channel to send data to apps from a cloud service in a power-efficient manner. The most popular are: - Google Cloud Messaging (Android) - Apple Push Notification Service (iPhone / iPad) - Microsoft Push Notification Service (Windows Phone) - BlackBerry Push Service (BlackBerry) - Windows Push Notification Services (Windows 8) - etc. Once we have this libraries, I will investigate the possibility of mainting a back and forth communication between a server and mobile devices and I will develop a library to handle this. Motivation and expected benefits I think this idea would be very useful because it will allow all Haskell developers to open to a new world of mobile devices and to build useful programs/services that interact with them. Pushing data to smartphones provides users with instant access to desired updates as they happen, such as news and weather, sports scores, stock prices and other time-sensitive content. The push services provide an efficient way to quickly push timely information updates to many smartphones at once, in a centrally managed and controlled manner. Generally, you can also be very selective in who you send information to, including individual customers or many customers (multicast). This services minimizes the impact on the smartphones battery life. Instead of actively checking for new data, the applications can remain closed. Once the data is delivered, the application can be launched in the background to process it as needed. This processes offer an alternative to other less efficient methods, such as polling, where a device regularly polls an application server to see if new content is available. The main differences between the services, refer to details as: the maxim payload length, the quality of service, queueing the messages or not, and the time limit for this, the way the messages are handled in the devices, etc. As all the libraries to access to these services are developed in Java, I thought that it would be a good idea to offer an option to Haskell programmers. Taking advantage of the similarity of these services, I could develop a very adaptable library which fits the necessities for each one and at the same time offer an abstraction to the user. Deliverables. * An API library to build and send messages including: - GCM and a demo Android app. - APN and a demo iOS app. - Microsoft Push Notification Service (Windows Phone) and a demo app. - Documentation for all the code developed. Including the explantation on how to use the server library and how to try the demo apps. * A library to handle a back and forth comunication between a server and mobile devices. Tools to mantain a state of the connection and manage with a lot of devices at the same time. A Yesod app example of the
Re: [Haskell-cafe] Markdown extension for Haddock as a GSoC project
On 30 April 2013 09:28, Richard A. O'Keefe o...@cs.otago.ac.nz wrote: On 29/04/2013, at 10:04 PM, kudah wrote: On Mon, 29 Apr 2013 18:04:47 +1200 Richard A. O'Keefe o...@cs.otago.ac.nz wrote: so that there is no possibility of catching errors early; by definition in that processor there are no errors. Haddock's markup isn't any better in that regard. Did I praise Haddock? I spent two hours on my first day with haddock figuring out that I needed an empty comment line before a code block. It didn't issue any warnings or errors either. Report that as a bug. For what it's worth, I've resurrected an old design I did and have been playing with it to see just how bad it really is to use something like @iword than _word_. Everyone agrees it's useful to have @ilegible markup :) I'm impressed with Mateusz' balanced summary of the issues and look forward to his GSoC project submission about _Markdown_. Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] GSoC Project Proposal: Markdown support for Haddock
On 6 April 2013 01:57, John Wiegley jo...@fpcomplete.com wrote: Johan Tibell johan.tib...@gmail.com writes: I suggest that we implement an alternative haddock syntax that's a superset of Markdown. Definite +1 from me too. +1 Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Associated types for number coercion
On 20 March 2013 06:58, Christopher Done chrisd...@gmail.com wrote: From the paper Fun with Type Funs, it's said: One compelling use of such type functions is to make type coercions implicit, especially in arithmetic. Suppose we want to be able to write add a b to add two numeric values a and b even if one is an Integer and the other is a Double (without writing fromIntegral explicitly). And then an Add class is defined which can dispatch at the type-level to appropriate functions which resolve two types into one, with a catch-all case for Num. Has anyone put this into a package, for all common arithmetic operations? I would use it. Doing arithmetic stuff in Haskell always feels labored because of having constantly convert between number types. hmatrix takes this approach with a Mul typeclass for combinations of Vector and Matrix multiplication, defined for things that can implement Product (real and Complex Doubles and Floats). http://hackage.haskell.org/packages/archive/hmatrix/0.14.1.0/doc/html/Numeric-Container.html I think it'd be interesting for numeric stuff to have implicit conversion to Double, using a class as you suggest which doesn't support Integral or bitops. Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANN: monad-bool 0.1
On 23 January 2013 08:04, John Wiegley jo...@fpcomplete.com wrote: monad-bool implements a pair of Boolean monoids and monads, to support short-circuiting, value-returning computations similar to what Python and Ruby offer with their native and || operators. ... Use 'onlyIf' with AndM and AndMT to guard later statements, which are only evaluated if every preceding 'onlyIf' evaluates to True. For example: foo :: AndM Int foo = do onlyIf (True == True) return 100 onlyIf (True == True) return 150 onlyIf (True == False) return 200 When run with `evalAndM foo (-1)` (where (-1) provides a default value), 'foo' returns 150. Use 'endIf' with OrM and OrMT to chain statements, which are only executed if every preceding 'endIf' evaluated to False. For example: bar :: OrM Int bar = do endIf (True == False) return 100 endIf (True == False) return 150 endIf (True == True) return 200 John, these sound powerful, but how would I do something esoteric like if/elseIf/endIf ? Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANN: monad-bool 0.1
On 23 January 2013 09:25, John Wiegley jo...@fpcomplete.com wrote: Conrad Parker con...@metadecks.org writes: these sound powerful, but how would I do something esoteric like if/elseIf/endIf ? Can you show me an example of what you'd like to express? Your examples look vaguely like an if/elseif/else block from other languages, so I was wondering if mimicking that was possible. Also, can this be used with RebindableSyntax? http://www.haskell.org/ghc/docs/7.0.2/html/users_guide/syntax-extns.html#rebindable-syntax Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] delete http://www.haskell.org/haskellwiki/Haskell_IDE
On 29 November 2012 01:08, Roman Beslik rabes...@gmail.com wrote: Hi. There is more verbose page http://www.haskell.org/haskellwiki/IDEs . I registered on http://www.haskell.org/haskellwiki/ , but have not found the Delete Page command, wiki software help pages, or feedback channel, so I'm writing here. I think the right thing to do is replace the page contents with: #REDIRECT [[IDEs]] Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANNOUNCE: Sylvia, a lambda calculus visualizer
On 27 September 2012 14:51, Chris Wong chrisyco+haskell-c...@gmail.com wrote: Hello all Some of you in the audience may have read Dave Keenan's paper, [To Dissect a Mockingbird][]. A subset of that may have wondered if it was possible to generate those pretty pictures programmatically. For that subset, I can answer to you -- yes, yes you can. [To Dissect a Mockingbird]: http://dkeenan.com/Lambda/ Sylvia is a lambda calculus visualizer. It takes in an expression in the untyped lambda calculus and spits out a pretty picture. Nice, it builds and runs fine for me. Perhaps you could include a few more example commandlines to get started? Running without arguments (as the README.mkd suggests) just prints the help text. This is still in very early alpha, but it renders a fair number of combinators correctly. I plan to add animated reduction (once I figure out how to do it), and eventually develop this into a sandbox game of some sort. I'm hoping to get some comments and ideas on how I can take it from here. I'd love to see a game which incrementally teaches reduction and expansion steps in the way that DragonBox [http://dragonboxapp.com/] teaches algebra. That would be a learning mode like Angry Birds, where new combinator birds are introduced every few levels and a small selection of useful birds are provided to help solve each level. (Lambda calculus really should be a kids' game, grown-ups always make it seem more complex than it is). Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Platform Versioning Policy: upper bounds are not our friends
On 16 August 2012 03:38, Bryan O'Sullivan b...@serpentine.com wrote: Hi, folks - I'm sure we are all familiar with the phrase cabal dependency hell at this point, as the number of projects on Hackage that are intended to hack around the problem slowly grows. I am currently undergoing a fresh visit to that unhappy realm, as I try to rebuild some of my packages to see if they work with the GHC 7.6 release candidate. Likewise ... A substantial number of the difficulties I am encountering are related to packages specifying upper bounds on their dependencies. This is a recurrent problem, and its source lies in the recommendations of the PVP itself (problematic phrase highlighted in bold): I think part of the problem might be that some packages (like bytestring, transformers?) have had their major version number incremented even despite being backwards-compatible. Perhaps there are incompatible changes, but most of the cabal churn I've seen recently has involved incrementing the bytestring upper bound to 0.11 without requiring any code changes to modules using Data.ByteString. IMO it'd be better to include a separate versioning entry like libtool's version-info, consisting of Current:Revision:Age (http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html), and leave the published version for human, marketing purposes. I remember discussing this with Duncan at ICFP last year, and he suggested that the existing PVP is equivalent to the libtool scheme in that the major release should only be incremented if backwards-compatibility breaks. However I think people also expect to use the published version as a kind of marketing, to indicate that the project has reached some milestone or stability, or is part of some larger, separately versioned group of packages (eg. new compiler or platform release). The PVP pretty much ensures that incrementing a major version for such reasons is going to break your package for all its users. Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] wondering about a MonadIO instance for a heap data type
On 12 July 2012 06:19, Qi Qi qiqi...@gmail.com wrote: Hi, I was wondering about creating an instance of MonadIO for a heap data. Any hints? data Heap a = E | T Int a (Heap a) (Heap a) deriving (Eq, Ord, Read, Show) The reason is that I want to use liftIO during a heapsort to print out intermediate results. If you just want this for debugging, you're probably better off using Debug.Trace to print the intermediate results. Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Why does (++ !) bla return bla! and not !bla?
On 22 June 2012 12:54, Hilco Wijbenga hilco.wijbe...@gmail.com wrote: Hi all, I'm going through the excellent http://learnyouahaskell.com tutorial. So far it's been pretty easy to follow but now I ran into something that (when I later started reading about maps) do not seem to fully grasp. I think I'm close to understanding why (++ !) bla returns bla! instead of !bla but I seem to be missing the last step. :-) I noticed that ((++) !) bla does indeed return !bla. So it seems to be related to the infix property of ++? The types of (++) !, ((++) !), and (++ !) are all the same so that doesn't tell me much. Would someone please nudge me in the right direction? What can you say about (! ++) ? Stripping the infix, what is (++) bla ! ? Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] webcam library on github
On 25 May 2012 06:20, . ch.go...@googlemail.com wrote: Hello Cafe, since I haven't found anything like that, I wrote a small library [1] to read from a webcam in Haskell, using V4L on Linux. It uses the v4l2 package and repa for images. Is anyone interested in contributing to that, or giving some hints on how it could be made faster (I am not sure if I use repa correctly for best performance at all times), or just in emitting any other constructive comments? If yes, please give me a shout. PS I would put the whole thing on hackage, but my cabal currently doesn't want to do an sdist. I've downloaded and built this. I had to also download Claude Heiland-Allen's v4l2 source from gitorious, as that package does not seem to be on hackage (though his other related packages are). I guess your package won't build on hackage until v4l2 is uploaded ... In any case I was able to run cabal sdist. It gave a warning about no Setup.hs file; I've sent you a pull request which adds this, and also relaxes some library constraints in the cabal file. Two questions: * you've set the license to GPL3, but the C libraries it builds on are LGPL-2.1 (libv4l2) and repa and the haskell bindings it uses are BSD3. GPL3 seems a bit restrictive for a library. * the name hsimage is fairly broad, I'd suggest a simpler name like repa-v4l2. If you want to support other device APIs or add other software image processing routines, I think it would make more sense to put those in separate packages. cheers, Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] good lightweight web-framework like sinatra?
On 23 March 2012 04:55, Mark Wotton mwot...@gmail.com wrote: Try Miku. https://github.com/nfjinjing/miku some oddnesses around redefining (-) (I guess Jinjing Wang doesn't like the way $ looks?) but you don't need to import the Air.Light stuff. Otherwise more or less a straight port of sinatra, and you can run it on heroku... Hi Mark, Is it possible to use Miku without hack2-handler-snap-server? Conrad. mark On Wed, Mar 21, 2012 at 1:45 PM, serialhex serial...@gmail.com wrote: i'm looking for something lightweight, that dosnt need it's own server, can easily run on cgi on an apache with minimal work, and dosn't have many dependancies. i was looking at yesod, but it is bigger than i need for my site (at this point) and would take too much work to get running on my webhost. though i am looking forward to learning it and using it in the future, i just need something that will play nicely with apache cgi... justin p.s. if anyone is interested to know i'm using nearlyfreespeach.net as my host... haskell is one of the many languages they support via cgi, but, at the moment, it is kind of difficult to get yesod or rails or the like to work on it... :-/ -- * The wise man said: Never argue with an idiot. They bring you down to their level and beat you with experience. * As a programmer, it is your job to put yourself out of business. What you do today can be automated tomorrow. ~Doug McIlroy No snowflake in an avalanche ever feels responsible. --- CFO: “What happens if we train people and they leave?” CTO: “What if we don’t and they stay?” ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- A UNIX signature isn't a return address, it's the ASCII equivalent of a black velvet clown painting. It's a rectangle of carets surrounding a quote from a literary giant of weeniedom like Heinlein or Dr. Who. -- Chris Maeda ___ 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] ANN: network-socket-options 0.1
On 24 February 2012 01:01, Joey Adams joeyadams3.14...@gmail.com wrote: On Wed, Feb 22, 2012 at 10:23 PM, Johan Tibell johan.tib...@gmail.com wrote: But the network package doesn't try to let you work with raw file descriptors elsewhere (e.g. send and recv.) I'm not saying that functions on Fds aren't useful, they are, just that the network package is the wrong place for them. I'd put them in the unix package. Putting them in the unix package means they won't be available for Windows (where I needed them the most). what about unix-compat (and making that a dep of network)? Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANN: network-socket-options 0.1
On 21 February 2012 14:57, Joey Adams joeyadams3.14...@gmail.com wrote: I added a new package containing wrappers for getsockopt and setsockopt: http://hackage.haskell.org/package/network-socket-options The network package already has getSocketOption and setSocketOption. The problem is, these don't work for socket options that aren't represented by integers, such as SO_LINGER: http://trac.haskell.org/network/ticket/23 Another, less serious problem is that getSocketOption and setSocketOption don't leverage the type system as well as they could. Many options are boolean values; it'd be better to get and set them with 'Bool's instead of 'Int's. network-socket-options implements options using getter and setter functions, e.g.: getLinger :: HasSocket sock = sock - IO (Maybe Seconds) setLinger :: HasSocket sock = sock - Maybe Seconds - IO () type Seconds = Int The HasSocket type class is defined to overload the getters and setters to work on raw file descriptors, not just Socket objects. This functionality should probably go in the network package itself. However, I decided to release it as a separate package so I could start using it sooner. If people like it enough, perhaps the network package can absorb it, as was done with network-bytestring. Hi Joey, awesome! I've prepared some patches for network to add this module and its tests, in this branch: https://github.com/kfish/network/tree/options I didn't modify any other modules, perhaps Network.Socket.Options should be re-exported from Network.Socket, and perhaps {get,set}SocketOption should be deprecated? network$ autoreconf network$ cabal configure --enable-tests network$ cabal build network$ cabal test Running 3 test suites... Test suite options: RUNNING... Test suite options: PASS Test suite logged to: dist/test/network-2.3.0.11-options.log Test suite uri: RUNNING... Test suite uri: PASS Test suite logged to: dist/test/network-2.3.0.11-uri.log Test suite simple: RUNNING... Test suite simple: PASS Test suite logged to: dist/test/network-2.3.0.11-simple.log 3 of 3 test suites (3 of 3 test cases) passed. Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Hackage 2 maintainership
On 15 February 2012 00:16, Ben Gamari bgamari.f...@gmail.com wrote: On Tue, 14 Feb 2012 02:06:16 +, Duncan Coutts duncan.cou...@googlemail.com wrote: On 14 February 2012 01:53, Duncan Coutts duncan.cou...@googlemail.com wrote: Hi Ben, snip Ah, here's the link to my last go at getting people to self-organise. http://www.haskell.org/pipermail/cabal-devel/2011-October/007803.html Excellent. I'll give it a read-through. You should find it somewhat useful. It gives an overview of people who are / have been involved. It seems the first task will be to identify exactly what needs to be done before we can begin the transition and record these tasks in a single place. I don't have a particularly strong opinion concerning where this should be (Trac, the Hackage wiki, the github issue tracker that's been mentioned), but we should consolidate everything we have in a single place. just my 2c, but I'd find it much easier to see project activity, active branches and open issues if it was all on github :) Conrad. We did get another reasonable push at the time. In particular Max did a lot of good work. I'm not quite sure why it petered out again, I'd have to ask Max what went wrong, if it was my fault for letting things block on me or if it was just holidays/christmas. Maintaining momentum is hard. This is quite true. I'll try to keep a constant push. On another note, how did your full mirroring go last night? Cheers, - Ben P.S. Duncan, sorry for the duplicate message. ___ 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] The State of Testing?
On 3 February 2012 06:30, Michael Craig mks...@gmail.com wrote: I'm comfortable writing tests in QuickCheck and HUnit and bundling them as optional executables with cabal, but I understand there's a better way. Specifically, I'm looking at the test-framework package and cabal's (newish) test-suite sections. Are these two used together or each to the exclusion of the other? Is there something else I should be using? I've followed what Johan Tibbell did in the hashable package: http://hackage.haskell.org/packages/archive/hashable/1.1.2.2/hashable.cabal You can see that it depends on test-framework and test-framework-quickcheck2 packages, and uses these in a cabal Test-suite stanza. It works pretty well for me (in zoom-cache). Note that you need to cabal configure --enable-tests before building your package and running cabal test. cheers, Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] The State of Testing?
On 3 February 2012 08:30, Johan Tibell johan.tib...@gmail.com wrote: On Thu, Feb 2, 2012 at 4:19 PM, Conrad Parker con...@metadecks.org wrote: I've followed what Johan Tibbell did in the hashable package: If I had known how much confusion my childhood friends would unleash on the Internet when they, at age 7, gave me a nickname that's spelled slightly differently from my last name, I would have asked them to pick another one. ;) lol, sorry, I actually double-checked the number of l's before writing that but didn't consider the b's. For future reference I've produced a handy chart: Letter | Real-name count | Nickname count ---+-+--- b | 1 | 2 l | 2 | 0 ---+-+--- SUM| 3 | 2 K. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] feed release plan
On 14 January 2012 04:05, Johan Tibell johan.tib...@gmail.com wrote: On Fri, Jan 13, 2012 at 10:46 AM, Simon Michael si...@joyful.com wrote: Aha, thanks both. The haskell organisation looks bigger, I think I'd like to upload feed there. Could the owner add contact info or a how-to-join note to the page ? The Haskell organization on GitHub is for core libraries (i.e. the Haskell Platform) only at this point. It exists to make it easier for a few maintainers to maintain all those libraries. haskell-pkg-janitors on the other hand is for non-core packages that have become unmaintained and need a bit of love, but you don't necessarily want to commit to long-term maintenance. The idea is that anyone in the group is welcome to upload a new release. I've added you on the off-chance you want to upload things there :) Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Composing Enumeratees in enumerator
On 24 December 2011 05:47, Michael Craig mks...@gmail.com wrote: I've been looking for a way to compose enumeratees in the enumerator package, but I've come up with nothing so far. I want this function (=$=) :: Monad m = Enumeratee a0 a1 m b - Enumeratee a1 a2 m b - Enumeratee a0 a2 m b I'm building a modular library on top of enumerator that facilitates reading time series data from a DB, applying any number of transformations to it, and then writing it back / doing something else with it. I'd like to be able to write simple transformations (enumeratees) and compose them without binding them to either a db reader (enumerator) or db writer (iteratee). I've been looking at the iterIO package as a possible alternative, because it seems to allow easy composition of Inums (enumeratees). I'm a little skittish of it because it seems unpopular next to enumerator. Hi Michael, You could also look at the iteratee package. This is the signature of the () operator: () :: (Nullable s1, Monad m) = (forall x. Enumeratee s1 s2 m x) - Enumeratee s2 s3 m a - Enumeratee s1 s3 m a it's quite useful for composing enumeratees, likewise its friend () swims the other way. http://hackage.haskell.org/packages/archive/iteratee/0.8.7.5/doc/html/Data-Iteratee-Iteratee.html cheers, Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Poll: Do you want a mascot?
I wouldn't mind getting a lamb-astronaut tshirt with a lambda-bind logo on it for my kid, and maybe next month a lion-skateboarder with a lambda-bind on his deck, and then maybe something with a dinosaur. I guess I don't really want a mascot either, but I like this artwork. Conrad. On 24 November 2011 06:18, Erik de Castro Lopo mle...@mega-nerd.com wrote: heathmatlock wrote: Question: Do you want a mascot? No. I also really think this poll should have been in a web site somewhere and not on this list. Erik -- -- Erik de Castro Lopo http://www.mega-nerd.com/ ___ 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] A Mascot
On 22 November 2011 13:22, Jeremy Shaw jer...@n-heptane.com wrote: Sheep are generally thought of as: - weak and needing protection - easily lead astray - being lead to the slaughter - dumb and easily lost Cool, so Haskell is made for people like me! I think Haskeller's like Haskell because it is: - elegant - sophisticated - reliable - robust Sounds boring! I like Haskell because it is fun :) Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Drawing charts over a lot of data
On 21 November 2011 22:36, Felipe Almeida Lessa felipe.le...@gmail.com wrote: This doesn't directly solve your problem, but you may want to take a look at zoom-cache [1]. I've never used it myself, but it seems pretty nice. Cheers, [1] http://hackage.haskell.org/package/zoom-cache Hi, zoom-cache is useful for managing time-series data. There is a zoom-cache-gnuplot in development, and it would probably be useful to make a tool that uses Chart. I'm happy to help with that :) Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Hackage feature request: E-mail author when a package breaks
On 1 November 2011 03:43, Alexander Kjeldaas alexander.kjeld...@gmail.com wrote: On 31 October 2011 17:22, Yitzchak Gale g...@sefer.org wrote: Gregory Crosswhite wrote: could [Hackage] have a feature where when a working package breaks with a new version of GHC the author is automatically e-mailed? This would be nice. However, there would have to be a way for it to be turned on and off by the author. (Spam is not nice.) How about sending an email to haskell-package-packate-name@haskell.org, and then people can join that mailing list if they are interested in that sort of stuff? Mailman is good at doing subscribe and unsubscribe. +1 I like this because it is opt-in for the maintainer, and also allows anyone else who is interested in the package to track it. Per-package RSS updates of build failures would also be useful. Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Hackage feature request: E-mail author when a package breaks
On Nov 1, 2011 8:45 PM, Daniel Díaz Casanueva dhelta.d...@gmail.com wrote: Then, the mailing list seems to be an option. But then I will receive mails for every package, and there is a lot of packages! Is not a lot of mails this? There is another work around? Nobody would read every build error for thousands of packages; such a list is useless as-is, and requires any recipient to customize filters to be of any use. Per-package removes the need for filters: just subscribe to the packages you care about. An rss feed would be perfect: it's easy to ignore old reports. Also, implementing rss is just a matter of generating one more web page per package: no mailserver or list config required. Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] blanket license for Haskell Platform?
Isn't the question just about packages included in the Haskell Platform, for which The current set of [acceptable] licenses is just the BSD3 license: http://trac.haskell.org/haskell-platform/wiki/AddingPackages#Interimlicensepolicy http://trac.haskell.org/haskell-platform/ticket/85 It might be reassuring to companies that want to depend on the platform if the policy was moved from Interim to Official; at least that would mean there would be community pressure not to relicense anything in the platform from BSD3 to (say) GPL. Conrad. On 25 October 2011 22:42, Jeremy O'Donoghue jeremy.odonog...@gmail.com wrote: IANAL, but I'll bite, since I have needed to live with this for quite some time now. Obviously readers are directed to take independent legal advice before they do anything for themselves, and all of the other standard disclaimers. On 25 October 2011 11:58, Eric Y. Kow eric@gmail.com wrote: On Tue, Oct 25, 2011 at 21:46:21 +1100, Ivan Lazar Miljenovic wrote: - My user is concerned that a large number of having a large number of individual licenses even though textually identical modulo author, date, etc would mean a big hassle getting their lawyers and their user's lawyers to sign off on each and every license Why do their lawyers all need to sign off individually for BSD licenses (which if memory serves all platform libraries have to be licensed under, or some variant thereof)? At most it just means they need to lump them all into one big text file somewhere saying which libraries they used... (then again, IANAL, and don't charge by the hour to consider these complex technical questions :p). The first thing to say is that this is actually a very responsible attitude on the client's part. When legal review is conducted it is not just the license which needs to be checked: What implications does this license carry for my business model. BSD is considered benign in this respect. GPL and LGPL work for some models but not others. Does the purported copyright holder actually have the right to issue the software under the given license. The second is much more time consuming. It is straightforward to do this if the software in question was written by one person, but when contributions come from multiple people it becomes more difficult. For example if a project receives a contribution which the contributor did on company time, they may not even have the right to make that contribution (because the employer paid for, and hence owns it). There have similarly been cases where a developer has taken code from, say, a GPL project and imported it into their own differently licensed project. This second case is particularly difficult, as there *may* be cases when it is acceptable (e.g. under fair use in some jurisdictions) to extract small portions of a work and re-use them, but in most cases the developer simply does not have the right to make the contribution. There are sub-cases of these, for example where one developer has removed the copyright notices placed by the original author, even though licensing has been kept the same. This is legal (if ethically dubious) in some jurisdictions and illegal in others. A related issue: can a project *prove* that contributors have all formally licensed their code contributions under the same license? As far as the law is concerned, you really need this in writing, or something very close to it (e.g. e-mail with full header information). Personally I think we should give praise and recognition to anyone who thoroughly checks and complies with the license attached to a piece of code as they are taking care to respect the wishes of the author. I get much more fired up about those who simply break licenses and hope they don't get caught. I find the whole thing baffling myself. I'd thought this would be the sensible thing to do, but I guess when it comes to these licensing things it's not the actual pain that counts, but the perceived potential pain. Know what I mean? It's similar to the won't touch with a 10ft pole attitude to the GPL that some entities may take. It's basically a precautionary la la la; I can't hear you or a conservative stance which consists of I don't understand this stuff, so I'm going to do the thing that seems safest to me, which may or may not be a reasonable reaction... I am not sure that anyone 'understands' the GPL with real certainty [1]. Key questions: when does a work fall into the category of 'derived' under the GPL and when does it not do so? If I make money from licensing Intellectual Property, what are the consequences of code which grants an implicit patent license? Neither of these clauses of the GPL has been properly tested in a significant legal jurisdiction (and anyway, a Code Napoleon style jurisdiction might take a different stance than under UK/US style Common Law). Well, it would need copyright attribution/agreement of
[Haskell-cafe] haskell-janitors (was Re: New rss maintainer)
On 22 October 2011 22:52, Bas van Dijk v.dijk@gmail.com wrote: I released a new rss: http://hackage.haskell.org//package/rss-3000.2.0 It no longer requires old-time and is tested with the latest versions of its dependencies. On 21 October 2011 17:34, Vincent Hanquez t...@snarc.org wrote: Perhaps, unless someone step up, it would be nice to move packages that have no maintainer anymore into a github organisation (haskell-janitors ?), Nice idea! However I think we should always strive for having a single or a limited number of maintainers. Finally when nobody wants to take over a package we can hand it over to haskell-janitors. I like the janitors idea because it is practical, and I also like the ideal world where every package has an active maintainer. How about we set up the haskell-janitors github group as Vincent suggests, with some basic rules like: * when you upload a package you put your name and email address in the maintainer field, with a comment saying that you are maintaining this package through the haskell-janitors group * anyone in the haskell-janitors group can upload a new version of a package which is maintained through the haskell-janitors group. When you do so you set (or prepend?) your name as maintainer. * if anyone anywhere ever gets keen to take exclusive maintenance of a project, to redesign it or whatever, they're welcome to take it out of haskell-janitors. Goals would be: * timely uploads (anyone can upload) * accountability (you put your name on it) * packages still have someone who can accept patches, answer questions etc. (you put your name on it) Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] hello Haskell
On 24 October 2011 10:57, Daniel Fischer daniel.is.fisc...@googlemail.com wrote: On Monday 24 October 2011, 03:54:09, Erik de Castro Lopo wrote: R J wrote: hey Haskell this is nuts http://www.business10i.com hey Haskell this is nuts ://xxx.xxx.xxx Maybe its time to moderate all newcomers to this list, at least until they post one non-spam message to the list. Just for the record, not a newcomer, and has non-spam messages, e.g. http://www.haskell.org/pipermail/haskell-cafe/2010-May/077871.html http://www.haskell.org/pipermail/haskell-cafe/2010-May/078054.html There was a recent hotmail exploit, with people reporting their account sent spam, see eg: https://plus.google.com/117020778736538274606/posts/4yMP7iDshCf I'd be in favor of graylisting or unsubscribing anyone who uses hotmail. Conrad. If you need volunteers to do this moderation I'll stick my hand up. Erik ___ 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] ANNOUNCE: vector-bytestring-0.0.0.0
On 15 October 2011 23:18, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: On 16 October 2011 01:15, Bas van Dijk v.dijk@gmail.com wrote: I agree that you shouldn't use ByteStrings or Vectors of Word8s for Unicode strings. However I can imagine that for quick sessions in ghci it can be quite handy if they are shown as strings. For example, currently we have: import Network.HTTP.Enumerator simpleHttp http://code.haskell.org/~basvandijk/; Chunk html\nheadtitleBas van Dijk/title/head\nbody\nh1Bas van Dijk/h1\n\npEmail: a href=\mailto://v.dijk@gmail.com\;v.dijk@gmail.com/a/p\n\npNick on IRC: ttbasvandijk/tt/p\n\na href=\http://www.haskellers.com/user/basvandijk/\;\n img src=\http://www.haskellers.com/static/badge.png\; \n alt=\I'm a Haskeller\\n border=\0\\n/a\n\npSee my a href=\https://github.com/basvandijk\;GitHub/a page for a list of projects I work on./p\n\n/body\n/html\n Empty If ByteStrings were not shown as strings this would look like: Chunk ( fromList [60,104,116,109,108,62,10,60,104,101,97,100,62,60,116,105,116,108,101,62,66,97,115,32,118,97,110,32,68,105,106,107,60,47,116,105,116,108,101,62,60,47,104,101,97,100,62,10,60,98,111,100,121,62,10,60,104,49,62,66,97,115,32,118,97,110,32,68,105,106,107,60,47,104,49,62,10,10,60,112,62,69,109,97,105,108,58,32,60,97,32,104,114,101,102,61,34,109,97,105,108,116,111,58,47,47,118,46,100,105,106,107,46,98,97,115,64,103,109,97,105,108,46,99,111,109,34,62,118,46,100,105,106,107,46,98,97,115,64,103,109,97,105,108,46,99,111,109,60,47,97,62,60,47,112,62,10,10,60,112,62,78,105,99,107,32,111,110,32,73,82,67,58,32,60,116,116,62,98,97,115,118,97,110,100,105,106,107,60,47,116,116,62,60,47,112,62,10,10,60,97,32,104,114,101,102,61,34,104,116,116,112,58,47,47,119,119,119,46,104,97,115,107,101,108,108,101,114,115,46,99,111,109,47,117,115,101,114,47,98,97,115,118,97,110,100,105,106,107,47,34,62,10,32,32,60,105,109,103,32,115,114,99,61,34,104,116,116,112,58,47,47,119,119,119,46,104,97,115,107,101,108,108,101,114,115,46,99,111,109,47,115,116,97,116,105,99,47,98,97,100,103,101,46,112,110,103,34,32,10,32,32,32,32,32,32,32,97,108,116,61,34,73,39,109,32,97,32,72,97,115,107,101,108,108,101,114,34,10,32,32,32,32,32,32,32,98,111,114,100,101,114,61,34,48,34,62,10,60,47,97,62,10,10,60,112,62,83,101,101,32,109,121,32,60,97,32,104,114,101,102,61,34,104,116,116,112,115,58,47,47,103,105,116,104,117,98,46,99,111,109,47,98,97,115,118,97,110,100,105,106,107,34,62,71,105,116,72,117,98,60,47,97,62,32,112,97,103,101,32,102,111,114,32,97,32,108,105,115,116,32,111,102,32,112,114,111,106,101,99,116,115,32,73,32,119,111,114,107,32,111,110,46,60,47,112,62,10,10,60,47,98,111,100,121,62,10,60,47,104,116,109,108,62,10]) Empty Personally, I don't work in ghci that often so I don't care that much if we have or don't have specialized Show instances for Vectors of Word8s. So what do other people think about this? Actually, for my current use case of Bytestrings (binary encoding of graphs using existing encoding schemes), I would prefer this [Word8]-based Show instance as it would help with my debugging, since the output looks along the lines of: Chunk (fromList [3,2,3,0,3,1,3,0,2,2,1,0]). I am the first to admit that my use case is probably different from others though. And I often work with mixed text/binary data (eg. text annotations in video streams). I'd want the Show/Read instances to be in the form of a hexdump with char representation alongside (like xxd or od -xc output). It roundtrips well, so why not? :-) Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Question on `runState'
On 17 October 2011 23:59, Captain Freako capn.fre...@gmail.com wrote: In this excerpt from the `StateArrow' page: runState :: Arrow a = StateArrow s a e b - a (e, s) (b, s)Source what's the significance of having written StateArrow s a e b, instead of StateArrow s a b c? In the context of that page, do you think e might stand for something? btw. what's the URL? Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANN: hit a reimplementation of git storage in haskell.
Hi Vincent, great stuff! I've also got an in-progress toy git clone called ght: http://github.com/kfish/ght. It only reads, no write support and no revspec parsing. I tried to keep close to the git design, using mmap and Ptr-based binary search to read pack indices etc. Doing so seems fairly un-Haskelly but turned out surprisingly neat, what with Haskell being the world's finest imperative programming language and all. Conrad. On 5 October 2011 05:15, Vincent Hanquez t...@snarc.org wrote: Hi Haskellers, I just want to announce the hit project [1], which is a reimplementation of low level git operations to read *AND* write to a git repository. It support reading from anything i threw at it (loose objects, packed objects, deltas), a subset of revisions specifier (man gitrevisions), and writing new objects (blob, tree, commit, tag). I don't necessarily want to re-implement git itself (although patches welcome if someone want to go in this direction), and as such the project is a bit of a toy to investigate git storage (for another project of mine) and superseeding my own libgit project (for yet another project). Yet it should be completely functional and have good performance. A few word of the implementation: it's very IO based at the moment; The way things are done by git, doesn't necessarily cope with pure and nice stuff if performance need to follow. That said it should still be easier to understand than reading the git source :-) Any comments welcome, [1] http://hackage.haskell.org/package/hit/ -- Vincent ___ 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] Composing a list of Enumeratees into an Enumerator using ($=)
2011/10/4 Román González romanand...@gmail.com: Hey guys, Right now I'm facing with a type problem that is really nasty, I want to compose a list of enumeratees using the ($=) operator to create a new enumerator. Whenever I'm trying to use the foldx function in conjunction with ($=) I get this error: :t foldr ($=) interactive:1:7: Occurs check: cannot construct the infinite type: b0 = Step ao0 m0 b0 Expected type: Enumerator ao0 m0 (Step ao0 m0 b0) - Enumeratee ao0 ao0 m0 b0 - Enumeratee ao0 ao0 m0 b0 Actual type: Enumerator ao0 m0 (Step ao0 m0 b0) - Enumeratee ao0 ao0 m0 b0 - Enumerator ao0 m0 b0 In the first argument of `foldr', namely `($=)' In the expression: foldr ($=) :t Prelude.foldl ($=) interactive:1:15: Occurs check: cannot construct the infinite type: b0 = Step ao0 m0 b0 Expected type: Enumerator ao0 m0 (Step ao0 m0 b0) - Enumeratee ao0 ao0 m0 b0 - Enumerator ao0 m0 (Step ao0 m0 b0) Actual type: Enumerator ao0 m0 (Step ao0 m0 b0) - Enumeratee ao0 ao0 m0 b0 - Enumerator ao0 m0 b0 In the first argument of `Prelude.foldl', namely `($=)' In the expression: Prelude.foldl ($=) interactive:1:15: Occurs check: cannot construct the infinite type: b0 = Step ao0 m0 b0 Expected type: Enumerator ao0 m0 (Step ao0 m0 b0) - Enumeratee ao0 ao0 m0 b0 - Enumerator ao0 m0 (Step ao0 m0 b0) Actual type: Enumerator ao0 m0 (Step ao0 m0 b0) - Enumeratee ao0 ao0 m0 b0 - Enumerator ao0 m0 b0 In the first argument of `Prelude.foldl', namely `($=)' In the expression: Prelude.foldl ($=) Obviously there is something I don't quite understand about the ($=) (=$) functions, how can one compose a list of enumeratees, is it even possible? Hi, what are you trying to actually do, ie. what kind of data are you trying to transform, what are the inputs and outputs of each enumeratee? are you trying to feed the output of the first enumeratee into the input of the second, and so on? or are you trying to run them all in parallel? Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Converting wiki pages into pdf
On Sep 9, 2011 7:33 AM, mukesh tiwari mukeshtiwari.ii...@gmail.com wrote: Thank your for reply Daniel. Considering my limited knowledge of web programming and javascript , first i need to simulated the some sort of browser in my program which will run the javascript and will generate the pdf. After that i can download the pdf . Is this you mean ? Is Network.Browser any helpful for this purpose ? Is there way to solve this problem ? Sorry for many questions but this is my first web application program and i am trying hard to finish it. Have you tried finding out if simple URLs exist for this, that don't require Javascript? Does Wikipedia have a policy on this? Conrad. On Fri, Sep 9, 2011 at 4:17 AM, Daniel Patterson lists.hask...@dbp.mm.st wrote: It looks to me that the link is generated by javascript, so unless you can script an actual browser into the loop, it may not be a viable approach. On Sep 8, 2011, at 3:57 PM, mukesh tiwari wrote: I tried to use the PDF-generation facilities . I wrote a script which generates the rendering url . When i am pasting rendering url in browser its generating the download file but when i am trying to get the tags , its empty. Could some one please tell me what is wrong with code. Thank You Mukesh Tiwari import Network.HTTP import Text.HTML.TagSoup import Data.Maybe parseHelp :: Tag String - Maybe String parseHelp ( TagOpen _ y ) = if ( filter ( \( a , b ) - b == Download a PDF version of this wiki page ) y ) /= [] then Just $ http://en.wikipedia.org; ++ ( snd $ y !! 0 ) else Nothing parse :: [ Tag String ] - Maybe String parse [] = Nothing parse ( x : xs ) | isTagOpen x = case parseHelp x of Just s - Just s Nothing - parse xs | otherwise = parse xs main = do x - getLine tags_1 - fmap parseTags $ getResponseBody = simpleHTTP ( getRequest x ) --open url let lst = head . sections ( ~== div class=portal id=p-coll- print_export ) $ tags_1 url = fromJust . parse $ lst --rendering url putStrLn url tags_2 - fmap parseTags $ getResponseBody = simpleHTTP ( getRequest url ) print tags_2 ___ 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 mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] hledger subcommand detection, RFC
On 27 August 2011 00:23, Simon Michael si...@joyful.com wrote: Thanks Conrad! Those are some great links. I wrapped up some manpage generation code in a package called ui-command, which is kind of orthogonal to cmdargs (ui-command just deals with subcommands). Example commands are often useful, so I added Interesting. Have you tried using both ui-command and cmdargs together ? No, I've generally just used ui-command to select (and document) subcommands, and GetOpt to handle arguments. I think cmdargs added support for selecting subcommands recently. In any case, you are selecting subcommands by searching the filesystem. Perhaps it would be a good idea to split out the documentation part of ui-command ... Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Decompressing and http-enumerator
On Aug 29, 2011 9:39 PM, Michael Snoyman mich...@snoyman.com wrote: On Mon, Aug 29, 2011 at 2:21 PM, Gregory Collins g...@gregorycollins.net wrote: On Mon, Aug 29, 2011 at 10:08 AM, Michael Snoyman mich...@snoyman.com wrote: Hi all, Erik just opened an issue on Github[1] that affected me very recently as well when writing some automated Hackage checking code[2]. The issue is that http-enumerator sees the content-encoding header and decompresses the tarball, returning an uncompressed tarfile. I can avoid this with rawBody = False, but that's not a real solution, since that also disables chunked response handling. A web server should not be setting Content-encoding: gzip on a .tar.gz file. I agree that http-enumerator is correctly following the spec by decompressing. If you decide to implement a workaround for this, the only reasonable thing I can think of is adding a ignoreContentEncoding knob the user can twiddle to violate spec. I'm wondering what the most appropriate way to handle this is. Maybe a dontDecompress record, looking like: type ContentType = ByteString dontDecompress :: ContentType - Bool Then browser behavior would be: browserDecompress = (== application/x-tar) and current behavior would be: defaultDecompress = const False I don't have any strong opinions here... I agree with Gregory's suggestion of an API that allows an application to see the data prior to decoding the Content-Encoding. It could be tagged with the name of the content-coding, and there could be a generic decode function (ie. the library already knows what needs to be done to decode, so there's no need for the application to go looking up the decode function by name). Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] hledger subcommand detection, RFC
Hi Simon, good stuff! this is the same approach that eg. git uses, it seems to be quite flexible. I did a similar thing for a C project called oggz a while back: http://lists.xiph.org/pipermail/ogg-dev/2008-August/001110.html some other useful things you could add: * a help subcommand built-in to the hledger wrapper, which basically translates eg hledger help report into man hledger-report or hledger-report --help (depending on availability, platform etc.) * an option to all commands that lists out all its available options, to aid with shell completion. See the link I posted above about the oggz tools for an example usage and a link to a bash completion file. I wrapped up some manpage generation code in a package called ui-command, which is kind of orthogonal to cmdargs (ui-command just deals with subcommands). Example commands are often useful, so I added those, with validity checking, to hogg (a Haskell version of oggz). Some related posts: http://blog.kfish.org/2008/03/release-hogg-040.html http://blog.kfish.org/2008/12/release-hogg-041.html cheers, Conrad. On 26 August 2011 08:22, Simon Michael si...@joyful.com wrote: When I split up the hledger package, I always intended to make the hledger program act as a single front end for hledger-* executables. I finally got around to trying that, just pushed to darcs [1]. So hledger now searches your PATH at startup and offer any hledger-* executables as subcommands. To make this fully modular, so that options can be reused and third-party add-ons don't need to be baked in to hledger in any way, there has also been a rather extensive options overhaul, using cmdargs. Below is an example [2] of the new help output with all hledger-* packages plus a local hledger-report.hs script installed. I'm not sure if this is fully safe, cross-platform, robust, quick enough to be unnoticeable, etc. I have about 20 dirs and 4k files in my PATH. I haven't noticed a slowdown on macbook or vps, but have not measured. More testing of this on diverse platforms and machines, or code review, would be very welcome. -Simon [1] http://joyful.com/darcsden/simon/hledger/browse/hledger/Hledger/Cli/Options.hs#L-330 [2] $ hledger hledger [COMMAND] ... [OPTIONS] run the specified hledger command. hledger COMMAND --help for more detail. In general, COMMAND should precede OPTIONS. Misc commands: add prompt for new transactions and append them to the journal convert show the specified CSV file as hledger journal entries test run self-tests, or just the ones matching REGEXPS Report commands: accounts (or balance) show matched accounts and their balances entries (or print) show matched journal entries postings (or register) show matched postings and running total activity show a barchart of transactions per interval stats show quick statistics for a journal (or part of it) Add-on commands found: chart [-- OPTIONS] run the hledger-chart program interest [-- OPTIONS] run the hledger-interest program report [-- OPTIONS] run the hledger-report program vty [-- OPTIONS] run the hledger-vty program web [-- OPTIONS] run the hledger-web program -? --help Display help message --debug Show extra debug output -V --version Print version information ___ 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] Haskell Weekly News: Issue 187
On 24 June 2011 02:24, Rogan Creswick cresw...@gmail.com wrote: On Thu, Jun 23, 2011 at 11:16 AM, Simon Michael si...@joyful.com wrote: On 6/23/11 10:49 AM, Iustin Pop wrote: FYI, a regular link (though longer) seems more appropriate to me. Don't know if other people feel the same though. I prefer the short links, since it is much easier to keep track of what's going on when reading on a small screen (much of my email reading these days is done on my phone.) I'd prefer to just read an HTML version of HWN on my phone. How about simply sending an HTML email with a plaintext fallback? In the plaintext email I'd prefer full URLs to cut/copy on my computer terminal. Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Iteratee: manyToOne
On 28 April 2011 23:39, Dmitry Olshansky olshansk...@gmail.com wrote: Hello, does somewhere exist function with type like this - manyToOne :: [Iteratee a m b] - Iteratee a m [b] ? I.e. I need to process one input through many Iteratees indepentently in constant space and collect results. It is similar by type with sequenceM but as far as I understand sequenceM won't use the same input for all Iteratees. Hi, this is also like the enumSequence Maciej Wos proposed: http://www.haskell.org/pipermail/haskell-cafe/2011-January/088319.html cheers, Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANNOUNCE: iteratee-compress 0.2.0.0
On 23 April 2011 19:29, Maciej Piechotka uzytkown...@gmail.com wrote: Iteratee-compress provides compressing and decompressing enumerators including flushing (using John Lato's implementation). Currently only gzip and bzip is provided but LZMA is planned. Changes from previous version: - Add BZip support Cool :) I notice the haddocks on hackage have not been generated; would this be due to libbz2-dev missing on the hackage server? Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] http://trac.haskell.org/ not redering correctly
On 21 April 2011 05:34, Andrew Coppin andrewcop...@btinternet.com wrote: I notice that there's duplicate reports of the HTML documentation in the Haskell Platform having chunks missing Which ticket numbers are these? Trac allows one of them to be closed as a duplicate. Perhaps you can do that, or at least provide those details in email here. When I get a minute I'll log in, mark the duplicates, and add a note to the ticket confirming that the issue still exists. great! I thought the purpose of filing a bug report was to get things fixed? The purpose of filing bug reports is to ensure that problems are not forgotten. It allows the community (people like you) to have a useful understanding of the problems that exist when choosing what tasks to put time and effort into fixing. *sigh* I guess that means the next step is to figure out if it's broken for the Linux builds as well, or just for Windows. (Can't test for Mac OS since I don't have access to the necessary hardware or software...) The first step would be to make a patch that works for you, and to attach it to the ticket. Other people could verify that it works on other platforms -- perhaps after attaching the patch you could mail this list and ask people to check it :) Then again if it's simply a matter of generating additional HTML text (as opposed to styling/rendering issues) then it should be straightforward to verify that the new content is added in the generated files without worrying about other platforms. Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] http://trac.haskell.org/ not redering correctly
On 20 April 2011 05:55, Andrew Coppin andrewcop...@btinternet.com wrote: On 17/04/2011 11:29 AM, Erik de Castro Lopo wrote: Hi all, Trac pages aren't rendering correctly. It seems the HTTP server can't find the CSS files. See below. Cheers, Erik I'm glad it's not just me. Any danger of this being fixed someday? I notice that there's duplicate reports of the HTML documentation in the Haskell Platform having chunks missing Which ticket numbers are these? Trac allows one of them to be closed as a duplicate. Perhaps you can do that, or at least provide those details in email here. and yet both HP 2011.2.0.0 and HP 2011.2.0.1 still have this exact same problem. I thought the purpose of filing a bug report was to get things fixed? The purpose of filing bug reports is to ensure that problems are not forgotten. It allows the community (people like you) to have a useful understanding of the problems that exist when choosing what tasks to put time and effort into fixing. Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] A maintenance command of Haskell cabal packages
On 1 April 2011 10:48, Kazu Yamamoto k...@iij.ad.jp wrote: Hello cafe, Let me announce a maintenance command of Haskell cabal packages. http://www.mew.org/~kazu/proj/cab/en/ cab is a MacPorts-like maintenance command of Haskell cabal packages. Some part of this program is a wrapper to ghc-pkg and cabal. If you are always confused due to inconsistency of two commands, or if you want a way to check all outdated packages, or if you want a way to remove outdated packages recursively, this command helps you. whoah, it has uninstall!!! awesome! Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Loading bitmap with xlib
On 31 January 2011 21:40, Francesco Mazzoli f...@mazzo.li wrote: Francesco Mazzoli f at mazzo.li writes: At the end I gave up and I wrote the function myself: http://hpaste.org/43464/readbitmapfile cool ... the listed maintainer for the Xlib bindings is librar...@haskell.org. Perhaps you could prepare a patch and send it there? (does anyone know if there is an actual maintainer?) Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Adding a builder to the bytestring package?
On 24 January 2011 07:29, John Millikin jmilli...@gmail.com wrote: Patch done and sent to the bytestring maintainers. For the interested, here's the benchmark chart for binary, cereal, and blaze-builder/bytestring: http://i.imgur.com/xw3TL.png Can has units? Conrad. On Wed, Jan 19, 2011 at 15:30, Johan Tibell johan.tib...@gmail.com wrote: On Thu, Jan 20, 2011 at 12:16 AM, John Millikin jmilli...@gmail.com wrote: blaze-builder already implements the binary builder interface, minus the putWord* functions. I think those would be trivial to reimplement on top of Write. Since it sounds like everyone agrees with / has already thought of moving Builder into bytestring, I'll start poking at a patch. Who is the current patch-reviewer for binary and bytestring? I'd suggest addressing the patch to Don Stewart, Duncan Coutts, and Lennart Kolmodin. Johan ___ 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] Question: mime-mail and base64 encoding
On 7 December 2010 13:42, Michael Snoyman mich...@snoyman.com wrote: Hi all, I've gotten a request for the mime-mail package that I'd like some input on. Right now, there's the ability to fully specify whether or not to base64-encode each part in a message, but the included simpleMail function defaults to non-encoded parts for both its HTML and plain text alternatives. This has apparently caused some issues where long HTML strings have been word-wrapped at bad locations, causing breakage in the meaning of the markup. The request is to make both the HTML and plain text parts use base64 encoding by default. This *seems* to me to make a lot of sense, since it will ensure that your message arrives exactly as you intended it, and will ensure that any non-ASCII code points don't get killed somewhere along the way. On the other hand, I'm not sure what client support is like for base-64 encoding. Don't we need to leave *some* form of non-encoded data for less sophisticated email clients? What does the wrapping here? My understanding of the symptom is that newlines are sometimes inserted between the and / of a closing HTML tag, breaking the tag and leaving stray markup in the file. Would it be possible to either not do the wrapping, or to avoid putting newlines inside a tag? Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANNOUNCE: iteratee-compress 0.1.1
On 24 October 2010 20:09, Maciej Piechotka uzytkown...@gmail.com wrote: Iteratee-compress provides compressing and decompressing enumerators including flushing. Currently only gzip is provided but at least bzip is planned. Changes from previous version: - Independent from zlib library (Haskell one, not C) - Allow hand-flushing the contents (from outside). - Fix potential memory-leak Next goals: - BZip support - Generic interface for flushing To think about: - Should inner iteratee be able to request flushing? Regards PS. It did change API by removing dependency on zlib but I home such breakage in 0.1.x will be allowed version numbers are cheap :) Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Haskellers.com recent changes (and I need some volunteers)
On 14 October 2010 14:00, Michael Snoyman mich...@snoyman.com wrote: As a side point, I'm wondering how I should let everyone know about the new features on the site. Emailing the cafe each time would be stupid (and spam); but it's the main reason people are checking it out :) I reckon it's ok to talk about community stuff in the community cafe! posting to my twitter or my blog won't hit the whole audience. The two real options I see are: * A Haskelers twitter account * A news section on the site I lean towards the second. Obviously, I'd include a news feed with it. and please make sure it hits the haskell reddit ;-) cheers, Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] darcs vs. git
(subject changed for easy filtering of flamebait, removed libraries@) On 7 October 2010 10:45, Jason Dagit da...@codersbase.com wrote: At the risk of starting a darcs vs. git discussion I have some thoughts about the tension. On Wed, Oct 6, 2010 at 12:10 PM, Don Stewart d...@galois.com wrote: [snip] == GHC == * ghc status + 50% split in room on moving ghc from darcs to git. I don't see that tension resolving itself easily. VCS tools are subject to network effects. If your friends are using VCS Foo and you want to work with them, then you adopt Foo too. It's also a part of the toolchain that people tend to have strong opinions about. One possible way to lessen the tension would be good vcs bridge tools. There have been numerous repo converter projects, some even supporting synchronization. There is already a git-svn tool. Maybe there should be a git-darcs (and a darcs-git)? If a git hacker out there wants to add darcs support to git, I'd certainly be willing to help them get started. Pushing on this a bit more, I'm fairly convinced that darcs and git are dual to each other in terms of underlying models. As such, I have some ideas on how to unify them/convert between models. Unfortunately, actually having something to use is very far off as the ideas themselves are still immature. As far as I can tell, the main reasons to vote for git: * Some people simply love git and want to use it for every project * Git is faster and/or more memory efficient for some operations (most? all?) * Github As far as I can tell, the main reasons to vote for darcs: * GHC already uses it (inertia) * The windows support appears to be more mature (I admit, this is somewhat subjective as neither has a spotless record here) * Key players, such as the Simons, prefer the darcs UI over the git UI (i.e., some people prefer darcs) * Darcs 2.x has consistently improved in robustness and efficiency over the last several years, continues to improve, and incorporates ideas from git. (there is currently an experimental 'rebase' command in the development branch of darcs) * Cherry picking Note: I didn't mention feature branches as a reason to prefer one over the other. Both darcs and git support this. Git uses in-repo branches and with darcs you can simply do a local lazy get. Some people prefer one mechanism over the other, but the point is they both support the workflow. I hope they do :) With darcs, is it possible to refer to various other (local and remote) branch names, eg. to do diffs between branches? What I mean is that with git, I can do: $ git fetch origin $ git diff my-foo origin/random-bar to see changes between my local branch my-branch-foo and the remote branch random-bar without having to make an explicit checkout of origin/random-bar. When the origin repo contains many branches that other people are working on, this is a pretty neat way of keeping track of those. I'd really like to be able to get an overview of what branches are available (on my local copy and remotely), like with git's various graphing tools; I just use a git log --graph alias to get a tree view in the console: http://blog.kfish.org/2010/04/git-lola.html Does something similar exist for darcs? I would like to see the tension of darcs vs git for GHC reduced. I think it ultimately amounts to: Contributors need to be able to use the one they prefer, instead of being forced to use the one GHC devs use. I agree with that, and I don't mind switching between the two for different projects. Perhaps some standard subcommand aliases would go a long way to making that easier though (log vs. changes etc.) cheers, Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANN: ieee version 0.7
On 21 September 2010 12:18, John Millikin jmilli...@gmail.com wrote: On Mon, Sep 20, 2010 at 03:22, Daniel Fischer daniel.is.fisc...@web.de wrote: unsafeCoerce is not supposed to work for casts between Integral and Floating types. If you try to unsafeCoerce# between unboxed types, say Double# and Word64#, you're likely to get a compile failure (ghc panic). If you unsafeCoerce between the boxed types, it will probably work, but there are no guarantees. There's a feature request for unboxed coercion (i.e. reinterpretation of the bit-pattern): http://hackage.haskell.org/trac/ghc/ticket/4092 Interesting -- in that bug report, Simon Mar says that converting the value using pointers will work correctly. I've changed d-b-ieee754 over to use this method (v 0.4.2); the tests are still passing, so I'll call it success. I've been using unsafeCoerce: getFloat64be :: Get Double getFloat64be = do n - getWord64be return (unsafeCoerce n :: Double) putFloat64be :: Double - Put putFloat64be n = putWord64be (unsafeCoerce n :: Word64) but only tested it with quickcheck -- it passes about 10^7 checks, comparing roundtrips in combinatrion with the previous data-binary-ieee754 versions. However could that sometimes behave incorrectly? Should the d-b-iee754-0.4.2 versions with castPtr etc. be even faster? Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANN: ieee version 0.7
On 20 September 2010 11:18, Patrick Perry patpe...@gmail.com wrote: Given that IEEE is actually a standards body and they have many standards, wouldn't it be more appropriate to call this library ieee754? If it seems important to people, I'd be happy to change the name. I'm not religious about these things. Will it clutter up hackage, though? I reckon it's worth making it obvious that this library does 754 and not, say, 1394 or 802.11 ;-) On the other hand if you intend on expanding the package to implement every IEEE standard ... (j/k) Anyway, good work. Does this have any overlap with data-binary-ieee754? There was some recent discussion here about the encoding speed in that package. Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Unified Haskell login
On 17 September 2010 15:47, Michael Snoyman mich...@snoyman.com wrote: Hi cafe, I mentioned yesterday that I was planning on building haskellers.com. The first technicality I considered was how login should work. There are a few basic ideas: * Username/password on the site. But who wants to deal with *another* password? * OpenID. Fixes the extra password problem, but doesn't give us any extra information about the user (email address, etc). Unless the site providing the OpenID is Haskell.org (for people who identify with haskell.org as their primary community ;-), or if the user opts to link an email address to the OpenID they use to log in (ie. they want to authenticate with some other auth, but trust haskell.org enough to choose to provide an email address). On the other hand if someone wants to participate in some community aspects (ranking, chatting, whatever) but doesn't want to provide an email address for fear of spam, that's cool too. Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Idea for hackage feature
On 17 September 2010 10:12, Ben Millwood hask...@benmachine.co.uk wrote: On Fri, Sep 17, 2010 at 1:44 AM, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: On 17 September 2010 03:18, Henning Thielemann My suggestion is to move the Unsafe modules to a new package 'unsafe'. Then you can easily spot all dirty packages by looking at reverse dependencies of 'unsafe'. Hooray, yet another supposedly stand-alone library that GHC will depend on and thus can't be upgraded anyway, so there's no real advantage of making it stand-alone (after all, doesn't base use unsafeInterleaveIO or something for lazy IO?). Well, it's not like we plan on regularly fiddling that API :) The clever thing about this suggestion is that most packages don't *export* equivalent power to unsafePerformIO even if they import it (inlinePerformIO from bytestring is a notable exception) so you can easily see from a library's *immediate* dependencies whether it could potentially do anything naughty or not. Also, it's implementable entirely with existing technology, although we'll probably want a major base version bump to remove the modules. Couldn't that information be discovered by Hackage simply grepping the sources? Surely if all you want to know is if a package calls unsafePerformIO directly, that is the simplest way. Grepping would also find callers of inlinePerformIO, which would be far more useful than tainting every package that depends on bytestring just because it might call that function. Conrad. Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] record update
On 15 September 2010 04:31, Jonathan Geddes geddes.jonat...@gmail.com wrote: Wow, I had no idea there were so many record packages! This indicates a couple things to me: a) Haskell is very flexible. b) I'm not the only one who things the built-in record system isn't perfect. Digging a bit deeper, it looks like some of the record-related ghc extensions might also be useful, such as record punning and field disambiguation. Since these are already extensions, they're more likely to make it into Haskell 20XX. Are these considered to be the solution to current record syntax problems? With these extensions, couldn't I write the following? someUpdate :: MyRecord - MyRecord someUpdate myRecord@(MyRecord{..}) = let { field1 = f field1 , field2 = g field2 , field3 = h filed3 } in myRecord{..} or just: someUpdate :: MyRecord - MyRecord someUpdate myrec...@myrecord{..} = myRecord{ field1 = f field1 , field2 = g field2 , field3 = h field3 } Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Haskell-Cafe Digest, Vol 85, Issue 20
Very! On Sep 8, 2010 4:45 AM, Jeff Rubard jeffrub...@gmail.com wrote: Do U like combinatory logic - or lambda calculus? It still matters, or something. ___ 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] Re: Fwd: Semantics of iteratees, enumerators, enumeratees?
On 24 August 2010 14:14, Jason Dagit da...@codersbase.com wrote: I'm not a semanticist, so I apologize right now if I say something stupid or incorrect. On Mon, Aug 23, 2010 at 9:57 PM, Conal Elliott co...@conal.net wrote: So perhaps this could be a reasonable semantics? Iteratee a = [Char] - Maybe (a, [Char]) I've been tinkering with this model as well. However, it doesn't really correspond to the iteratee interfaces I've seen, since those interfaces allow an iteratee to notice size and number of chunks. I suspect this ability is an accidental abstraction leak, which raises the question of how to patch the leak. From a purely practical viewpoint I feel that treating the chunking as an abstraction leak might be missing the point. If you said, you wanted the semantics to acknowledge the chunking but be invariant under the size or number of the chunks then I would be happier. I think that's the point, ie. to specify what the invariants should be. For example (to paraphrase, very poorly, something Conal wrote on the whiteboard behind me): run [concat [chunk]] == run [chunk] ie. the (a, [Char]) you maybe get from running an iteratee over any partitioning of chunks should be the same, ie. the same as from running it over the concatenation of all chunks, which is the whole input [Char]. I use iteratees when I need to be explicit about chunking and when I don't want the resources to leak outside of the stream processing. If you took those properties away, I wouldn't want to use it anymore because then it would just be an inelegant way to do things. Then I suppose the model for Enumerators is different than that for Iteratees; part of the point of an Enumerator is to control the size of the chunks, so that needs to be part of the model. An Iteratee, on the other hand, should not have to know the size of its chunks. So you don't want to be able to know the length of a chunk (ie. a part of the stream), but you do want to be able to, say, fold over it, and to be able to stop the computation at any time (these being the main point of iteratees ...). Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: Fwd: Semantics of iteratees, enumerators, enumeratees?
On 24 August 2010 14:47, Jason Dagit da...@codersbase.com wrote: On Mon, Aug 23, 2010 at 10:37 PM, Conrad Parker con...@metadecks.org wrote: On 24 August 2010 14:14, Jason Dagit da...@codersbase.com wrote: I'm not a semanticist, so I apologize right now if I say something stupid or incorrect. On Mon, Aug 23, 2010 at 9:57 PM, Conal Elliott co...@conal.net wrote: So perhaps this could be a reasonable semantics? Iteratee a = [Char] - Maybe (a, [Char]) I've been tinkering with this model as well. However, it doesn't really correspond to the iteratee interfaces I've seen, since those interfaces allow an iteratee to notice size and number of chunks. I suspect this ability is an accidental abstraction leak, which raises the question of how to patch the leak. From a purely practical viewpoint I feel that treating the chunking as an abstraction leak might be missing the point. If you said, you wanted the semantics to acknowledge the chunking but be invariant under the size or number of the chunks then I would be happier. I think that's the point, ie. to specify what the invariants should be. For example (to paraphrase, very poorly, something Conal wrote on the whiteboard behind me): run [concat [chunk]] == run [chunk] ie. the (a, [Char]) you maybe get from running an iteratee over any partitioning of chunks should be the same, ie. the same as from running it over the concatenation of all chunks, which is the whole input [Char]. I find this notation foreign. I get [Char], that's the Haskell String type, but what is [chunk]? I doubt you mean a list of one element. sorry, that was just my way of writing the list of chunks or perhaps the stream of chunks that represents the input. Conrad. I use iteratees when I need to be explicit about chunking and when I don't want the resources to leak outside of the stream processing. If you took those properties away, I wouldn't want to use it anymore because then it would just be an inelegant way to do things. Then I suppose the model for Enumerators is different than that for Iteratees; part of the point of an Enumerator is to control the size of the chunks, so that needs to be part of the model. An Iteratee, on the other hand, should not have to know the size of its chunks. So you don't want to be able to know the length of a chunk (ie. a part of the stream), but you do want to be able to, say, fold over it, and to be able to stop the computation at any time (these being the main point of iteratees ...). I think I agree with that. Jason ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANNOUNCE: enumerator, an alternative iteratee package
On 20 August 2010 06:29, wren ng thornton w...@freegeek.org wrote: John Millikin wrote: On Wed, Aug 18, 2010 at 23:33, Jason Dagit da...@codersbase.com wrote: The main reason I would use iteratees is for performance reasons. To help me, as a potential consumer of your library, could you please provide benchmarks for comparing the performance of enumerator with say, a) iteratee, b) lazy/strict bytestring, and c) Prelude functions? I'm interested in both max memory consumption and run-times. Using criterion and/or progression to get the run-times would be icing on an already delicious cake! Oleg has some benchmarks of his implementation at http://okmij.org/ftp/Haskell/Iteratee/Lazy-vs-correct.txt , which clock iteratees at about twice as fast as lazy IO. He also compares them to a native wc, but his comparison is flawed, because he's comparing a String iteratee vs byte-based wc. I was under the impression Jason was asking about the performance of the iteratee package vs the enumerator package. I'd certainly be interested in seeing that. Right now I'm using attoparsec-iteratee, but if I could implement an attoparsec-enumerator which has the same/better performance, then I might switch over. So far I've been very pleased with John Lato's work, quality-wise. Reducing dependencies is nice, but my main concern is the lack of documentation. I know the ideas behind iteratee and have read numerous tutorials on various people's simplified versions. However, because the iteratee package uses somewhat different terminology and types, it's not always clear exactly how to translate my knowledge into being able to use the library effectively. The enumerator package seems to have fixed this :) To be fair, John Lato's in-development branch of iteratee also fixes the naming problem (ie. is closer to Oleg's original naming for Iteratees, Enumerators and Enumeratees). I've been developing applications using iteratee for the past few weeks. Considering documentation, I don't think there is a lack of published characters on the topic. Oleg's series of emails introducing Iteratee and John Lato's article in the Monad.Reader were useful. John Millikin's documentation for enumerator is a welcome addition. However there is a deeper issue that Iteratees are semantically complex, and that complexity is not really addressed by the existing documentation: it mostly covers the various APIs, the design motivation (an extension of the left-fold enumerator), and evangelism (comparisons to lazy IO). I found it difficult to grok the reasons for the types, and what the operational control flow is (eg. how and why does EOF get propagated, how is a seek request communicated etc.). In general there seems to be a lot of interest in Iteratees recently as a way of dealing with resource management in IO. It's great to have a few different implementations to compare, but once performance is benchmarked and semantics are denotated it would be nice to converge on a single implementation and build a platform of libraries on it (for compression etc.), as was done for Lazy ByteString. cheers, Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] data.binary get reading beyond end of input bytestring?
On 28 July 2010 23:32, Gregory Collins g...@gregorycollins.net wrote: Conrad Parker con...@metadecks.org writes: Hi, I am reading data from a file as strict bytestrings and processing them in an iteratee. As the parsing code uses Data.Binary, the strict bytestrings are then converted to lazy bytestrings (using fromWrap which Gregory Collins posted here in January: -- | wrapped bytestring - lazy bytestring fromWrap :: I.WrappedByteString Word8 - L.ByteString fromWrap = L.fromChunks . (:[]) . I.unWrap This just makes a 1-chunk lazy bytestring: (L.fromChunks . (:[])) :: S.ByteString - L.ByteString ). The parsing is then done with the library function Data.Binary.Get.runGetState: -- | Run the Get monad applies a 'get'-based parser on the input -- ByteString. Additional to the result of get it returns the number of -- consumed bytes and the rest of the input. runGetState :: Get a - L.ByteString - Int64 - (a, L.ByteString, Int64) The issue I am seeing is that runGetState consumes more bytes than the length of the input bytestring, while reporting an apparently successful get (ie. it does not call error/fail). I was able to work around this by checking if the bytes consumed input length, and if so to ignore the result of get and simply prepend the input bytestring to the next chunk in the continuation. Something smells fishy here. I have a hard time believing that binary is reading more input than is available? Could you post more code please? The issue seems to just be the return value for bytes consumed from getLazyByteString. Here's a small example. con...@hunter:~/src/haskell/binary-overrun$ cat overrun.hs {-# LANGUAGE OverloadedStrings #-} import Data.Binary import Data.Binary.Get import qualified Data.ByteString.Lazy.Char8 as C data TenChars = TenChars C.ByteString deriving (Show) instance Binary TenChars where get = getLazyByteString 10 = return . TenChars put = undefined consume bs = do let (ret, rem, len) = runGetState (get :: Get TenChars) bs 0 putStrLn $ Input: ++ show bs ++ , length ++ (show $ C.length bs) putStrLn $ consumed ++ (show len) ++ bytes without error. putStrLn $ Output: ++ show ret putStrLn $ Remain: ++ show rem main = do consume 1234567890ABCDE consume 1234567890 consume 12345 con...@hunter:~/src/haskell/binary-overrun$ ./overrun Input: Chunk 1234567890ABCDE Empty, length 15 consumed 10 bytes without error. Output: TenChars (Chunk 1234567890 Empty) Remain: Chunk ABCDE Empty Input: Chunk 1234567890 Empty, length 10 consumed 10 bytes without error. Output: TenChars (Chunk 1234567890 Empty) Remain: Empty Input: Chunk 12345 Empty, length 5 consumed 10 bytes without error. Output: TenChars (Chunk 12345 Empty) Remain: Empty Here, the third example claims to have consumed 10 bytes out of the available 5, and does not fail. The issue is that this return value cannot be used for maintaining offsets. It is documented that it will not fail, but the returned len value seems to be incorrect. I've now added a check that fails if the returned bytestring is shorter than required. However I am curious as to why this apparent lack of bounds checking happens. My guess is that Get does not check the length of the input bytestring, perhaps to avoid forcing lazy bytestring inputs; does that make sense? Would a better long-term solution be to use a strict-bytestring binary parser (like cereal)? So far I've avoided that as there is not yet a corresponding ieee754 parser. If you're using iteratees you could try attoparsec + attoparsec-iteratee which would be a more natural way to bolt parsers together. The attoparsec-iteratee package exports: parserToIteratee :: (Monad m) = Parser a - IterateeG WrappedByteString Word8 m a Attoparsec is an incremental parser so this technique allows you to parse a stream in constant space (i.e. without necessarily having to retain all of the input). It also hides the details of the annoying buffering/bytestring twiddling you would be forced to do otherwise. thanks for the pointer :) Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] data.binary get reading beyond end of input bytestring?
On 29 July 2010 17:46, Duncan Coutts duncan.cou...@googlemail.com wrote: On 29 July 2010 07:53, Conrad Parker con...@metadecks.org wrote: Something smells fishy here. I have a hard time believing that binary is reading more input than is available? Could you post more code please? The issue seems to just be the return value for bytes consumed from getLazyByteString. Here's a small example. http://hackage.haskell.org/packages/archive/binary/0.5.0.2/doc/html/Data-Binary-Get.html#v%3AgetLazyByteString getLazyByteString :: Int64 - Get ByteString An efficient get method for lazy ByteStrings. Does not fail if fewer than n bytes are left in the input. Because it does it lazily it cannot check if it's gone past the end of the input. Arguably this is crazy and the function should not exist. cheers Duncan, that confirms my guess about the reason. Would you accept a patch quoting you on that last point to the comment? ;-) Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] data.binary get reading beyond end of input bytestring?
Hi, I am reading data from a file as strict bytestrings and processing them in an iteratee. As the parsing code uses Data.Binary, the strict bytestrings are then converted to lazy bytestrings (using fromWrap which Gregory Collins posted here in January: -- | wrapped bytestring - lazy bytestring fromWrap :: I.WrappedByteString Word8 - L.ByteString fromWrap = L.fromChunks . (:[]) . I.unWrap ). The parsing is then done with the library function Data.Binary.Get.runGetState: -- | Run the Get monad applies a 'get'-based parser on the input -- ByteString. Additional to the result of get it returns the number of -- consumed bytes and the rest of the input. runGetState :: Get a - L.ByteString - Int64 - (a, L.ByteString, Int64) The issue I am seeing is that runGetState consumes more bytes than the length of the input bytestring, while reporting an apparently successful get (ie. it does not call error/fail). I was able to work around this by checking if the bytes consumed input length, and if so to ignore the result of get and simply prepend the input bytestring to the next chunk in the continuation. However I am curious as to why this apparent lack of bounds checking happens. My guess is that Get does not check the length of the input bytestring, perhaps to avoid forcing lazy bytestring inputs; does that make sense? Would a better long-term solution be to use a strict-bytestring binary parser (like cereal)? So far I've avoided that as there is not yet a corresponding ieee754 parser. Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: [Haskell] Google Summer of Code 2009
2009/2/12 Don Stewart d...@galois.com: Thanks for the analysis, this clarifies things greatly. Feasibility and scope is a big part of how we determine what projects to work on. I agree that it's beyond the scope of a SoC project. Rather than H.263 or H.264 I was going to suggest implementation of Theora or OMS, both of which avoid the patent issues and have publicly available specs: http://theora.org/doc/Theora.pdf http://www.openmediacommons.org/collateral/OMS-video-v0.9.pdf Scanning those documents should give anyone a fair idea of the amount of work involved. My understanding is that OMS is of a similar complexity to H.263, and H.264 is more complex than any of these. For Theora playback we've found that the largest CPU load comes from colorspace conversion, where the YUV output of the codec needs to be converted to RGB for some targets (like Firefox). That is some fairly straightforward array processing, and would be a good place to start for anyone trying to implement video codecs in Haskell. Conrad. gtener: On Wed, Feb 11, 2009 at 21:00, Jamie hask...@datakids.org wrote: Hi Gwern, On Wed, 11 Feb 2009, Gwern Branwen wrote: I just checked H.263 and it looks like it does not require patent licensing at all (it is created by ITU-T Video Coding Experts Group (VCEG)) so one can write H.263 in Haskell and release freely without patent licensing issues. So writing H.263 in Haskell could be a good GSoC project. One mentioned that GHC produce slow code, well H.263 could be a good test case to improve GHC optimization over time. In The Computer Language Benchmarks Game, Haskell has some catching up to do. :) It does sound like a reasonably discrete task, and it sounds like you have a use for it; but I wonder if it's doable in a single summer? I have no idea, I have not dig deeper into H.263 C source code but I guess it should be quite trivial as it is a black box with video frame input and output with several parameters for encoding and just frame in/out for decoding. I didn't dig into the source code either, but I've just skimmed through Wikipedia page on that codec: http://en.wikipedia.org/wiki/H.263 and in seems far from trivial. Anything that has 23 annexes is likely to be quite complex :-) Therefore I seriously doubt chances for success of such project. I did some checks: in libavcodec at least following files consist of implementation of H.263: h263.c h263data.h h263dec.c h263.h h263_parser.c h263_parser.h How many lines are there? [te...@laptener libavcodec]$ wc h263* 6295 19280 218932 h263.c 314 2117 10423 h263data.h 816 2171 26675 h263dec.c 46217 2032 h263.h 91282 2361 h263_parser.c 29165 1047 h263_parser.h 7591 24232 261470 razem In Haskell project one would also need to provide some additional utility code which is part of libavcodec. Fast grep shows the tip of an iceberg: [te...@laptener libavcodec]$ grep include h263* | grep -v h263.c:#include dsputil.h h263.c:#include avcodec.h h263.c:#include mpegvideo.h h263.c:#include h263data.h h263.c:#include mpeg4data.h h263.c:#include mathops.h h263data.h:#include mpegvideo.h h263dec.c:#include avcodec.h h263dec.c:#include dsputil.h h263dec.c:#include mpegvideo.h h263dec.c:#include h263_parser.h h263dec.c:#include mpeg4video_parser.h h263dec.c:#include msmpeg4.h h263.h:#include config.h h263.h:#include msmpeg4.h h263_parser.c:#include parser.h h263_parser.h:#include parser.h Bottom line: I don't think it is reasonable to assume anyone without previous knowledge of H.263 is able to fit that project into one summer. But! It's Haskell community, and people here see the impossible happen from time to time ;-) All best Christopher Skrzętnicki ___ 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 mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Haskell haikus
2008/12/7 Gwern Branwen [EMAIL PROTECTED]: On Sat, Dec 6, 2008 at 12:50 PM, Malcolm Wallace wrote: (This point, incidentally, raises a hobbyhorse of mine - Google didn't see the TMR haikus because they were in PDF. How odd. Googling for haskell haiku TMR brings up that PDF as the first hit for me. Yes, but: 1) you could formulate that query only if you already knew TMR had haikus to look for. 2) The Google results are changing as we speak. I did another search for Haskell haiku, and now I see, about 40 or 50 hits down, an email replying to a TMR ANN and praising the haikus. Further, I see this email thread, some mirrors, and the Haiku page on the wiki have popped up in the search results already, and in the top 20 or so. Further still: one high-up hit is an IRC log of #haskell, covering the haiku I found in lambdabot's @quotes database. I *know* that was not there when I was looking for haikus (before I wrote the page and started this thread). Snow fails a pure quest. unsafeGoogle reference is not transparent. K. -- http://twitter.com/conradparker ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Fun with type functions
2008/11/27 Simon Peyton-Jones [EMAIL PROTECTED]: can you tell us about the most persuasive, fun application you've encountered, for type families or functional dependencies? Hi, I certainly had fun with the Instant Insanity puzzle, in Monad.Reader issue 8: http://www.haskell.org/haskellwiki/User:ConradParker/InstantInsanity That was using functional dependencies. Then Pepe Iborra pasted a version of Instant Insanity with type families: http://hpaste.org/2689 Looking back at this, Manuel left the following comment: -- There is unfortunately, no simple way to print the normalised type. -- In fact, GHC goes to great length to show types with as little -- normalisation as possible to users. (Especially for error messages, -- that usually makes them much easier to understand.) However, with -- type families, I think we really ought to have a ghci command to -- specifically request a normalised type. I'll put that on my -- TODO list! -- For the moment, you can of course try forcing normalisation by -- triggering type errors; eg -- :t solution :: Int (Does ghci now have a command for printing normalised types?) There are also links to haskell-cafe discussion and some other implementations (in C++ templates and D) to, um, compare: http://www.haskell.org/haskellwiki/User_talk:ConradParker/InstantInsanity cheers, Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] HOgg 0.3.0 Released
HOgg 0.3.0 Released --- The HOgg package provides a commandline tool for manipulating Ogg files, and a corresponding Haskell library. HOgg is in hackage, or on the web at: http://www.kfish.org/~conrad/software/hogg/ This is the second public release. The focus is on correctness of Ogg parsing, production and editing. The capabilities of the hogg commandline tool are roughly on par with those of the oggz* [0] tools. Although hogg does not yet provide an equivalent to oggz-validate, it has subcommands for chopping out a section of a file, and for adding skeleton metadata. HOgg supports chained and multiplexed Ogg bitstreams conformant with RFC3533[1]. HOgg can parse headers for CMML, FLAC, OggPCM, Speex, Theora and Vorbis media codecs, and can read and write Ogg Skeleton bitstreams. [0] Oggz: http://www.annodex.net/software/liboggz/index.html [1] RFC3533: http://www.ietf.org/rfc/rfc3533.txt New in this release --- The hogg tool contains new subcommands: chop, addskel and list-codecs. Additionally, subcommands for inspecting streams (hogg dump, hogg pagedump) can now take start and end time options. $ hogg help chop chop: Extract a section (specify start and/or end time) Usage: hogg chop [options] filename ... Examples: Extract the first minute of file.ogg: hogg chop -e 1:00 file.ogg Extract from the second to the fifth minute of file.ogg: hogg chop -s 2:00 -e 5:00 -o output.ogg file.ogg Extract only the Theora video stream, from 02:00 to 05:00, of file.ogg: hogg chop -c theora -s 2:00 -e 5:00 -o output.ogg file.ogg Extract, specifying SMPTE-25 frame offsets: hogg chop -c theora -s smpte-25:00:02:03::12 -e smpte-25:00:05:02::04 -o output.ogg file.ogg Options: -h, -? --help Display this help and exit -V --versionOutput version information and exit -c Content-Type --content-type=Content-Type Select the logical bitstreams for a specified content type -s Timestamp --start=TimestampSpecify a start time -e Timestamp --end=Timestamp Specify an end time -o filename --output=filenameSpecify output filename Additionally, the HOgg package now contains support for building with GHC version 6.8, and the Codec.Container.Ogg library contains various internal improvements. Installation I am very interested in hearing about problems with building or installing the package, particularly from people who are not yet familiar with building from Haskell source. You need ghc instead of gcc; it compiles to a binary: $ ./Setup.hs configure $ ./Setup.hs build $ sudo ./Setup.hs install Building of this release has been tested with: * GHC versions 6.4, 6.6 and 6.8.1 [2] * The Haskell build system Cabal versions 1.1.3, 1.1.4, 1.1.6, and the current development trunk. [3] The GHC and Cabal versions listed above span the packages available in most current distributions. I've tested on Debian unstable and Ubuntu Feisty. I'm particularly interested to hear reports of build success or failure on other distributions or operating systems. [2] GHC: http://www.haskell.org/ghc/ [3] Cabal: http://www.haskell.org/cabal/ Usage - $ hogg help Usage: hogg subcommand [options] filename ... Commands: help Display help for a specific subcommand (eg. hogg help chop) Reporting: info Display information about the file and its bitstreams dump Hexdump packets of an Ogg file pagedump Display page structure of an Ogg file dumpraw Dump raw (unparsed) page data Extraction: rip Rip selected logical bistreams from an Ogg file (default: all) reconstruct Reconstruct an Ogg file by doing a full packet demux Editing: chop Extract a section (specify start and/or end time) merge Merge, interleaving pages in order of presentation time addskel Write a Skeleton logical bitstream Miscellaneous: known-codecs List codecs known by this version of hogg Please report bugs to [EMAIL PROTECTED] Source -- Source code is available from the darcs repository at: darcs get http://www.kfish.org/~conrad/software/hogg/ cheers, Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Too many packages on hackage? :-)
On 08/07/07, Neil Mitchell [EMAIL PROTECTED] wrote: Hi Looks like there's too many packages on hackage.haskell.org now for a single page listing: http://hackage.haskell.org/packages/archive/pkg-list.html Perhaps we can have a page with just the categories, with subpages hanging off? Please don't. With one large page I can search the entire page quickly, and its only 6 printed pages long - I think most people here will be used to a 12 page limit :-) In the future once its all nicely searchable, tagged, etc. we might consider presenting the information in a different way, but one single page is still fine. Also, the categorization doesn't quite correspond to, say, the library hierarchy. For example, tagsoup is listed under Data, whereas it exports modules under Text and could just as well be categorized under Web. Similarly, xmonad is listed under System, but you might reasonably expect to find it under User Interfaces (or Interfaces ... those two seem to overlap ;-). I agree with Don that the current page is getting a bit long, but I also agree with Neil that it would be better to search/browse by tags (or by exported modules) than to simply break it up using the current categories. Perhaps I'm just overly agreeable. So ... how would one go about hacking on hackage, setting up a local installation for testing, submitting patches etc? cheers, Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Coding Standards (Coding Conventions)
On 28/05/07, Donald Bruce Stewart [EMAIL PROTECTED] wrote: Our small little window manager, xmonad, also has a pretty strict style guide. where? Perhaps I need coffee, but I couldn't find this in the source (xmonad, x11-extras, XMonadContrib) or documentation links from xmonad.org :-/ Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Re: [Haskell] New book: Real-World Haskell!
On 25/05/07, Isaac Dupree [EMAIL PROTECTED] wrote: Donald Bruce Stewart wrote: Finally, a very exciting aspect of this project is that O'Reilly has agreed to publish chapters online, under a Creative Commons License! Neat! Which one? (see e.g. Creative Commons in http://www.gnu.org/philosophy/license-list.html#OtherLicenses , http://en.wikipedia.org/wiki/Creative_Commons_licenses ) Hopefully one which allows free use of the example source code in applications; or alternatively the example source could be dual-licensed as BSD3 or similar? http://wiki.creativecommons.org/FAQ#Can_I_use_a_Creative_Commons_license_for_software.3F cheers, Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: [Haskell] Haskell Weekly News: March 12, 2007
On 13/03/07, Wolfgang Jeltsch [EMAIL PROTECTED] wrote: Am Montag, 12. März 2007 03:52 schrieb Donald Bruce Stewart: * [41]Why Publish CS Papers Without Code? 41. http://billmill.org/why_no_code Interesting! This leads me to the question how copyright of code fragments included in conference papers is handled. Say, I submit a paper containing some code fragments to the ICFP. I have to assign the copyright of the paper to the ACM. Does this mean that the ACM will hold the copyright of the code fragments? Does this mean that I'm not allowed to publish the source code containing these code fragments as open source software somewhere? (I am not a lawyer, etc) If your paper simply cites, and quotes from, code that you have already published elsewhere (eg. on your own web site), then I think that would simply count as a citation. If on the other hand your paper contains your code verbatim and doesn't cite it (ie. the code is previously unpublished) then perhaps you are assigning the copyright of it. So it may be a good idea to always make available open source projects before publishing about them in academic papers, and to always include a citation to the open source project web site or tech report. Besides, tshirtIf it's not open source, it's not computer science/tshirt. Science demands repeatable results, computer science demands literate programming. The solution is not to shy away from including code, or else the IP lawyers have won, science is banned and we get plunged into another Dark Age. cheers, Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] A new code search engine
On 14/02/07, Stephane Bortzmeyer [EMAIL PROTECTED] wrote: http://www.krugle.com/ Nice :-) Unlike Google, you can specify Haskell as a language. Google CodeSearch is pretty handy though: http://www.google.com/codesearch?q=lang%3Ahaskell it seems to return code with good relevence, and can look for specific licenses, but doesn't search on the structure of the code. Sometimes I find these tools useful for finding examples of how people actually use particular functions in the wild :-) cheers, Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANNOUNCE: binary: high performance, pure binary serialisation
On 28/01/07, Donald Bruce Stewart [EMAIL PROTECTED] wrote: I've added raw primitives for: {put,get}Wordhost {put,get}Word16host {put,get}Word32host {put,get}Word64host which do unaligned, host-sized, host-endian packing of data. Writing is some 15% faster for Words, a bit less for reading (which is a bit unoptimised at the moment), and a bit less for other types. Needless to say, data serialised this way is only portable to the same architecture. If the data header stores the alignment/size/endianness, then there's no reason for the data to be unportable. The normal get* instances (not get*host) could suffice for reading. Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: Re: [Haskell-cafe] Building the community
On 15/12/06, Nicolas Frisby [EMAIL PROTECTED] wrote: ... That's not to say it was the poster's fault: any question is a good question. I agree ... 2) The welcome to the mailing list message could say if you're new to Haskell, please check this FAQ first. I'm talking big letters here; I'd even be OK with marquee. ... hence I'd caution against such a rule. Part of the reason this community is welcoming is because there is no such barrier for people new to Haskell to ask questions. Everyone has a different mathematics ability and programming experience, and an ambiguously posed question is often just scratching the surface of what someone really wants to know. It's great that this community recognises that and responds accordingly. By contrast, many technical communities follow the advice of a document called How to ask questions the smart way by Eric Raymond and Rick Moen [0]. Although it contains some useful advice for individuals who want to find the answers to simply definable technical questions, imposing that advice on people who ask questions often ends up being elitist. For an example from that document: What [hackers] are, unapologetically, is hostile to people who seem to be unwilling to think or to do their own homework before asking questions. People like that are time sinks — they take without giving back, and they waste time we could have spent on another question more interesting and another person more worthy of an answer. We call people like this losers (and for historical reasons we sometimes spell it lusers). I hope the Haskell community never adopts such an arrogant tone. By all means, responders should politely refer to existing FAQ entries, and use the opportunity of answering questions to also improve the FAQ. At best, answering questions (the smart way ;-) should be thought of as taking part in a mathematical dialogue, not as a game of wits where the original poster is only given one chance to precisely formulate their question. cheers, Conrad [0] (which you can find by searching the Web for its title) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] HOgg 0.2.0 Released
HOgg 0.2.0 Released --- The HOgg package provides a commandline tool for manipulating Ogg files, and a corresponding Haskell library. http://snapper.kfish.org/~conrad/software/hogg/ This is the initial public release. The focus is on correctness of Ogg parsing and production. The capabilities of the hogg commandline tool are roughly on par with those of the oggz* tools[0], although hogg does not yet provide an equivalent to oggz-validate. HOgg supports chained and multiplexed Ogg bitstreams conformant with RFC3533[1]. HOgg can parse headers for CMML, FLAC, OggPCM, Speex, Theora and Vorbis media codecs, and can read and write Ogg Skeleton bitstreams. [0] Oggz: http://www.annodex.net/software/liboggz/index.html [1] RFC3533: http://www.ietf.org/rfc/rfc3533.txt Installation I am very interested in hearing about problems with building or installing the package, particularly from people who are not yet familiar with building from Haskell source. You need ghc instead of gcc; it compiles to a binary: $ ./Setup.hs configure $ ./Setup.hs build $ sudo ./Setup.hs install Building of this release has been tested with: * GHC versions 6.4 and 6.6 [2] * The Haskell build system Cabal versions 1.1.3, 1.1.4, 1.1.6, and the current development trunk. [3] * fps (Data.ByteString.Lazy) version 0.7, and development trunk. [4] Note that if you are using the recently-released GHC 6.6 then you will not need separate installs of Cabal or fps. You will however need to remove the word fps from the hogg.cabal file; see the README for details. The GHC and Cabal versions listed above span the packages available in most current distributions. I've tested on Debian unstable, Ubuntu Dapper and Ubuntu Edgy. I'm particularly interested to hear reports of build success or failure on other distributions or operating systems. [2] GHC: http://www.haskell.org/ghc/ [3] Cabal: http://www.haskell.org/cabal/ [4] fps: http://www.cse.unsw.edu.au/~dons/fps.html Usage - $ hogg help Usage: hogg subcommand [options] filename ... Commands: help Display help for a specific subcommand Reporting: info Display information about the file and its bitstreams dump Hexdump packets of an Ogg file pagedump Display page structure of an Ogg file dumpraw Dump raw (unparsed) page data Extraction: rip Rip selected logical bistreams from an Ogg file (default: all) reconstruct Reconstruct an Ogg file by doing a full packet demux Editing: merge Merge, interleaving pages in order of presentation time addskel Write a Skeleton logical bitstream Source -- Source code is available from the darcs repository at: darcs get http://snapper.kfish.org/~conrad/software/hogg/ cheers, Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Monad.Reader Licensing (Re: [Haskell] The Monad.Reader - Call for Copy)
Hi, On Tue, Oct 31, 2006 at 12:10:21PM +, Wouter Swierstra wrote: * License: The entire magazine should be published under a Creative Commons Attribution 2.5 License. This makes it much easier to publish, distribute, teach, and share the Reader. This license allows anyone to use the work in any way they seem fit as long as credit is given to the original author. Given that articles written in LaTeX are likely to be written in literate Haskell (yay!), it's quite likely that their contents will be incorporated into software. Others have expressed misgivings about the use of the CC Attribution license for software. Usually the issue is that the method of attribution is unclear: the license leaves it up to the original author of each article to specify how they should be attributed (or not), and has some vague terms regarding comparable authorship credit. A more detailed summary is at http://people.debian.org/~evan/ccsummary which suggests that such works would not be distributable by the Debian project. I suggest that articles in the Monad.Reader be BSD3 licensed, which has similar intent but clearer rules for incorporation in software. Besides, CC-BY-2.5 is not a member of Distribution.License in Cabal ;-) cheers, Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Cabal question, adding data files
On Wed, Aug 23, 2006 at 11:36:00PM +0100, Neil Mitchell wrote: Hi The field you want is data-files, documented in section 2.1.1 of the Cabal User's Guide. That looks perfect. Is there any reason that Alex doesn't use this? I was trying to learn by example. Perhaps because Alex predates the data-files field; data-files was only introduced in Cabal 1.1.4. Hence you might want to also put the following at the top of your .cabal file: Cabal-Version: = 1.1.4 cheers, Conrad. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe