Re: [Haskell-cafe] Correspondence between libraries and modules

2012-04-24 Thread Henk-Jan van Tuyl
On Wed, 25 Apr 2012 05:44:28 +0200, wren ng thornton   
wrote:



On 4/23/12 11:39 AM, Gregg Lebovitz wrote:

On 04/23/2012 12:03 AM, wren ng thornton wrote:

However, until better technical support is implemented (not just for
GHC, but also jhc, UHC,...) it's best to follow social practice.


Wren, I am new to Haskell and not aware of all of the conventions. Is
there a place where I can find information on these social practices?
Are they documented some place?


Not that I know of, though they're fairly standard for any open-source  
programming community. E.g., when it comes to module names: familiarize  
yourself with what's out there; try to fit in with the patterns you  
see[1]; don't intentionally clash, steal namespaces[2], or squat on  
valuable territory[3]; be reasonable and conscientious when interacting  
with people.


The following page gives you some idea of the module names:
  http://www.haskell.org/haskellwiki/Hierarchical_module_names

An overview of pages about programming style:
  http://www.haskell.org/haskellwiki/Category:Style

Regards,
Henk-Jan van Tuyl


--
http://Van.Tuyl.eu/
http://members.chello.nl/hjgtuyl/tourdemonad.html
Haskell programming
--

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Correspondence between libraries and modules

2012-04-24 Thread wren ng thornton

On 4/23/12 3:06 PM, Alvaro Gutierrez wrote:

I see. The first thing that comes to mind is the notion of module
granularity, which of course is subjective, so whether a single module or
multiple ones should handle e.g. doubles and integrals is a good question;
are there guidelines as to how those choices are made?


I'm not sure if there are any guidelines per se; that's more of a 
general software engineering problem. If you browse around on Hackage 
you'll get a fairly good idea what the norms are though. Everyone seems 
to have settled on a common range of scope--- with notable exceptions 
like the containers library with far too many functions per module, and 
some of Ed Kmett's work on category theory which tends towards very few 
declarations per module.



At any rate, why do these modules, with sufficiently-different
functionality, live in the same library -- is it that they share some
common bits of implementation, or to ease the management of source code?


I contacted Don Stewart (the former maintainer) to see whether he 
thought I should release the integral stuff on its own, or integrate it 
into bytestring-lexing. We agreed that it made more sense to try to 
build up a core library for lexing various common data types, rather 
than having a bunch of little libraries. He'd just never had time to get 
around to developing bytestring-lexing further; so I took over.


Eventually I plan to add rendering functions for floating point, and to 
split up the parsers for different floating point formats[1], so that it 
more closely resembles the integral stuff. But that won't be until this 
fall or later, unless someone requests it sooner.



[1] Having an omni-parser can be helpful when you want to be liberal 
about your input. But when you're writing parsers for a specified 
format, usually they're not that liberal so we need to offer restricted 
lexers in order to give code reuse.




When dealing with FFI code, because of the impedance mismatch between
Haskell and imperative languages like C, it's clear that there's going to
be some massaging of the API beyond simply declaring FFI calls. As such,
clearly we'd like to have separate modules for doing the low-level binding
vs presenting a high-level API. Moreover, depending on what you're
interfacing with, you may be forced to have multiple low-level modules.


Ah, that's a good use case. Is the lower-level module usually made "public"
as well, or is it only an implementation detail?


Depends on the project. For ByteStrings, most of that is hidden away as 
implementation details. For binding to C libraries, I think the current 
advice is to offer the low-level interface so that if there's something 
the high-level interface can't handle well, people have some easy recourse.




On the other hand, the main purpose of packages or libraries is as unit of
distribution, code reuse, and separate compilation. Even with the Haskell
culture of making small libraries, most worthwhile units of
distribution/reuse/compilation tend to be larger than a single
namespace/concern. Thus, it makes sense to have more than one module per
package, because otherwise we'd need some higher level mechanism in order
to manage the collections of package-modules which should be considered a
single unit (i.e., clients will almost always want the whole bunch of them).


