Jon Stewart on 16 Oct 2003 04:35:07 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [hosers-talk] ode to de morgan and his law


> Thus spake "Jon Stewart":
> > Man, I wish there were a discipline still backwards enough that I could 
> > get some ass-simple "law" named after me and taught in every high school 
> > logic class a 130+ years after I died.
> 
> Classical logic did not exist during De Morgan's lifetime. His name was 
> applied posthumously to the eponymous laws due to their similarity with 
> something he did in abstract algebra.


Well, sure, formalized classical logic did not exist during De Morgan's
lifetime (hence "backwards"), and his contributions to mathematics and
logic, his texts, his clarification of induction, certainly merit a law.

Nevertheless, it is an ass-simple law.

Btw, you haven't lived until you've played around with lambda functions in 
C++. E.g.:

#include <iostream>
#include <vector>
#include <iterator>
#include <algorithm>

#include <boost/lambda/lambda.hpp>

using namespace boost::lambda;
using namespace std;

template<class FnT>
class Converter {
public:
	Converter(FnT& f) : fn(f) {}
	operator int() const { return fn(); }

private:
	FnT& fn;
};

template<class FnT>
auto_ptr< Converter<FnT> > MakeConverter(FnT& f)
{
	auto_ptr< Converter<FnT> > ptr(new Converter<FnT>(f));
	return ptr;
}

int main(int argc, char *argv[])
{
	vector<int> vec;
	int i(0);
	fill_n(back_inserter(vec), 20, *MakeConverter(var(i)++));
	for_each(vec.begin(), vec.end(), cout << _1 << '\n');

	return EXIT_SUCCESS;
}

It's cool shit.

Here's a quote:

	Disbelief in the Devil is a French idea.

			-- Fyodor Dostoevsky


Fucking Cubs.



Jon
-- 
Jon Stewart                                 Advanced Los Angeles C++
stew1@xxxxxxxxxxx                           http://www.alacpp.org
_______________________________________________
hosers-talk mailing list
hosers-talk@xxxxxxxxxxx
http://lists.ellipsis.cx/mailman/listinfo/hosers-talk