« first day (849 days earlier)      last day (4099 days later) » 

7:00 PM
it does seem that many of the others are unnecessarily dickish to you
 
@Zoidberg maybe you asked for it?
 
user142019
@TonyTheLion :D
 
user142019
I'm a weird idiot.
 
@DeadMG it's funny you're the only one NOT being dickish?
normally it's you being the dick
 
MUST MAKE FUTURAMA REFERENCES
 
7:01 PM
I'm in horrendous agony today, I have a right to be a dick
 
Xeo
Wait, maybe @Zoidberg's original code was broken from the beginning... You can't just do Just 42 >>= \x -> Nothing, I think. (dismiss the syntax problems, if there are any)
 
@TonyTheLion inorite
 
Xeo
(Pun unintended.)
 
@Xeo You can
 
Xeo
Damn
 
7:01 PM
there must some serious injustice going on if I'm the one not being a dick
 
@Xeo Punintentional?
 
user142019
@Xeo Maybe<int>{42} >>= [] (int) { return Maybe<int>{}; }
 
He's called Zoidberg :<
(We love you Zoidberg)
 
user142019
No you don't.
 
Xeo
I thought functions that are getting lifted should operate on just the contained value.
 
7:02 PM
I'm speechless
 
user142019
@Xeo Huh?
 
@Xeo In Just 42 >>= \x -> Nothing the x is 42
 
ITT: Zoidberg gets love from Cat.
 
user142019
-- Then what about this?

x <- something 42
y <- something 31
return (x + y) -- ???
 
Xeo
@CatPlusPlus Hm... wokay.
 
user142019
7:03 PM
Aka something 42 >>= \x -> something 31 >>= \y -> return (x + y).
 
You're all still bad at recognising when I'm making a joke/reference
 
@Xeo you know Haskell?
 
user142019
Who doesn't? Oh wait.
 
@Xeo What did you think it was?
 
Xeo
@TonyTheLion Somewhat.
 
7:04 PM
oh wow
 
user142019
Monads are endofunctors. \o/
 
(>>=) :: Monad m => m a -> (a -> m b) -> m b
 
Endofunctor: A functor that maps a category to itself.
what is a category?
 
You can't do f >>= g >>= h in C++ though
 
Xeo
@CatPlusPlus Dunno, I kinda thought the lifted function shouldn't itself be concerned with returning a monad.
 
7:05 PM
posted on February 11, 2013 by Eric Battalio

In the Community spotlights members of the C++ / developer community. This week, meet PJ Naughter, a C++ MVP and prolific C++ developer. Take it away, PJ… PJ has been a C++ MVP since 2007. In his spare time, he runs a personal web site at http://www.naughter.com where he publishes open source software and source code of use to Windows C++ developers. There is roughly 250,000 lines of O

 
@Xeo It has to
Also it's not lifted function
 
user142019
@TonyTheLion a structure that contains objects and morphisms that <insert correct term here> these objects. Very broadly.
 
Lifting is making (a -> b) into m a -> m b
 
Xeo
What's the correct name, then?
 
liftM :: Monad m => (a1 -> r) -> m a1 -> m r
 
user142019
7:06 PM
Functors map objects from one category to another one.
 