This is the part that I'm trying to get a better sense of. I can see how in
some cases, it makes sense for more than one module to form a unit, because
they are tightly coupled semantically or implementation-wise -- so clients
will indeed want the whole bunch. On the other hand, several libraries
provide modules that are all over the place, in a way that doesn't form a
"unit" of any kind (e.g. MissingH), and it's not clear that you would want
any Network stuff when all you need is String utilities.


Yeah, MissingH and similar libraries are just grab-bags full of stuff. 
Usually grab-bag libraries think of themselves as place-holders, with 
the intention of breaking things out once there's something of a large 
enough size to warrant being its own package. (Whether the breaking out 
actually happens is another matter.) But to get the general sense of 
things, you should ignore them.


Instead, consider one of the parsing libraries like uu-parsinglib, 
attoparsec, parsec, frisby. There are lots of pieces to a parsing 
framework, but it makes sense to distribute them together.


Or, consider one of the base libraries for iteratees, enumerators, 
pipes, conduits, etc. Like parsing, these offer a whole framework. You 
won't usually need 100% of it, but everyone needs a different 80%.


Or to mention some more of my own packages, consider stm-chans, 
unification-fd, or unix-bytestrings. In unification-fd, the stuff 
outside of Control.Unification.* could be moved elsewhere, but the stuff 
within there makes sense to be split up yet distributed together. For 
stm-chans because of the similarity in interfaces, use cases, et

Re: [Haskell-cafe] Correspondence between libraries and modules

2012-04-24 Thread wren ng thornton

On 4/24/12 9:59 AM, Gregg Lebovitz wrote:

The question of how to support rapid innovation and stable
deployment is not an us versus them problem. It is one of staging releases. The
Linux kernel is a really good example. The Linux development team innovates
faster than the community can absorb it. The same was true of the GNU team.
Distributions addressed the gap by staging releases.


In that case, what you are interested in is not Hackage (the too-fast 
torrent of development) but rather the Haskell Platform (a policed set 
of stable/core libraries with staged releases).


I forget who the best person to contact is these days if you want to get 
involved with helping the HP, but I'm sure someone on the list will say 
shortly :)


--
Live well,
~wren

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Correspondence between libraries and modules

2012-04-24 Thread wren ng thornton

On 4/23/12 11:39 AM, Gregg Lebovitz wrote:

On 04/23/2012 12:03 AM, wren ng thornton wrote:

However, until better technical support is implemented (not just for
GHC, but also jhc, UHC,...) it's best to follow social practice.


Wren, I am new to Haskell and not aware of all of the conventions. Is
there a place where I can find information on these social practices?
Are they documented some place?


Not that I know of, though they're fairly standard for any open-source 
programming community. E.g., when it comes to module names: familiarize 
yourself with what's out there; try to fit in with the patterns you 
see[1]; don't intentionally clash, steal namespaces[2], or squat on 
valuable territory[3]; be reasonable and conscientious when interacting 
with people.



[1] e.g., the use of Data.* for data structures which are 
predominantly/universally treated as such, vs the use of Control.* for 
things which are often thought of as control structures (monads, etc). 
The use of Foo.Bar.Strict and Foo.Bar.Lazy when you provide both strict 
and lazy versions of some whole API, usually with Foo.Bar re-exporting 
whichever one seems the sensible default. The use of Foo.Bar.Class to 
resolve circular import issues when defining a class and a bunch of 
datatypes with instances. Etc.


[2] I mean things like if some package is providing a bunch of Foo.Bar.* 
modules, and it's the only one doing so, then you should try to get in 
touch with the maintainer before you start publishing your own Foo.Bar.* 
modules--- in order to collaborate, to send patches up-stream, or just 
to let them know what's going on.


