I know I rarely post about sports anymore, but I feel it necessary to throw in a shout out to the Cubs. With the Mets out of it, there’s no reason we can’t zero out a few more numbers…
AC 00 61 98. Eamus Catuli.
I know I rarely post about sports anymore, but I feel it necessary to throw in a shout out to the Cubs. With the Mets out of it, there’s no reason we can’t zero out a few more numbers…
AC 00 61 98. Eamus Catuli.
When I’m bored, I sometimes play a game on xkcd.
You just keep clicking random.
You win if you get one that you’ve already seen in the same session.
You lose if you get one that’s not funny.
I like it because I always win.
however, this does work:
#include <iostream> template<int size> struct ptrsize { }; template<> struct ptrsize<4> { typedef int int_t; typedef unsigned int uint_t; }; template<> struct ptrsize<8> { typedef long long int_t; typedef unsigned long long uint_t; }; typedef ptrsize<sizeof(void*)>::int_t ptrint_t; typedef ptrsize<sizeof(void*)>::uint_t ptruint_t; int main(int ac, char **av) { ptrint_t i = 5; std::cout << i << ", " << sizeof(i) << std::endl; return 0; }
Phil Wilson and Hugh Winkler discuss the pitfalls and potential solutions to using someone else’s 269 feed personal aggregator in their subscription list.
If you look carefully, you’ll notice they mentioned this last week. That’s because when I hit Phil’s post in greader, I had 651 unread messages in PI…. down from “1000+” last friday
Whenever there is a coordination problem, someone says, ‘Hey, let’s create a process.’ Now you have two coordination problems.
# octects
oct1=`echo $subnet | awk -F . ‘{print $1}’`
oct2=`echo $subnet | awk -F . ‘{print $2}’`
oct3=`echo $subnet | awk -F . ‘{print $3}’`
oct4=`echo $subnet | awk -F . ‘{print $4}’`Later, when reviewing my script, Anonymous Coward offered this little gem:
$ set `echo 10.20.30.40 | tr ‘.’ ‘ ‘`
Ok, that’s a reduction from 12 forks and 8 execs to 3 forks and 2 execs.
but you can do it with zero:
IFS=. set 10.20.30.40
Gabby was great. Rebecca was great. Theo was great. I got a phone call at work from Rebecca, that she was at the ER and Theo was at the downstairs neighbor’s. Other than a slight possibility of a lack of fingernail, there should be no long term damage.
Still, stressful on everybody, especially when you add it all up.
And in reality, most of the afternoon the picture has been more like this.
WSGI. I don’t want an apache replacement, or at least have to bootstrap one just to write a webapp. I’d much rather have something very simple and callback based to handle requests and output dynamic data (and push static data through something else. No offense to erlang on that score but …)
for(Max, Max, F) -gt; [F(Max)];
for(I, Max, F) -gt; [F(I)|for(I+1, Max, F)].
My I suggest instead either:
lists:each(lists:seq(Min, Max), F).
or:
for(I, Max, F) when I <= Max ->
for_impl(I, Max, F, []).
for_impl(Max, Max, F, Acc) ->
lists:reverse(Acc);
for_impl(I, Max, F, Acc) ->
for_impl(I+1, Max, F, [F(I)|Acc].
The original version of this code will blow out the stack with non-trivial length loops.