« first day (942 days earlier)      last day (3991 days later) » 

11:00 AM
on f g = f . (g &&& g)
 
@LucDanton Needs curry.
 
Oh yeah, that typechecked because I run my test on some pairs by pure accident. Doh!
 
uncurry f . join (&&&) g
(join for functions is cool :P)
 
Ye I was freeing some points as well.
 
Boobs can get rid of g, I think.
on f = uncurry f `boobs` join (&&&)
 
Xeo
11:06 AM
@R.MartinhoFernandes Hm... &&& is fan-out, so compare `on` (\x -> (f x, g x))? Is tuple an instance of Ord?
 
user142019
Let's see whether I can get Wi-Fi to work in Gentoo at school.
 
λ> :i (,)
data (,) a b = (,) a b  -- Defined in `GHC.Tuple'
instance (Bounded a, Bounded b) => Bounded (a, b)
  -- Defined in `GHC.Enum'
instance (Eq a, Eq b) => Eq (a, b) -- Defined in `GHC.Classes'
instance (Ord a, Ord b) => Ord (a, b) -- Defined in `GHC.Classes'
instance (Read a, Read b) => Read (a, b) -- Defined in `GHC.Read'
instance (Show a, Show b) => Show (a, b) -- Defined in `GHC.Show'
λ>
 
Xeo
@R.MartinhoFernandes Ah, so compareBy f g = compare `on` (f &&& g) would be the same kind of compare_by that we did for C++ before?
 
11:09 AM
I was tempted to name my compose_over compose_on instead.
CBA to words
 
Xeo
@R.MartinhoFernandes How would you generalize that to arbitary numbers of compare functions? Applicative?
 
room topic changed to Lounge<C++>: We've gone functional. [c++] [c++11] [emoticons] [no-helpdesk]
3
 
@DeadMG "I also love writing masses of library crap to work around language issues." --> that one comment was fun to read.
 
Variadic anything doesn't fare well. See: tuples, fooN (liftM2, liftA3, zipWith4)
 
Xeo
Hm
Well, I guess you could always compareBy f $ compareBy g $ compareBy h $ ..., huh?
 
user142019
11:19 AM
Does Ogonek build on GCC 4.7 or only GCC 4.8?
 
user142019
Nevermind, I'll install GCC 4.8.
 
Xeo
Although compare `on` (f &&& g &&& h &&& ...) would be the same, I guess
 
@Xeo You can make variadic functions in regular Haskell, but it's probably easier with TH.
@rightfold Both.
 
user142019
Neat.
 
user142019
Hahahaha.
 
user142019
11:26 AM
Our teacher assumes people here know how to use database transactions.
 
user142019
Awesome.
 
Xeo
Uhm
 
Ooooh, I remembered something else that is annoying in Haskell. Monad transformers (mtl) are a bit quirky.
 
Xeo
let compareBy = (compare `on`)
:t compareBy
> compareBy :: (a -> ()) -> a -> a -> Ordering
let compareBy f = compare `on` f
:t compareBy
> compareBy :: (Num a, Ord a) => a -> a -> Ordering
confuzzled
 
@R.MartinhoFernandes I think one is supposed to use transformers these days.
 
11:29 AM
@LucDanton ?
Is that what you meant to type?
 
There's a slow transition away from mtl to transformers IIRC.
 
Oh that's a new library?
 
Check that you have Control.Monad.Trans.*
 
@LucDanton Erm, that's the mtl.
 
E.g. I have Control.Monad.List and Control.Monad.Trans.List.
Supposedly one is suckier than the other.
 
Hooray, I have 1.5 weeks of vacation starting today :)
 
Ohhh nice
Enjoy
 
34
A: mtl, transformers, monads-fd, monadLib, and the paradox of choice

C. A. McCannA bunch of them are almost completely equivalent: mtl uses GHC extensions, but transformers is Haskell 98. monads-fd and monads-tf are add-ons to transformers, using functional dependencies and type families respectively, both providing the functionality in mtl that's missing from transformers....

Oh wow, from 2010. Maybe not so snazzy then.
 
@TonyTheLion I started my vacation with boring tax stuff :)
 
oh funz
 
11:35 AM
@R.MartinhoFernandes It appears I may have remembered the wrong way around.
 