[3] Witness an unintentional breach of this myself a while back. When I 
was hacking up the exact-combinatorics package for my own use, I put 
things in Math.Combinatorics.* since that's a reasonable place and 
wasn't in use; but I didn't think of that fact when I decided to publish 
the code. When pointed out, I promptly moved everything to 
Math.Combinatorics.Exact.* since that project is only interested in 
exact combinatorics and I have no intention of codifying all of 
combinatoric theory; hence using Math.Combinatorics.* would be squatting 
on very valuable names.




However, centralization is prone to bottlenecks and systemic failure.
As such, while it would be nice to ensure that a given module is
provided by only one package, there is no mechanism in place to
enforce this (except at compile time for the code that links the
conflicting modules together).


 From someone new to the community, it seems that yes centralization has
its issues, but it also seems that practices could be put in place that
minimize the bottlenecks and systemic failures.

Unless I greatly misunderstand the challenges, there seem to be lot of
ways to approach this problem and none of them are new. We all use
systems that are composed of many modules neatly combined into complete
systems. Linux distributions do this well. So does Java. Maybe should
borough from their experiences and think about how we put packages
together and what mechanisms we need to resolve inter-package dependencies.


Java attempts to resolve the issue by imposing universal authority (use 
reverse urls for the first part of your package name). Many Java 
developers flagrantly ignore that claim to authority. Sun/Oracle has no 
interest in actually policing these violations, and there's no central 
repository for leveraging social pressure to do it. Moreover, 
open-source developers who do not have a commercial/institutional 
affiliation are specifically placed in a tough spot, and are elided from 
public discourse because of that fact, which is extremely problematic on 
too many levels to get into here. Furthermore, many developers 
---especially among open-source and academic authors--- have an inherent 
distrust for ambient authority like this.


To pick another similar namespacing issue, consider the problem of 
Google Code. In Google Code there's a single namespace for projects, and 
the Google team spends a lot of effort on maintaining that namespace and 
resolving conflicts. (I know folks who've worked in the lab next door to 
that team. So, yes, they do spend a lot of work on it.) Whereas if you 
consider BitBucket or GitHub, each user is given a separate project 
namespace, and therefore the only thing that has to be maintained is the 
user namespace--- which has to be done anyways in order to deal with 
logins. The model of Google Code, SourceForge, and Java all assume that 
projects and repositories are scarce resources. Back in the day that may 
have been true (or may not), but today it is clearly false. Repos are 
cheap and everyone has a dozen side projects.


If you look at the case of Perl and CPAN, there's the same old story: 
universal authority. Contrary to Java, CPAN does very much actively 
police (or rather, vett) the namespace. However, this extreme level of 
policing requires a great deal of work and serves to drive away a great 
many de

Re: [Haskell-cafe] I am having trouble with the type declaration for creating an identity matrix.

2012-04-24 Thread KC
Thank you.

One is ONLY supposed to supply the list elements for "newListArray" which
fill the array in increasing order.


On Tue, Apr 24, 2012 at 3:21 PM, Kevin Charter  wrote:

> On Tue, Apr 24, 2012 at 3:20 PM, KC  wrote:
>
>> initIdentityMat :: Int -> ST s (STUArray s (Int,Int) ((Int, Int), Double))
>> initIdentityMat m = newListArray ((1,m),(1,m)) ([((i,j), if i == j then
>> 1.0 else 0.0) | i <- [1..m], j <- [1..m]] :: [((Int,Int), Double)])
>>
>> Doesn't seem to compile, nor do minor variations of the type declaration.
>>
>
> If you use Hoogle to find the type and API docs for 'newListArray', I
> believe you'll be able to figure out what's wrong, but I'll give you a
> hint. The list you're giving to 'newListArray' contains too much; and the
> pair you give it is only half correct.
>
> Kevin
>
> --
> Kevin Charter
> kevin.char...@acm.org
>



-- 
--
Regards,
KC
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Is protocol-buffers package maintainer reachable?

2012-04-24 Thread wren ng thornton

On 4/23/12 10:26 AM, Aleksey Khudyakov wrote:

On 23.04.2012 17:01, Paul Graphov wrote:

Hackage names Christopher Edward Kuklewicz as their maintainer. I've sent him
patches more than a month ago but neiter they were applied nor I got
any response. [...]


I've too tried to contact him almost year ago about same issue. Never
got an answer.


FWIW, I didn't have any issues getting in touch with him a year ago 
(from Oct 2010 through 21 March 2011, according to my email record). 
Though I haven't tried since then.


Like Johan Tibell, I'm interested in the maintenance of these packages 
since I'm using them for a project; though I don't know that I could 
contribute anything more than a context for regression debugging.


--
Live well,
~wren

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] ANN: signed-multiset-0.1

2012-04-24 Thread wren ng thornton

On 4/23/12 9:18 AM, Stefan Holdermans wrote:

Sjoerd,


This is not just about map, but it also a problem for the Monoid instance. You 
are basically adding an extra identity element, 0, to the max monoid, which 
works but is weird.


Still that's how union is typically defined for hybrid sets. It's what happens 
if want union and empty to behave as generalisations of these concepts for 
ordinary (multi)sets.


Why? Whenever I've dealt with bags, the appropriate way to handle 
collision on union has been to use addition--- not maximization. Ditto 
for all the other set ops. Addition seems far more natural as the 
extension from basic sets. The fact that you have negative 
multiplicities only underscores the naturality of addition[1]. Why do 
you think max is natural?



[1] With addition, {a:-2} `union` {a:3} == {a:1} and so "negation" is 
exactly that, and zero multiplicity is exactly the case of not being an 
element because zero is the identity for addition.


Whereas with maximization {a:-2} `union` {a:3} == {a:3} so "negation" 
doesn't actually mean negation. What you actually mean is that your 
multiplicities are linearly ordered but do not have a bottom element (as 
they would for bags or sets). This can be useful for when there's no 
sound conception of "zero", as when dealing with interval scale 
variables in statistics 
. And if you left it 
at that, this would be sensible, though I'm not sure I'd have much use 
for it in my own work.


However, then you're tacking on that even though there's no zero in your 
measurement scale, for some reason one particular level is considered 
special and is used to mean that an element is not in the set. 
Consequently, if I start with some set {a:x} and union it with {a:1} 
repeatedly, then I'll find that a is in the set more and more often 
(which is good) except potentially at some point where suddenly a is not 
in the set, but then it'll be in the set again on the next turn. This 
seems extremely unnatural to me. It can have practical utility in 
certain contexts (e.g., if used in conjunction with addition to form the 
log-Viterbi semiring), but I don't see any justification for it being a 
natural extension of sets and bags.


--
Live well,
~wren

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Multi-site haddock documentation with proper links?

2012-04-24 Thread Ryan Newton
This is sort of related to ticket #130:

   http://trac.haskell.org/haddock/ticket/130

And this one seems to hint at a solution to the problem in the more
extensive syntax for --read-interface.

  http://hackage.haskell.org/trac/ghc/ticket/3810

(My local haddock-2.10.0 --help doesn't mention this.  But I'll give it a
whirl.)



On Tue, Apr 24, 2012 at 8:34 PM, Ryan Newton  wrote:

> Hello cafe,
>
> For various reasons, some packages don't build documentation on hackage:
>
>http://hackage.haskell.org/package/accelerate
>
> Therefore I want to locally install documentation for a set of packages
> like this and host them on a separate website.  I want all of these ~ten
> packages' haddock documentation to be properly interlinked with eachother,
> but also to link to Hackage for types and classes defined in other modules.
>
> Is this possible?  Hackage haddocks are all interlinked, but that is
> simply because hackage is one giant local install, right?
>
> If it's not possible (and it seems not) do any haddock devs have pointers
> on how to implement this?
>
> Thanks,
>   -Ryan
>
> P.S.  Someone recommended to me the following simple hack -- just use sed
> to rewrite the links after haddock generates the html.  I think I'll do
> that for the time being unless someone has a better suggestion.
>
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Multi-site haddock documentation with proper links?

2012-04-24 Thread Ryan Newton
Hello cafe,

For various reasons, some packages don't build documentation on hackage:

   http://hackage.haskell.org/package/accelerate

Therefore I want to locally install documentation for a set of packages
like this and host them on a separate website.  I want all of these ~ten
packages' haddock documentation to be properly interlinked with eachother,
but also to link to Hackage for types and classes defined in other modules.

Is this possible?  Hackage haddocks are all interlinked, but that is simply
because hackage is one giant local install, right?

If it's not possible (and it seems not) do any haddock devs have pointers
on how to implement this?

Thanks,
  -Ryan

P.S.  Someone recommended to me the following simple hack -- just use sed
to rewrite the links after haddock generates the html.  I think I'll do
that for the time being unless someone has a better suggestion.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] JSON library suggestions?

2012-04-24 Thread Jeremy Shaw
Hello,

Have you emailed Bryan O'Sullivan and explained your problem? It
sounds to me like choosing Double was just the wrong choice and is a
design flaw that should be fixed in Aeson?

There are far too many JSON libraries on hackage already, and what
would be really useful (to me) is for the community to standardize on
one. I maintain a number of libraries that need some sort of JSON
library, and supporting all of them is not practical. So far aeson
seems like the best choice for the 'one true Haskell JSON library'. I
would be happy to invest effort in trying to address the shortcomings
so that we can try to get some sort of consensus. Usually I like
choice and flexibility.. but in terms of JSON libraries.. it seems
like the design space for a good JSON library is pretty small.

- jeremy


On Tue, Apr 24, 2012 at 4:51 PM, Jeff Shaw  wrote:
> Hi Jeremy,
> Sorry if I was unclear. Rational is acceptable to me as the result of a JSON
> parse, but Double (which Aeson uses), is not. Also acceptable would be
> Data.Decimal.Decimal, or maybe one of the types from Data.Fixed.
>
> JSON doesn't specify a data type for numbers, only a format.
>
> Jeff

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] I am having trouble with the type declaration for creating an identity matrix.

2012-04-24 Thread Kevin Charter
On Tue, Apr 24, 2012 at 3:20 PM, KC  wrote:

> initIdentityMat :: Int -> ST s (STUArray s (Int,Int) ((Int, Int), Double))
> initIdentityMat m = newListArray ((1,m),(1,m)) ([((i,j), if i == j then
> 1.0 else 0.0) | i <- [1..m], j <- [1..m]] :: [((Int,Int), Double)])
>
> Doesn't seem to compile, nor do minor variations of the type declaration.
>

If you use Hoogle to find the type and API docs for 'newListArray', I
believe you'll be able to figure out what's wrong, but I'll give you a
hint. The list you're giving to 'newListArray' contains too much; and the
pair you give it is only half correct.

Kevin

-- 
Kevin Charter
kevin.char...@acm.org
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] I am having trouble with the type declaration for creating an identity matrix.

2012-04-24 Thread Daniel Peebles
Your problem is that you're including the (i, j) in your array element
type, when you really only want it to be in your index type (I assume).
This would not normally be an issue, but an unboxed array doesn't work on
an element type of ((Int, Int), Double).

You might consider instead making a new unboxed array with a default value
of 0.0, and then forM_ an action that writes 1.0 at index (i, i).

On Tue, Apr 24, 2012 at 5:20 PM, KC  wrote:

> initIdentityMat :: Int -> ST s (STUArray s (Int,Int) ((Int, Int), Double))
> initIdentityMat m = newListArray ((1,m),(1,m)) ([((i,j), if i == j then
> 1.0 else 0.0) | i <- [1..m], j <- [1..m]] :: [((Int,Int), Double)])
>
> Doesn't seem to compile, nor do minor variations of the type declaration.
>
> --
> --
> Regards,
> KC
>
> ___
> 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] JSON library suggestions?

2012-04-24 Thread Alvaro Gutierrez
JSON numbers are not equivalent to JavaScript/ECMAScript numbers, even if
they are nominally related; the key differences are that in JSON, numeric
literals:

