Christoph Berg: Disclaimer
Still my favourite l.d.o posting:
Re: plain language disclaimer.
wouter@country:~$ countmail ZERO! ZERO MAIL MESSAGES! HAHAHAHAHA! wouter@country:~$Unfortunately, all is not what it seems. Apparently countmail doesn't support Maildir.
text/html; epiphany-browser '%s'; description=HTML Text; nametemplate=%s.html
This should work fine, but the problem is that mutt creates a temporary file (/tmp/mutt.html) and removes it when the command terminates, which is nearly immediately with epiphany. And epiphany has a really nice feature: it monitors local files for changes and reload them when they change. Which results in seeing the page briefly, then a File "/tmp/mutt.html" not found. error page.
Anyone using mutt and epiphany together successfully?
clamav:
Installed: 0.91.1-1~volatile1
Candidate: 0.91.2-0volatile1
Version table:
0.91.2-1 0
600 http://sunsite.cnlab-switch.ch unstable/main Packages
0.91.2-1~volatile1 0
750 http://mirror.switch.ch etch/volatile/main Packages
0.91.2-0volatile1 0
800 http://mirror.switch.ch sarge/volatile/main Packages
0.91.1-1 0
700 http://sunsite.cnlab-switch.ch lenny/main Packages
*** 0.91.1-1~volatile1 0
100 /var/lib/dpkg/status
0.91.1-1~bpo.2 0
740 http://www.backports.org etch-backports/main Packages
0.91.1-1~bpo.1 0
200 http://www.backports.org sarge-backports/main Packages
0.90.1-3.1lenny3 0
700 http://security.debian.org lenny/updates/main Packages
0.90.1-3etch4 0
750 http://security.debian.org etch/updates/main Packages
0.90.1-3etch2 0
750 http://sunsite.cnlab-switch.ch etch/main Packages
0.84-2.sarge.17 0
800 http://security.debian.org sarge/updates/main Packages
0.84-2.sarge.15 0
800 http://sunsite.cnlab-switch.ch sarge/main Packages
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#define SIZE (1500 * 1024 * 1024)
int fn(int *buf)
int i;
for(i=0; i < (SIZE/sizeof(int)); i+=1)
buf[i] = i;
return 0;
int main(void)
int *buf = malloc(SIZE);
assert(buf);
return fn(buf);
Non-optimised
nop.m 0x0
r14=0 mov r14=r0
save the "loop counter" mov.i r2=ar.lc
nop.m 0x0
one less than iterations movl r15=0x176fffff;;
nop.m 0x0
initalise loop counter mov.i ar.lc=r15
nop.i 0x0;;
loop:
*buf = i, buf++ st4 [r32]=r14,4
i++ adds r14=1,r14
dec lc, branch if > 0 br.cloop.sptk.few .loop
nop.m 0x0
restore loop counter mov.i ar.lc=r2
|
Loop unrolled
nop.m 0x0
r26 = 0 mov r26=r0
save lc mov.i r2=ar.lc
nop.m 0x0
iter / 32 movl r14=0x2edffff;;
nop.m 0x0
setup loop counter mov.i ar.lc=r14
nop.i 0x0
loop:
r3 = buf mov r3=r32
r8 = 1 adds r8=1,r26
r25 = 3 adds r25=3,r26
r23 = buf[3] adds r23=12,r32
r24 = 4 adds r24=4,r26
r22 = buf[4] adds r22=16,r32;;
buf[0] = 0; r3=buf+1 st4 [r3]=r26,4
r21 = 5 adds r21=5,r26
r19 = buf[5] adds r19=20,r32
r20 = 6 adds r20=6,r26
r18 = buf[6] adds r18=24,r32
r16 = 7 adds r16=7,r26;;
nop.m 0x0
buf[1] = 1, r3=buf+2 st4 [r3]=r8,4
r15 = buf[7] adds r15=28,r32
r17 = 2 adds r17=1,r8
r26 += 8 adds r26=8,r26
buf += 8 (for next iter) adds r32=32,r32;;
buf[2] = 2 st4 [r3]=r17
buf[3] = 3 st4 [r23]=r25
nop.i 0x0
buf[4] = 4 st4 [r22]=r24
buf[5] = 5 st4 [r19]=r21
nop.i 0x0
buf[6] = 6 st4 [r18]=r20
buf[7] = 7 st4 [r15]=r16
loop, dec branch br.cloop.sptk.few .loop
nop.m 0x0
restore lc mov.i ar.lc=r2
br.ret.sptk.many b0;;
|
$ time ./loop real 0m1.209s user 0m0.388s sys 0m0.820s $ timme ./loop-unroll real 0m1.056s user 0m0.244s sys 0m0.812s
$ pfmon -e cpu_cycles,ia64_inst_retired_this,nops_retired,back_end_bubble_all ./loop
547923609 CPU_CYCLES
1179995250 IA64_INST_RETIRED_THIS
104431 NOPS_RETIRED
154285534 BACK_END_BUBBLE_ALL
$ pfmon -e cpu_cycles,ia64_inst_retired_this,nops_retired,back_end_bubble_all ./loop-unroll
311570590 CPU_CYCLES
1327451286 IA64_INST_RETIRED_THIS
147560435 NOPS_RETIRED
16088889 BACK_END_BUBBLE_ALL
| Test | Useful instructions/cycle |
|---|---|
| loop | 1179995250 - 104431 / 547923609 = 2.15 |
| unroll | 1327451286 - 147560435 / 311570590 = 3.78 |
$ pfmon -e be_l1d_fpu_bubble_all,be_exe_bubble_all,be_RSE_bubble_all,Back_end_bubble_fe ./loop
14229581 BE_L1D_FPU_BUBBLE_ALL
97669 BE_EXE_BUBBLE_ALL
1260 BE_RSE_BUBBLE_ALL
131354866 BACK_END_BUBBLE_FE
$ pfmon -e be_l1d_fpu_bubble_all,be_exe_bubble_all,be_RSE_bubble_all,Back_end_bubble_fe ./loop-unroll
22676169 BE_L1D_FPU_BUBBLE_ALL
83064 BE_EXE_BUBBLE_ALL
1263 BE_RSE_BUBBLE_ALL
718850 BACK_END_BUBBLE_FE
$ pfmon -e fe_bubble_imiss,fe_bubble_tlbmiss,fe_bubble_branch,fe_bubble_bubble ./loop
27727 FE_BUBBLE_IMISS
4910 FE_BUBBLE_TLBMISS
98094189 FE_BUBBLE_BRANCH
52615907 FE_BUBBLE_BUBBLE
$ pfmon -e fe_bubble_imiss,fe_bubble_tlbmiss,fe_bubble_branch,fe_bubble_bubble ./loop-unroll
780729 FE_BUBBLE_IMISS
4858 FE_BUBBLE_TLBMISS
291620 FE_BUBBLE_BRANCH
111089 FE_BUBBLE_BUBBLE
$ pfmon -e be_exe_bubble_grall,be_exe_bubble_grgr ./loop 79601 BE_EXE_BUBBLE_GRALL 919 BE_EXE_BUBBLE_GRGR $ pfmon -e be_exe_bubble_grall,be_exe_bubble_grgr ./loop-unroll 76627 BE_EXE_BUBBLE_GRALL 918 BE_EXE_BUBBLE_GRGR
$ pfmon -e be_l1d_fpu_bubble_l1d,be_l1d_fpu_bubble_l1d_dcurecir,\
be_l1d_fpu_bubble_l1d_tlb,be_l1d_fpu_bubble_l1d_stbufrecir ./loop-unroll
9623193 BE_L1D_FPU_BUBBLE_L1D_DCURECIR
414 BE_L1D_FPU_BUBBLE_L1D_TLB
282 BE_L1D_FPU_BUBBLE_L1D_STBUFRECIR
$ pfmon -e be_l1d_fpu_bubble_l1d_fullstbuf,\
be_l1d_fpu_bubble_l1d_l2bpress,be_l1d_fpu_bubble_l1d_tlb ./loop-unroll
23 BE_L1D_FPU_BUBBLE_L1D_FULLSTBUF
17220177 BE_L1D_FPU_BUBBLE_L1D_L2BPRESS
425 BE_L1D_FPU_BUBBLE_L1D_TLB
Yes, it’s true, you can’t actually board that bus (the only way to get to Tahoe after my brother’s plane arrives), unless you’ve at least set foot on a train first.
Some research suggests that California State Law prohibits Amtrak from offering bus-only services within the state, apparently so it won’t compete with bus companies.
I did figure out what I hope is a clever workaround: the next closest train stop on one of the lines to Sacramento is Davis. Amtrak allows you to buy a ticket from Davis to Truckee via Sacramento for basically the same price as the bus from Truckee to Sacramento. Hopefully no one will check to make sure he actually traveled from Davis to Sacramento before getting on the bus to Truckee.
There must be some profound lesson here. I would love to have been a fly on the wall during the floor debate in the state legislature when this law was enacted.
$config 'crossbase' = $crossbase;
$config 'crossprefix' = $crossprefix;
$config 'crossdir' = $crossdir;
$config 'crossbin' = $crossbin;
$config 'crosslib' = $crosslib;
$config 'crosslib64' = $crosslib64;
$config 'crossinc' = $crossinc;
$config 'crossroot' = $crossroot;
$conffile = "/etc/dpkg-cross/cross-compile";
my $home = File::HomeDir->my_home;
$private_conffile = "$ home /.dpkg-cross/cross-compile";
/etc/dpkg-cross/cross-config.common obsolete
/etc/dpkg-cross/cross-config.gnu obsolete
/etc/dpkg-cross/cross-config.linux obsolete
/etc/dpkg-cross/cross-config.w32 obsolete
/etc/dpkg-cross/crosstools obsolete
#!/usr/bin/perl -l
use warnings;
use strict;
use Config::Simple;
use Linux::Inotify2;
use Email::Abstract;
use Net::XMPP; # aka Jabber and Gtalk
use POSIX;
my $DEBUG = 0;
our %config;
Config::Simple->import_from("$ENV HOME /.mailnotifyrc", %config);
deamonize() unless $DEBUG;
my $inotify = new Linux::Inotify2
or die "Unable to create new inotify object: $!";
# Different Maildir implementations triggers different events"
# IN_MOVED_TO: rename("tmp/file","new/file")
# IN_CREATE: link("tmp/file", "new/file") && unlink("tmp/file")
#
# At this point the file should be written and closed.
$inotify->watch("$config Maildir /new", IN_MOVED_TO IN_CREATE, sub
my $e = shift;
my ($fh, $xmpp, $email, $message);
debug('Got event for ' . $e->fullname);
open $fh, "<", $e->fullname;
$email = new Email::Abstract join("", <$fh>);
close $fh;
$message = 'Mail from ' . $email->get_header('From') .
' concerning "' . $email->get_header('Subject') .'"';
debug("Getting ready to send [$message]");
my $sender = new Net::XMPP::JID ($config Sender );
my $receiver = new Net::XMPP::JID ($config Receiver );
$xmpp = new Net::XMPP::Client();
$xmpp->Connect( hostname => $sender->GetServer,
port => $config port 5222,
tls => $config usetls 0,
);
$xmpp->AuthSend( username => $sender->GetUserID,
password => $config password ,
resource => $sender->GetResource 'mailnotify',
);
$xmpp->MessageSend( to => $receiver,
type => $config MessageType 'chat',
body => $message,
);
$xmpp->Process(1);
$xmpp->Disconnect;
debug("Event done");
);
1 while $inotify->poll;
sub deamonize
my $pid = fork();
if ($pid)
exit 0;
### close all input/output and separate
### from the parent process group
open STDIN, '</dev/null' or die "Can't open STDIN from /dev/null: [$!]n";
open STDOUT, '>/dev/null' or die "Can't open STDOUT to /dev/null: [$!]n";
open STDERR, '>&STDOUT' or die "Can't open STDERR to STDOUT: [$!]n";
### Change to root dir to avoid locking a mounted file system
### does this mean to be chroot ?
chdir '/' or die "Can't chdir to \"/\": [$!]";
### Turn process into session leader, and ensure no controlling terminal
POSIX::setsid();
sub debug return unless $DEBUG; print STDERR for @_;
__END__
Next.