@Xeo It's another monadic action
>>= is composition for them
(Not sure if monadic action is actually a name or just something I think I've seen somewhere)
Monadic expression maybe
 
user142019
A functor that maps from category C to category C is an endofunctor.
 
Xeo
k
 
user142019
A functor that maps from category C to category D where D isn't C is not an endofunctor.
 
> In mathematics, a category is an algebraic structure that comprises "objects" that are linked by "arrows".
 
7:08 PM
an endofunctor is like an identity functor
object->object
that looks like C++
 
user142019
And since a monad is a composition of two functors F and G where G is right adjoint to F, it is an endofunctor.
 
C++ functions are categories I think
But I didn't really delve into category theory like Zoidberg
Maybe some day
 
user142019
In Haskell, types are objects and functions are morphisms.
 
user142019
For example, a function f from a to b: f :: a -> b.
 
a monad is a unit function and a bind function
afaik
 
user142019
7:10 PM
In C++ I'd say the same.
 
user142019
Types are objects and functions are morphisms.
 
@TonyTheLion And a type
It's a triplet
(T, bind, unit)
 
and unit is what?
 
Xeo
Constructor
(I think)
 
unit lifts a pure value into a monad
 
7:11 PM
is like f
 
It's the most trivial computation, that just returns a value
 
right
and the bind converts between types
 
Bind composes computations together
Like you've got int x = foo(); bar(x); in C++
 
so is there an order in which these are done?
 
foo and bar are computations, and bind is implicit
(kinda, disregard lack of monads)
 
7:12 PM
like unit->bind->T
or something
 
user142019
No.
 
like Maybe monad
it returns either Nothing or Something based on it's input
 
Unit returns T
 
Xeo
@MooingDuck: Just using boost::none won't work, as its type is a member pointer, and overloads must involve a UDT. :|
 
Bind takes T and a function from unwrapped value to T
 
7:13 PM
ah
 
T is a computation
 
and what does unit take?
 
Xeo
@CatPlusPlus There was my misunderstanding, I thought it took a function from unwrapped value to unwrapped value.
 
user142019
Simple example is the Maybe monad:

data Maybe a = Just a | Nothing -- think boost::optional

instance Monad Maybe where
    unit x = Just x

    bind (Just x) f = f x
    bind Nothing _ = Nothing
 
user142019
(I think. :P)
 
Xeo
7:14 PM
No wait
 
user142019
In Haskell, unit is called return and bind is called >>=.
 
Unit takes pure value (so unwrapped one)
 
hmmm
it's too abstract
 
Nah, it just can take a while to click
 
user142019
You need to work with them in order to understand them.
 
user142019
7:15 PM
It's like programming languages.
 
It's important to imagine monad as a computation
Unit and bind are building blocks for larger computations
 
but is a bind a computation too? (in itself)
and is that the same kind of bind like the boost::bind for example?
 
user142019
Another example is the I/O monad, where bind makes sure side-effects are performed in the correct order. (Is that right, anyone?)
 
@TonyTheLion Nah
 
ah
see, I thought they were related
I thought bind referred to binding function to args
 
7:17 PM
boost::bind is for partial application, completely unrelated
 
user142019
In the Maybe monad, bind returns Nothing if it is passed Nothing, or applies the passed function when given Just x for any x.
 
so it applies a given function to a given value
 
Ell
Hi guise
 
and returns a something or other
 
user142019
(Nothing >>= _) = Nothing
(Just x >>= f) = f x
 
7:19 PM
room topic changed to Lounge<C++>: A monad is just a monoid in the category of endofunctors, what's the problem? [c++] [c++11] [c++-faq] [no-helpdesk]
 
user142019
There is no category of endofunctors.
 
user142019
I think. :P
 
a monoid though
> a monoid is an algebraic structure with a single associative binary operation and an identity element.
 
user142019
There is no category of monoids either. :P
 
user142019
There are monoidal categories.
 
user142019
7:22 PM
No wait.
 
user142019
You may be right.
 
user142019
There is a category of magmas, I remember.
 
one does not simply understand monads
@Zoidberg magmas?
 
Xeo
Finally! /cc @MooingDuck, @CatPlusPlus, @Zoidberg
 
user142019
A magma has a set and a closed binary operation.
 
7:24 PM
@Zoidberg They're not set in stone
 
user142019
So say you have a magma of set M.
 
@Xeo woah
 
Xeo
Just so I could get rid of stupid Maybe<T>{} for Nothing.
 
user142019
Then the binary operation must be defined for every element of M and the return value must be an element of M.
 
@TonyTheLion Somehow reminds me of that Git joke.
 
Xeo
7:26 PM
@TonyTheLion That's one realization I think everyone has, when the encounter them.
 
@Xeo It must be the hardest thing I've ever tried to bend my mind around
I have yet to figure out why it's so damn hard
 
Xeo
Because it's so different? :P
 
user142019
I think monoids are specializations of magmas; every monoid is a magma.
 
user142019
Semigroups are also similar to monoids except they lack identity element.
 
@TonyTheLion You haven't seen arrows yet
 
7:28 PM
magma ^
 
That's lava
 
user142019
@CatPlusPlus not to be confused with arrows from category theory. :)
 
user142019
But they do require associativity, like monoids.
 
user142019
(But magma's don't.)
 
7:28 PM
Magma (from Greek μάγμα "mixture") is a mixture of molten or semi-molten rock, volatiles and solids that is found beneath the surface of the Earth, and is expected to exist on other terrestrial planets. Besides molten rock, magma may also contain suspended crystals and dissolved gas and sometimes also gas bubbles. Magma often collects in magma chambers that may feed a volcano or turn into a pluton. Magma is capable of intrusion into adjacent rocks, extrusion onto the surface as lava, and explosive ejection as tephra to form pyroclastic rock. Magma is a complex high-temperature fluid subs...
 
@TonyTheLion It's called lava when it gets to the surface
 
user142019
Magma is underground lava.
 
@CatPlusPlus details...
 
user142019
Lava is overground magma.
 
user142019
7:29 PM
Also, magma isn't related to magmas at all.
 
@Zoidberg I know, but it made me think of that
I'm surrounded by pedants!!
 
user142019
@TonyTheLion I know.
 
Xeo
Seriously, boost::none_t should've been a UDT.
Not a typedef for some member pointer type.
Would've made that thing a lot easier.
 
Ell
@TonyTheLion This lounge is nothing but pedants :'(
 
user142019
7:31 PM
boost::optional<boost::none_t> :|
 
@TonyTheLion And pedestrians.
 
user142019
Yeah Tony is chatting while sitting on the ground on Oxford Street.
 
Xeo
@Zoidberg Do not want.
 
user142019
lol
 
@StackedCrooked Get a favicon for Coliru eh
 
7:34 PM
@CatPlusPlus Yes, how 'bout your mom?
j/k
Coliru is my dirtiest project up until now and it turns out the be the one that people are actually using.
 
user142019
 
hey, my friend thinks nobody knows this string library bstring.sourceforge.net. How many of you know this library?
 
@Xeo You just programmed one!
 
Xeo
@MooingDuck I did not introduce a Maybe<Nothing>!
(I hope.)
 
@Xeo doesn't the std::true_type) overload only trigger if the function returns a Maybe<Nothing>?
 
user142019
7:37 PM
f :: Maybe (Maybe a)
f = Just Nothing -- :|
 
Xeo
That's specifically why I made that overload.
@MooingDuck If it returns Nothing.
 
@Xeo wait, I see it
 
Xeo
You can introduce your stupid Maybe<Nothing>, but I will not! I WILL NOT YIELD!
cough
Maybe I should head home.
And write some Haskell.
 
@Xeo if it has a Nothing return type the function isn't executed?
 
Xeo
I thought about writing a makefile generator with that.
 
7:38 PM
Damn... found out today that I'm probably gonna fly home on Thursday.
 
user142019
@Xeo :|
 
I think expression templates would be better anyway, so you can terminate the computation early when you encounter Nothing
 
hmmm
 
user142019
sup G
 
suddenly realized I have only 7 minutes until phone interview
 
Xeo
7:39 PM
@MooingDuck Why would it?
 
user142019
@DeadMG Sounds fun.
 
Xeo
@CatPlusPlus Optimization issue~
 
@Xeo In case it has side effects?
 
@Xeo Yeah
 
Xeo
@MooingDuck AHAHAHA
 
7:39 PM
@MooingDuck The point is to not have them
 
Xeo
Sorry, but we're talking functional here.
 
user142019
I love MaybeT IO + safe package.
 
Nothing executes after Nothing
 
@DeadMG jack off
 
Xeo
@MooingDuck What side-effects?
:3
 
7:40 PM
@Xeo I'm at work, not paying enough attention to your code
 
Xeo
Functional beats Psyduck.
 
user142019
liftIO is wonderful.
 
Xeo
Is there a Pokemon based on functional paradigm?
With "function" in its name?
 
user142019
Unlikely.
 
@StackedCrooked Nah, I was never a fast wanker.
 
7:41 PM
Ah. Too bad
 
user142019
 
Xeo
room topic changed to Lounge<C++>: Get information that you never wanted! [c++] [c++11] [c++-faq] [no-helpdesk]
 
so apparently our software uses _bstr_t to switch between utf16 and utf8 encodings. Hint: _bstr_t knows nothing of utf8. :(
 
you already brought this up
 
7:43 PM
I'm still replacing all teh code
 
142 pounds to replace my laptop fan :|
 
user142019
@EtiennedeMartel oh cool.
 
@TonyTheLion as an American, that statement is very confusing.
 
@MooingDuck pounds sterling
 
@MooingDuck It's a very heavy laptop
 
user142019
7:43 PM
@TonyTheLion eat more fat so you gain pounds!
 
@TonyTheLion fanatical
 
222.49 USD that is
 
user142019
A "pond" in Dutch is 0.5 kg.
 
That's a lot for a fan
 
you guise
 
7:44 PM
Must be your biggest fan ever
 
user142019
Metric pounds ftw.
 
Ell
I need to write a djangoo app
 
Have fun
 
user142019
No you don't.
 
Django is easy
 
Xeo
7:45 PM
Alright, see ya tomorrow.
 
Anyway, @TonyTheLion, implementing some monads is a nice way to get the feel of how the entire thing works
 
If anyone has inspiration for a Coliru icon, feel free to contribute.
 
user142019
I had problems with migrating schemas in Django.
 
user142019
Oh well.
 
user142019
Webdev sucks anyway.
 
7:46 PM
@Zoidberg Use South
 
user142019
@CatPlusPlus Might give it a try, actually.
 
user142019
I have always liked Python.
 
Ell
I don't know where to start with a web app o.O
 
user142019
By knowing what you want it to do.
 
Ell
I do know :D
 
user142019
7:48 PM
And then designing it.
 
user142019
And then implementing it.
 
Ahahaha designing
 
user142019
And redesign when you feel like it.
 
Ell
I can't do design :O
and I don't know python, much
 
user142019
It doesn't have to look pwetty or whatever.
 
user142019
7:49 PM
As long as you know what you want to put where on which page.
 
Ell
yeah
 
Marvel at my art skills
 
@StackedCrooked POO, PILE OF?
 
Image not found.
 
user142019
 
7:50 PM
@Zoidberg I kind of like that.
 
:<
No originality
 
user142019
:>
 
Ell
Can anyone recommend the best way to keep portions of pdf files? I'm going to be extracting specific paragraphs from a bunch of pdfs, not sure how to display them on the internet.
Just as an image? svg?
 
user142019
@Ell if you want to extract text save it as text.
 
Ell
@Zoidberg sorry, It's not just text, it's diagrams too
 
user142019
7:51 PM
Save text as text and diagrams as SVGs.
 
user142019
Also PDF is terrible to read from.
 
user142019
They are to be read by humans (and me).
 
Ell
why?
It will be read by humans onl
 
user142019
@Ell AFAIK there is no semantical structure other than TOC.
 
Ell
My web app is a bunch of exam questions, all tagged :3
and that's it really :L
also, @Zoidberg I'm at least remotely kind to you :'(
 
user142019
7:54 PM
True. :P
 
Ell
:D
 
But only remotely
 
user142019
 
@Zoidberg did you get a lumia 920 btw?
 
user142019
Cool, one-edged 3D object.
 
user142019
7:55 PM
@bamboon nah.
 
user142019
I have a Nokia C3 and I'm happy with it.
 
user142019
I can use it to call, send SMS and listen MP3.
 
it just dawned on me: find SO questions who's answers are wrong, and then add that wording to homework assignments.
 
Ell
klein
 
> We don't agree with it (homosexuality), and it's offensive to us," she said. "Homosexual students come to me with their problems, and I don't agree with them, but I care about them. It's the same thing with my special needs kids. I think God puts everyone in our lives for a reason.
That's fucking irresponsible.
 
7:58 PM
@MooingDuck lol
 
user142019
Chat y u no MathJax.
 
> "We want to make the public see that we love the homosexuals, but we don't think it's right nor should it be accepted," a student told WTWO.
 
@CatPlusPlus Done.
 

« first day (849 days earlier)      last day (4099 days later) »