Re: [Haskell] [Google Summer of Code 2018] Student Applications are now open

2018-03-16 Thread Dan Burton
Pardon the tangent, but if I could just throw in my two cents about this.

The Haskell community has always been helpful, kind, and inclusive of me.
This was true before I came out of the closet as gay, and remained true
afterwards as well. At a time when I was unable to turn to people in my
personal life, I was able to turn to contacts in the Haskell community. I
would not have done so if I did not explicitly know that those particular
people would be safe to turn to.

Messages of explicit inclusion need not be interpreted as divisive; they do
not imply exclusion of those not explicitly listed. I am grateful that
minorities are explicitly called out and strongly encouraged to apply in
this announcement. I am confident that haskell.org will make every effort
to support and empower all applicants.

-- Dan Burton

On Fri, Mar 16, 2018 at 4:06 AM, Tillmann Vogt  wrote:

> Am 16.03.2018 um 00:49 schrieb Jasper Van der Jeugt:
>
>> Lastly, we recognize that inclusion is an important part of our mission
>> to promote Haskell. Therefore, we strongly encourage applications from
>>
>
> Why "strongly" encourage? Why not just encourage?
> This sounds like you are in a war. I would also be very careful about
> being "on a mission". This by itself would be OK if its just about being
> enthusiastic. But in combination with the other text. Hm. People generally
> don't like missionaries.
> Also: Why are minorities explicitly named? To me this has a dividing and
> discriminating effect.
> I know I know. I am supposed to just ignore this. You most likely just
> copied it from a template. The people with the money want control over our
> minds. And we should better not complain or there will be no GSOC next
> year. SCNR.
>
>> people in communities that are underrepresented in functional
>> programming, including but not limited to women; people of color; people
>> in gender, sexual and romantic minorities; people with disabilities;
>> people residing in Asia, Africa, or Latin America; and people who have
>> never taken part in similar programs before.
>>
>> Kind regards, Jasper Van der Jeugt & George Wilson on behalf of the
>> Haskell.org Committee
>>
>
> ___
> Haskell mailing list
> Haskell@haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell
>
___
Haskell mailing list
Haskell@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell


Re: [Haskell] Haskell on Windows instructions - is MinGHC version update needed?

2015-04-16 Thread Dan Burton
+1 please update 7.8.3 -> 7.8.4. Consider also providing the minghc-7.10.1
link as well. Or just link to the github readme, which has these options
and various relevant explanations:

https://github.com/fpco/minghc#readme

n.b. for some reason Howard's email landed in my spam box.

-- Dan Burton

On Wed, Apr 15, 2015 at 9:50 AM, Howard B. Golden  wrote:

> Hi,
>
> Currently, the Haskell website's Windows download page (
> https://www.haskell.org/downloads/windows) offers two alternatives,
> MinGHC and Haskell Platform. The MinGHC alternative has a link to
> MinGHC-7.8.3 installer. Should this be updated to MinGHC-7.8.4? I ask this
> because Long Term Support Haskell 2.3 is now using GHC 7.8.4. If you want
> to update the link, you only need to change the URL from 7.8.3 to 7.8.4.
>
> Howard
> ___
> Haskell mailing list
> Haskell@haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell
>
___
Haskell mailing list
Haskell@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell


[Haskell] ANN: io-memoize 1.1

2014-06-12 Thread Dan Burton
Have you ever wanted to restrict an IO action such that it could only be
invoked once? Now you can with System.IO.Memoize.once (formerly known as
ioMemo).

Need slightly more complicated logic? (e.g. An IO callback that takes an
argument but then only executes the first time around, essentially ignoring
the argument the other times it is called.) Leverage the dead simple "write
once"  Control.Concurrent.Cache api for fun and profit.

1. Create an empty cache with newCache
2. fetch repeatedly from the cache, each time providing a fallback in case
it is empty.
3. There is no step 3.

Fetching from a Cache is thread safe: only one "fallback" will execute at a
time, and after the first successful fallback, the cached value will be set
and no other fallbacks will be called.

-- Dan Burton
___
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell


[Haskell] ANNOUNCE basic-prelude-0.3

2012-08-23 Thread Dan Burton
We are pleased to announce a new release of basic-prelude.

http://hackage.haskell.org/package/basic-prelude-0.3.0.0

We apparently weren't entirely clear about
the original purpose of basic-prelude,
and we got repeated feedback of the form
"where are the list functions?"

Somewhat in response to this, we decided to rename the BasicPrelude
module to CorePrelude. This module is an *incomplete* prelude,
and the goal of this module is to provide enhanced core Prelude
functionality
*without* making any controversial decisions. CorePrelude serves
as the core of Michael's ClassyPrelude, my ModularPrelude,
and now the new BasicPrelude module. (If you ever feel the need
to create your own Prelude replacement, we encourage you to
build it off of CorePrelude. If there is any reason that CorePrelude
would not be well-suited to this purpose, then please let us know!)
I believe that by using the same Core, it will be easier for these
various Prelude replacements to play nice with each other.

We created a new module, BasicPrelude
(not to be confused with the old BasicPrelude),
which *is* a fully-featured Prelude,
emphasizing the use of Text and FilePath, while also providing
most of the List functions that you know and love, with a few exceptions,
as documented. BasicPrelude is among the simplest examples of how
we intend CorePrelude to be used.

The next time you are working on a hobby project,
please try using BasicPrelude instead of regular Prelude,
and let us know how it goes!

{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
import BasicPrelude


-- Dan Burton
___
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell


Re: [Haskell] Tuples & Lists

2012-08-13 Thread Dan Burton
>
> all (== test_lcv) [init_lcv, update_lcv, update_lcv']"
>
> Wouldn't this be be better as tuple avoiding list overhead or does ghc
> optimize it out?
>
If I'm not mistaken, ghc will optimize it out. From
http://hackage.haskell.org/packages/archive/base/4.5.1.0/doc/html/src/GHC-List.html#all

{-# RULES
 ...
"all/build" forall p (g::forall b.(a->b->b)->b->b) .
all p (build g) = g ((&&) . p) True
 #-}

See the docs on List fusion for details (note how "all" is listed as a
"good consumer"):
http://www.haskell.org/ghc/docs/7.4.2/html/users_guide/rewrite-rules.html#id690070

So in fact it may be the case that the tuple version (if it were valid
Haskell) is less efficient because it can't take advantage of list fusion
and has to allocate the tuple instead.

-- Dan Burton
___
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell


[Haskell] ANNOUNCE: basic-prelude

2012-08-10 Thread Dan Burton
Michael Snoyman and I are pleased to announce *basic-prelude*,
an enhanced core prelude, meant for building up more complete preludes on
top of.

http://hackage.haskell.org/package/basic-prelude-0.1.0.0

Basic Prelude provides three major things:

* Most of the usual exports from Prelude
that you have come to know and love
* Additional exports from *base* that are commonly used,
e.g. Applicative, Monad, and Arrow stuff
* Access to common non-base data types:
Text, Vector, ByteString, and various collections

Basic Prelude will serve as the foundation for both
Michael's Classy Prelude and my Modular Prelude,
and we hope that it will be attractive enough to serve
as the foundation for *your* Prelude replacement as well.
Note that BasicPrelude is not intended for standalone use,
although importing Data.List alongside it should provide
an environment nearly identical to Prelude.

Basic Prelude takes the approach of hooking into existing
data types and typeclasses, so it doesn't fix issues such as
making Functor a superclass of Monad.
Since Basic, Classy, and Modular Preludes are all still
currently highly experimental, feedback is much appreciated.

-- Dan Burton
___
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell


[Haskell] ANNOUNCE: tardis

2012-08-06 Thread Dan Burton
I'm pleased to announce that I've uploaded the *tardis* package to hackage.

http://hackage.haskell.org/package/tardis-0.2.0.0

*TardisT* is a monad transformer that combines the (regular, "forwards")
State monad
with the "backwards State monad", allowing you to communicate on two
channels of state:
one is "backwards travelling" state, while the other is "forwards
travelling" state.
Its primitives are comparable to the State monad's "get" and "put", but the
names
disambiguate which channel they operate on:

getPast:: Monad m =>   TardisT bw fw m fw
getFuture  :: Monad m =>   TardisT bw fw m bw

sendPast   :: Monad m => bw -> TardisT bw fw m ()

sendFuture :: Monad m => fw -> TardisT bw fw m ()

These primitives allow you to write some very amusing timey-wimey code,
but it only works in the presence of sufficient laziness.
If you run into an infinite loop, try adding laziness annotations
everywhere,
and make sure that what you are trying to do is not a time paradox.

I've provided both *transformers* and *mtl* style modules:
Control.Monad.Trans.Tardis contains the transformer,
while Control.Monad.Tardis.Class contains the MonadTardis class,
and Control.Monad.Tardis re-exports both as well as the TardisT instance
for MonadTardis.

See the readme on github for more details:

https://github.com/DanBurton/tardis#readme

As a side note, since the code base is relatively small, it can also serve
as a simple demonstration of how to use a cabal flag
in conjunction with CPP to selectively include swaths of code
(see Control/Monad/Tardis.hs and tardis.cabal).

I'm not entirely sold on the naming conventions for the package (including
the package name),
and am open to suggestions.

-- Dan Burton
___
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell


[Haskell] ANNOUNCE: lens-family-th 0.1.0.0

2012-07-06 Thread Dan Burton
Following the announcement of lens-family, I'm pleased to announce
lens-family-th 0.1.0.0, a Template Haskell library supplying macros to
generate lens-family lenses for fields of data types declared with record
syntax.

Be warned that currently, type signatures are *not* generated alongside the
lens definitions. Type inference should correctly determine the type of the
generated lenses, but I have structured the library code so that in the
future, type signatures can also be generated. Patches welcome!

http://hackage.haskell.org/package/lens-family-th

-- Dan Burton
___
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell


Re: [Haskell] ANNOUNCE: set-monad

2012-06-16 Thread Dan Burton
Convenience aside, doesn't the functor instance conceptually violate some
sort of law?

fmap (const 1) someSet

The entire shape of the set changes.

fmap (g . h) = fmap g . fmap h

This law wouldn't hold given the following contrived ord instance

data Foo = Foo { a, b :: Int }
instance Ord Foo where
  compare = compare `on` a

Given functions

h foo = foo { a = 1 }
g foo = foo { a = b foo }

Does this library address this? If so, how? If not, then you'd best note it
in the docs.

On Jun 15, 2012 6:42 PM, "George Giorgidze"  wrote:

I would like to announce the first release of the set-monad library.

On Hackage: http://hackage.haskell.org/package/set-monad

The set-monad library exports the Set abstract data type and
set-manipulating functions. These functions behave exactly as their
namesakes from the Data.Set module of the containers library. In
addition, the set-monad library extends Data.Set by providing Functor,
Applicative, Alternative, Monad, and MonadPlus instances for sets.

In other words, you can use the set-monad library as a drop-in
replacement for the Data.Set module of the containers library and, in
addition, you will also get the aforementioned instances which are not
available in the containers package.

It is not possible to directly implement instances for the
aforementioned standard Haskell type classes for the Set data type
from the containers library. This is because the key operations map
and union, are constrained with Ord as follows.

map :: (Ord a, Ord b) => (a -> b) -> Set a -> Set b
union :: (Ord a) => Set a -> Set a -> Set a

The set-monad library provides the type class instances by wrapping
the constrained Set type into a data type that has unconstrained
constructors corresponding to monadic combinators. The data type
constructors that represent monadic combinators are evaluated with a
constrained run function. This elevates the need to use the
constraints in the instance definitions (this is what prevents a
direct definition). The wrapping and unwrapping happens internally in
the library and does not affect its interface.

For details, see the rather compact definitions of the run function
and type class instances. The left identity and associativity monad
laws play a crucial role in the definition of the run function. The
rest of the code should be self explanatory.

The technique is not new. This library was inspired by [1]. To my
knowledge, the original, systematic presentation of the idea to
represent monadic combinators as data is given in [2]. There is also a
Haskell library that provides a generic infrastructure for the
aforementioned wrapping and unwrapping [3].

The set-monad library is particularly useful for writing set-oriented
code using the do and/or monad comprehension notations. For example,
the following definitions now type check.

 s1 :: Set (Int,Int)
 s1 = do a <- fromList [1 .. 4]
b <- fromList [1 .. 4]
return (a,b)

 -- with -XMonadComprehensions
 s2 :: Set (Int,Int)
 s2 = [ (a,b) | (a,b) <- s1, even a, even b ]

 s3 :: Set Int
 s3 = fmap (+1) (fromList [1 .. 4])

As noted in [1], the implementation technique can be used for monadic
libraries and EDSLs with restricted types (compiled EDSLs often
restrict the types that they can handle). Haskell's standard monad
type class can be used for restricted monad instances. There is no
need to resort to GHC extensions that rebind the standard monadic
combinators with the library or EDSL specific ones.

[1] CSDL Blog: The home of applied functional programming at KU. Monad
Reification in Haskell and the Sunroof Javascript compiler.
http://www.ittc.ku.edu/csdlblog/?p=88

[2] Chuan-kai Lin. 2006. Programming monads operationally with Unimo.
In Proceedings of the eleventh ACM SIGPLAN International Conference on
Functional Programming (ICFP '06). ACM.

[3] Heinrich Apfelmus. The operational package.
http://hackage.haskell.org/package/operational

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


[Haskell] ANNOUNCE: netspec-0.2.0.0

2012-02-21 Thread Dan Burton
The examples are currently written in a fairly brittle style (they assume
no exceptions, uninterrupted connection, etc). Recommendations to beef up
both the examples and the safety of the framework in general would be
greatly appreciated.

https://github.com/DanBurton/netspec/tree/master/examples

--
Dan Burton
danburton.em...@gmail.com

On Tue, Feb 21, 2012 at 7:11 PM, Dan Burton wrote:

> Haskellers,
>
> I'm pleased to announce the first public release of NetSpec, a little
> Network library to simplify networking tasks that involve a fixed number of
> connections, using Erlang-esque send and receive primitives.
>
> Check out the docs: http://hackage.haskell.org/package/netspec
> And the repo on github (with examples):
> https://github.com/DanBurton/netspec
>
> --
> Dan Burton
>
> ___
> Haskell mailing list
> Haskell@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell
>
>
___
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell


[Haskell] (no subject)

2012-02-21 Thread Dan Burton
Haskellers,

I'm pleased to announce the first public release of NetSpec, a little
Network library to simplify networking tasks that involve a fixed number of
connections, using Erlang-esque send and receive primitives.

Check out the docs: http://hackage.haskell.org/package/netspec
And the repo on github (with examples): https://github.com/DanBurton/netspec

--
Dan Burton
___
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell