September 21, 2007 – 12:50 pm
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 […]
September 19, 2007 – 9:10 am
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 […]
August 22, 2007 – 8:20 pm
Dannyman sez:
# 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 […]
August 13, 2007 – 3:05 pm
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 loops in Erlang:
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 […]
Regarding all the recent hubbub over 7/7/7, I just thought I’d complain that I lived in (847) on 7/7/3 and (773) on 8/4/7. Dangit. This after I missed my planned party on Sep 8th 2001. Being a numbers geek isn’t as easy as it used to be.
At this point I think it’s time I outsourced most of my del.icio.us feed to Simon Willison…
(Update: Simon’s last name corrected per comments, sorry.)
I’ve started using it at work. So far, it’s pretty fantastic.
More to come in the next couple of days.
Ian Bicking rants about how worthless they are so I don’t have to.
Look, HTML is a much more approachable standard than python code. You have to write HTML to make your site work. Why would you try to move more HTML into python? HTML generation in python sucks — implicitly or explicitly.
James Robinson mentions his first-gen Tivo has the wrong timezone — fortunately it seems that Tivo was smart enough to send show times in epoch time instead of local time so recordings still work.
My DirecTivo had similar problems, but they were compounded by the fact that the thing hadn’t dialed in in 2.51 years. […]