(a) can have any non-zero number of digits, effectively making JSON numbers
both unbounded and arbitrarily precise (though actual infinities cannot be
represented); and
(b) cannot represent values that are not composed of digits, like NaN.

For that reason, most standard (fixed size/binary) numeric types like
double are a poor choice to contain numeric values specified in JSON; in
particular, the mismatch means that conversion can be lossy in both
directions.

Hope that helps!

Alvaro


On Tue, Apr 24, 2012 at 5:19 PM, Jeremy Shaw  wrote:

> Hello,
>
> I could be wrong, but I think the only real numeric type in javascript
> is 'Number' which is a floating point number? Which is why Aeson and
> others insist on converting everything to a Double or other Rational
> number?
>
> - jeremy
>
> On Tue, Apr 24, 2012 at 3:46 PM, Jeff Shaw  wrote:
> > Hello,
> > Up until now I've been using Aeson, but I've found that its number type
> > isn't going to work for me. I need to use decimal numbers while avoiding
> > conversions from and to Double, which Aeson doesn't allow. There are
> quite a
> > few more JSON libraries for Haskell, which all appear to use Rational for
> > numbers, so I'm wondering if anyone can recommend one.
> >
> > Thanks,
> > Jeff
> >
> > ___
> > 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] JSON library suggestions?

2012-04-24 Thread Jeff Shaw

Hi Jeremy,
Sorry if I was unclear. Rational is acceptable to me as the result of a 
JSON parse, but Double (which Aeson uses), is not. Also acceptable would 
be Data.Decimal.Decimal, or maybe one of the types from Data.Fixed.


JSON doesn't specify a data type for numbers, only a format.

Jeff

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] JSON library suggestions?

2012-04-24 Thread Jeremy Shaw
Hello,

I could be wrong, but I think the only real numeric type in javascript
is 'Number' which is a floating point number? Which is why Aeson and
others insist on converting everything to a Double or other Rational
number?

- jeremy

On Tue, Apr 24, 2012 at 3:46 PM, Jeff Shaw  wrote:
> Hello,
> Up until now I've been using Aeson, but I've found that its number type
> isn't going to work for me. I need to use decimal numbers while avoiding
> conversions from and to Double, which Aeson doesn't allow. There are quite a
> few more JSON libraries for Haskell, which all appear to use Rational for
> numbers, so I'm wondering if anyone can recommend one.
>
> Thanks,
> Jeff
>
> ___
> 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] I am having trouble with the type declaration for creating an identity matrix.

2012-04-24 Thread KC
initIdentityMat :: Int -> ST s (STUArray s (Int,Int) ((Int, Int), Double))
initIdentityMat m = newListArray ((1,m),(1,m)) ([((i,j), if i == j then 1.0
else 0.0) | i <- [1..m], j <- [1..m]] :: [((Int,Int), Double)])

Doesn't seem to compile, nor do minor variations of the type declaration.

-- 
--
Regards,
KC
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] JSON library suggestions?

2012-04-24 Thread Jeff Shaw

Hello,
Up until now I've been using Aeson, but I've found that its number type 
isn't going to work for me. I need to use decimal numbers while avoiding 
conversions from and to Double, which Aeson doesn't allow. There are 
quite a few more JSON libraries for Haskell, which all appear to use 
Rational for numbers, so I'm wondering if anyone can recommend one.


Thanks,
Jeff

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Offer to mirror Hackage

2012-04-24 Thread Ryan Newton
>
> I wonder if this could get to the point where it could be done
> seti-at-home style, farmed out via a VM image.  That is people would run
> the image to provide resources (and geographic distribution) to the build
> server cloud.  Maybe they get a fast local mirror as a reward.
>
> If it were every that easy I would certainly love to run a VM!
>

Surprisingly BOINC seems to *not* be virtualized and instead just runs
native applications.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Offer to mirror Hackage

2012-04-24 Thread Ryan Newton
>
> There's two options I think:
> 1. a machine for the central hackage server,
> 2. a machine for doing package builds
>
> The former will require more organisation, partly because we need the
> haskell.org people to have some degree of control over the system. The
> latter is easier because the design allows for multiple clients to do
> builds rather than just one central machine. So all that requires is a
> user account to upload the data. (plus the small matter of a working
> build bot client software, which is where scoutess may help)


I wonder if this could get to the point where it could be done seti-at-home
style, farmed out via a VM image.  That is people would run the image to
provide resources (and geographic distribution) to the build server cloud.
 Maybe they get a fast local mirror as a reward.

If it were every that easy I would certainly love to run a VM!

  -Ryan
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Offer to mirror Hackage

2012-04-24 Thread Duncan Coutts
On Thu, 2012-04-19 at 11:12 -0400, Ryan Newton wrote:
> Hello all,
> 
> 
> Right now I'm trying to answer a simple question:
>   * Would the current Haskell.org / hackage infrastructure benefit
> from the donation of a dedicated VM with good
> bandwidth/uptime?
> Whoever already knows how to do this could configure it.  
> 
> 
> In trying to answer the above question I found this long email thread
> from 1.5 years ago.  Duncan said the following:
> 
> On Thu, Dec 9, 2010 at 6:47 PM, Duncan Coutts
>  wrote:
> That's certainly what we've been planning on, that anyone can
> run a
> mirror, no permissions needed. The issue people have raised is
> what
> about having public mirrors that are used automatically or
> semi-automatically by clients.
> 
> 
> Are there any updates to this in the last year?  Is anybody running a
> mirror?

Yes, we're running a public testing instance of the new hackage server
at:

http://hackage.factisresearch.com/

It has live mirroring running.

This is in a VM donated by factis research, at least on a temporary
basis to help with the testing of the new hackage server code.

I think the answer for the longer term is still yes. We have not yet
discussed with Galois if the new hackage server should be hosted on
their infrastructure. The new code does take more resources and is not
based on apache, so it may not be appropriate to host it on the same
machine as is currently used.

There's two options I think:
 1. a machine for the central hackage server,
 2. a machine for doing package builds

The former will require more organisation, partly because we need the
haskell.org people to have some degree of control over the system. The
latter is easier because the design allows for multiple clients to do
builds rather than just one central machine. So all that requires is a
user account to upload the data. (plus the small matter of a working
build bot client software, which is where scoutess may help)

Duncan



___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Correspondence between libraries and modules

2012-04-24 Thread Gregg Lebovitz

  
  


On 4/23/2012 10:17 PM, Brandon Allbery wrote:

  
On Mon, Apr 23, 2012 at 17:16, Gregg
  Lebovitz 
  wrote:
  

  
On 4/23/2012 3:39 PM, Brandon Allbery
  wrote:
  

  

  The other dirty little secret that is
carefully being avoided here is the battle
between the folks for whom Haskell is a
language research platform and those who use
it to get work done.  It's not entirely
inaccurate to say the former group would
regard a fragmented module namespace as a
good thing, specifically because it
discourages people from considering it to be
stable

  

  

Brandon, I find that a little hard to believe.  If the
issues are similar to other systems and languages, then 
I think it is more likely that no one has volunteered to
work on it.  You volunteering to help?



Yes, you do find it hard to believe; so hard that you
  went straight past it and tried to point to the "easy"
  technical solution to the problem you decided to see in
  place of the real one, which doesn't have a technical
  solution.
  

  


Brandon, I am very glad to make your acquaintance. I think you have
given these issue much thought. That is good.

No, I don't think I "went straight past it". I we are trying to
address the same issue, but from different directions. If you take
the time to look at my history, you'll find that I spent my career
bridging the very gap you make so very salient.

Here's where we differ, you see an untenable political issue, and I
see a technical one. The question of how to support rapid innovation
and stable deployment is not an us versus them problem. It is one of
staging releases. The Linux kernel is a really good example. The
Linux development team innovates faster than the community can
absorb it. The same was true of the GNU team. Distributions
addressed the gap by staging releases.

I fought this very battle in the 1980s with the Andrew system. The
technology coming out of the ITC (research community) was evolving
faster than users could absorb. Researchers want to innovate and
push the limits and users want stability. I've spoken with many in
the Haskell research community, and I never heard anyone say "no, we
want to obfuscate Haskell so that we never have to make is stable."
I think both communities want success. The question is how to build
a system that will address both.

From your history, I see you are knowledgeable and well known on the
deployment side of technology. You also understand what Haskell
needs to move forward. So I ask you again, are you volunteering to
help?


  

  


  
  -- 
  brandon s allbery                                      allber...@gmail.com
  wandering unix systems administrator (available)     (412)
  475-9364 vm/sms
  

  

  


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Is protocol-buffers package maintainer reachable?

2012-04-24 Thread Henk-Jan van Tuyl
On Mon, 23 Apr 2012 16:26:11 +0200, Aleksey Khudyakov  
 wrote:



On 23.04.2012 17:01, Paul Graphov wrote:

Hello Cafe!

I am using protocol-buffers and hprotoc packages but they fail to
compile with recent GHC due to trivial errors. Hackage names
Christopher Edward Kuklewicz as their maintainer. I've sent him
patches more than a month ago but neiter they were applied nor I got
any response. It's quite inconvenient to keep patched versions all the
time. Does anybody know if he is still interested in maintaining those
packages? Is it possible to contact him? And what should I do if he is
unreachable?

I've too tried to contact him almost year ago about same issue. Never  
got an answer.


It seems that his facebook page is
  https://www.facebook.com/ThereIsNoMagic

Regards,
Henk-Jan van Tuyl


--
http://Van.Tuyl.eu/
http://members.chello.nl/hjgtuyl/tourdemonad.html
Haskell programming
--

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe



Re: [Haskell-cafe] ANN: signed-multiset-0.1

2012-04-24 Thread Stefan Holdermans
Sjoerd,

> I have a hard time believing you have implemented the semantics that people 
> have agreed on to be a sensible semantics for hybrid sets.

Noted.

Cheers,

  Stefan

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] SOE code on Mac OS X Lion

2012-04-24 Thread N. Raghavendra
I am trying to use code from the book `The Haskell School of Expression'
on an iMac with Mac OS X Lion.  I have installed the latest version of
Haskell Platform (2011.4.0.0 64bit).  I then followed step 1 on the Web
page http://www.cs.yale.edu/homes/hudak/SOE/software1.htm, and did
`cabal install GLFW'.  There were no errors in the installation.

Regarding step 2 in the instructions, I have downloaded
SOE-20120121.zip, but don't know how to proceed further.  The Web page
says,

  "Note for OS X users: running graphics applications from GHCi is no
  longer supported. Instead, one has to compile a graphics program using
  GHC in order to run it (see example/GMIExamples.lhs for an example)."

Also, SOE/src/Code.html says,

  "For MacOS X, unfortunately SOE cannot be run from under GHCi
  interactively due to problems with the Graphics library it uses. SOE
  programs must be compiled in order to run OS X. This means you have to
  export the main function from a particular module (by adding it to the
  module export list) and compile with command line: ghc -main-is="

I am only trying to learn Haskell from SOE, and don't understand how
to compile the SOE software with GHC. What precisely is the command
that I should invoke in the Terminal for the compilation?  I'd
appreciate any help on compiling and using the SOE code.

Thanks and regards,
Raghavendra.

-- 
N. Raghavendra  | http://www.retrotexts.net/
Harish-Chandra Research Institute   | http://www.mri.ernet.in/


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Is protocol-buffers package maintainer reachable?

2012-04-24 Thread Yitzchak Gale
Johan Tibell wrote:
> If Chris is indeed out of the loop we should find a new maintainer.
> Mark and I are also interested in the future of protocol buffers in
> Haskell.

Also, Chris is the maintainer of some regex packages
that are in the Haskell Platform.

-Yitz

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe