Next meeting: Wed, 12 Dec

30 views
Skip to first unread message

Sean Leather

unread,
Dec 6, 2012, 4:32:30 PM12/6/12
to Dutch Haskell Users Group List
Let's meet at 19:00 as usual.

Since it will likely be a small group, let's meet at the BBL [1] on the Uithof in the coffee room on the 5th floor, which you'll see as you come out the elevator.

I'll set up the projector, so we can watch any videos we want. I'll also bring the vodka that I didn't get to open when we were at The Basket. (I'll bring snacks and other drinks, too, so the vodka doesn't put us under too quickly. If you want to bring something, feel free.)

I guess Thomas will bring his lottery.

Hope to see you there!

Regards,
Sean

noknok

unread,
Dec 7, 2012, 8:37:08 AM12/7/12
to dutc...@googlegroups.com


On Thursday, December 6, 2012 10:32:30 PM UTC+1, Sean Leather wrote:
Let's meet at 19:00 as usual.

Since it will likely be a small group, let's meet at the BBL [1] on the Uithof in the coffee room on the 5th floor, which you'll see as you come out the elevator.

I'll set up the projector, so we can watch any videos we want. I'll also bring the vodka that I didn't get to open when we were at The Basket. (I'll bring snacks and other drinks, too, so the vodka doesn't put us under too quickly. If you want to bring something, feel free.)

Great! Thank you.
 

I guess Thomas will bring his lottery.


Yes! For the raffle at the AmsterdamPHP meeting the organizer had written a professional program. Not that I wouldn't be able to built something similar, too, of course ;-) But I think I just bring a hat and paper cuts.
I am a bit disappointed though about the low response to the wish list until now. Maybe you could still find some time to post me good book recommendations, otherwise the list is a bit too poor to claim a recommending authority. 
Of course, if you are too young and digital to understand the concept of a "book", you will be excused. In that case, you should really join us on Wednesday and try to win the lottery!

 
Hope to see you there!

Regards,
Sean


By the way, I currently have a car and I would be happy to offer participants a lift, direction Amsterdam.

Looking forward to receive more book recommendations and to the event itself,
Thomas

Remy Willems

unread,
Dec 7, 2012, 7:15:19 PM12/7/12
to dutc...@googlegroups.com
Count me in.

Bram Neijt

unread,
Dec 11, 2012, 5:45:55 PM12/11/12
to dutc...@googlegroups.com
Hi Guys,

I might be late, but I'll be there.

See you tomorrow!

Bram


On Sat, Dec 8, 2012 at 1:15 AM, Remy Willems <steen...@gmail.com> wrote:
Count me in.

--
 
 

ζεβαστοσ

unread,
Dec 12, 2012, 3:23:08 AM12/12/12
to dutc...@googlegroups.com
Might like to come, though I have no idea what to expect (vodka and lottery?). How do I recognise you folks, are you all dressed up as lambdas?

Greets,
Bas

Adrien Haxaire

unread,
Dec 12, 2012, 3:39:28 AM12/12/12
to dutc...@googlegroups.com
Hello,

Might be a bit late too, depending on the trains. But coming for sure :)

See you there,
Adrien


On Thursday, December 6, 2012 10:32:30 PM UTC+1, Sean Leather wrote:

Sean Leather

unread,
Dec 12, 2012, 8:26:02 AM12/12/12
to dutc...@googlegroups.com
On Wed, Dec 12, 2012 at 9:23 AM, ζεβαστοσ <b...@z0.fm> wrote:
Might like to come, though I have no idea what to expect (vodka and lottery?).

Don't forget programming language geekery.
 
How do I recognise you folks, are you all dressed up as lambdas?

There probably won't be anybody else in the coffee room. My office is just down the hall, so I'll definitely be there before you. ;)

Regards,
Sean

ζεβαστοσ

unread,
Dec 12, 2012, 11:48:54 AM12/12/12
to dutc...@googlegroups.com
I can't make it today, I initially thought the meeting was in Amsterdam. I want to come next time though, when I can ask free and arrange transportation.

Have fun tonight.

Greets, Bas

Sean Leather

unread,
Dec 13, 2012, 3:21:43 AM12/13/12
to dutc...@googlegroups.com
We had a good meeting last night. Seven people showed up. We had a "BYOC(&WFI)" (Bring Your Own Code (And We'll Fix It)) night. It turned into an interesting battle of wits to see who could generalize more.

We had some code that looked like this:

rule m = p1 m && ... && pk m || pk+1 m && ... && pn m

Then, we came up with a function that abstracted over the "obvious" pattern:

> dnf :: a -> [[a -> Bool]] -> Bool
> dnf x = or . map (and . map ($ x))

Then, we could rewrite rule as:

rule m = dnf m [[p1, ..., pk], [pk+1, ..., pn]]

But some of us weren't satisfied with that. So, in the end, we created our own library/DSL for predicates.

First, we need some imports:

> import Control.Applicative
> import Data.Foldable as F

Then, we define a predicate: any (applicative) functor with a Bool type argument:

> type Pred f = f Bool

Given that Bool is the argument, we can derive the basic predicate constructors from the Bool constructors:

> true :: Applicative f => Pred f
> true = pure True

> false :: Applicative f => Pred f
> false = pure False

Additionally, we lift Bool operations to work on predicates:

> (&&&) :: Applicative f => Pred f -> Pred f -> Pred f
> (&&&) = liftA2 (&&)

> (|||) :: Applicative f => Pred f -> Pred f -> Pred f
> (|||) = liftA2 (||)

We also need lifted 'and' and 'or' functions (conveniently (?) defined for anything Foldable):

> andP, orP :: (Applicative f, Foldable c) => c (Pred f) -> Pred f
> andP = F.foldl' (&&&) true
> orP  = F.foldl' (|||) false

Finally, we have our new and improved function:

> dnf :: (Functor c, Applicative f, Foldable c, Foldable d) => c (d (Pred f)) -> Pred f
> dnf = orP . fmap andP

Unless you think you can do better? (Using Category and Arrow doesn't count: too trivial!)

Until next time!

Sean

Adrien Haxaire

unread,
Dec 18, 2012, 3:13:01 AM12/18/12
to dutc...@googlegroups.com
Thanks for posting the code.

The good thing with this kind of abstraction is that it is reusable and it shows how to get a lot from type classes and libraries; I wouldn't have thought of your "Hey, but it's a functor over the arrow operator, isn't it" :)

The concept of "BYOC(&WFI)" is very nice also to see how to write programs together; I really appreciated it. I think it's a good idea when we do not have plans for a talk.

Nice meeting as always!

Bram Neijt

unread,
Dec 18, 2012, 3:16:02 AM12/18/12
to dutc...@googlegroups.com
Hi everybody,

Thank you all for helping me with my code. I learned a lot and hopefully other people did as well.

I still have to put the code on github (because it was a group effort now). For those who didn't realise, the code was part of a hobby project to get my first Snap website in the air and the code we refactored has been live for a few months now (at [1]).

I'll let you guys know when the code is online, if you want a direct copy now let me know.

Greets,

Bram



Sean

--
 
 

Sean Leather

unread,
Dec 18, 2012, 12:49:06 PM12/18/12
to dutc...@googlegroups.com
Here are some photos from the meeting:


Regards,
Sean
Reply all
Reply to author
Forward
0 new messages