@LucDanton Meh, so there's really no difference in the actual coding bits.
 
@TonyTheLion How come your are in the Lounge instead of out on the road, celebrating your driver's license? :)
 
I don't really care about Haskell 98, tbh. Quite happy with GHC Haskell.
 
Oh wait, celebrating anything outside of the Lounge must be pretty boring.
 
@FredOverflow He could be doing both!
 
11:36 AM
gone functional?
Wasn't this room functional like for last few months?
 
@FredOverflow Because I'm at work, I can't be on the road right now. :/
 
> Still unsatisfied? Throw them all out, download category-extras, and solve all the world's problems with a page and a half of incomprehensible abstract nonsense breathtakingly generic code.
This, however, sounds promising.
 
@TonyTheLion You can always hit the road later. Speaking of hitting the road, have you ever played "Sam & Max hit the road"? :)
 
> incomprehensible abstract nonsense
lol
@FredOverflow No, haven't heard of that. Actually, hitting the road, I'm afraid of getting lost. :/ I'm bad at orienting myself.
 
> The obsolete category-extras package provided...
 
11:38 AM
@TonyTheLion Don't we have IT solutions for that?
 
0
A: Can I list-initialize a vector of move-only type?

GartAs it has been pointed out, it is not possible to initialize a vector of move-only type with an initializer list. The solution originally proposed by @Johannes works fine, but I have another idea... What if we don't create a temporary array and then move elements from there into the vector, but u...

Please, make it stop.
@LucDanton Bummer.
 
@BartekBanachewicz But now C++ is going to grow polymorphic lambdas!
 
@FredOverflow polymorphic or generic?
 
What's the difference?
 
@FredOverflow We do. But I'm waiting for my car charger to come, so I can use my phone GPS
 
user142019
11:40 AM
GCC y u no install.
 
oh I've just taken a look at the list of games we use for tests here
 
user142019
It's hanging on make bootstrap, is that normal?
 
are you installing from sources?
 
user142019
Homebrew.
 
user142019
It shows no CPU activity.
 
11:42 AM
Damn, by Ekmett himself. Would have been nice.
 
user142019
Oh now clang is running, nvm.
 
@rightfold That's a strange edit :)
 
ok, I just got Android
I wonder how using it with a mouse will go
wow, pretty smooth
 
user142019
clang makes my computer warm.
 
@rightfold as does purely functional programming :)
 
user142019
11:44 AM
I mean, physically warm.
 
Meh, lambdas.
 
@rightfold Right, as does pure FP. As Simon says, "the box gets hot, but nothing else."
 
user142019
Not if you can prove your program will terminate and you have a decent optimizer.
 
Do you have to take the fun out of FP? ;)
 
ctional Programming.
 
11:48 AM
clitoral Programming
 
Apparently this Android is drunk, because it tells me to connect my charger
and reboots for no reason.
 
Android = Java :(
 
Since I found this post extremely informative. I thought I would update other googlers: mtl now depends on transformers, monads-fd is now a stub around mtl. So use mtl if you need the extra goodies it has, or just import transformers if it has everything you need. — jberryman Sep 4 '11 at 4:53
Also this.
Basically, the quirks are all there.
 
> mtl is the one in the Haskell Platform, but I keep hearing on reddit that it's uncool.
lol
 
I think I'm missing the complete point of switching over the two libraries then lol
 
11:50 AM
@LucDanton Purism.
 
I find any of them quite ad-hoc :s
 
@FredOverflow hivemind
 
Aka "oh noes, mtl uses extensions of the compiler that everyone ends up using anyway!"
@BartekBanachewicz lol
I remember reading a Hughes or spj paper about a better transformer library. There must be an implementation around somewhere.
 
needs moar natural transformations and distributivity
 
Ah, the next D talk is up on YouTube.
 
11:56 AM
Any ideas how to set TreatWChar_tAsBuiltInType property to MSBuild.exe on command line?
 
"gegebenenfalls" is tricky to pronounce.
 
Xeo
"ge- ge- be nen falls"
Nah, can't say it's tricky :P
 
Oh, @Xeo, can you say "squirrel"?
 
Xeo
?
 
I was told that is hard for German speakers.
 
11:59 AM
I don't see how that would be hard for German speakers
 

« first day (942 days earlier)      last day (3991 days later) »