Tuesday, December 25, 2012

Fish, etc!

This fisherman's blog: http://blog.goo.ne.jp/heiun is rather interesting. It's an advert for the fishers, but still enjoyable.

Saturday, December 22, 2012

Three groups that you've never heard

Have you ever been listening to random CDs and have some things just come and mesh together? Try these:
The Free Design -- Kites are Fun
Sweet Trip -- You will never know why
Spiritualized -- Ladies and Gentlemen We Are Floating in Space

I hear "The Free Design" in Stereolab and Koop. Excellent, it is all excellent music.

Wednesday, December 19, 2012

People are crazy.

Remember law school? I do not. I do remember my classes on US constitutionality.

I have never heard a good argument against weapons. I mainly believe that it is a question of personal responsibility. I have the ability to make explosives, but I chose not too. I have the ability to make nerve gas, but I chose not to. I just do not believe that a few murderous outliers represent the American populous as whole.
I had to dig in the back of my closet for my essay on this, but I found it. Marguerite Anne Bowers was killed with a blade by Thomas Vanda who was a "schizophrenic in remission". A subset of the ruling follows:

Bowers v. Devito
UNITED STATES COURT OF APPEALS FOR THE SEVENTH CIRCUIT

But there is no constitutional right to be protected by the state against being murdered by criminals or madmen. It is monstrous if the state fails to protect its residents against such predators but it does not violate the due process clause of the Fourteenth Amendment or, we suppose, any other provision of the Constitution. The Constitution is a charter of negative liberties; it tells the state to let people alone; it does not require the federal government or the state to provide services, even so elementary a service as maintaining law and order. Discrimination in providing protection against private violence could of course violate the equal protection clause of the Fourteenth Amendment. But that is not alleged here. All that is alleged is a failure to protect Miss Bowers and others like her from a dangerous madman, and as the State of Illinois has no federal constitutional duty to provide such protection its failure to do so is not actionable under section 1983.

In summary, Americans are required to protect themselves because the US government is not required to do so.
I believe that you cannot take the behavior of crazy individuals to account, because they are crazy. If someone hits a school bus while drunk, should we ban all cars? How about kitchen knives?
If one is feeling criminal, by definition, they will not follow the law. I'm just glad that most crazy people are not well enough to get interested in chemistry.

Tuesday, December 18, 2012

GDB 7.1 doesn't compile!

In order to get the armsupp.c file to compile in gdb-7.1, I had to make the return actually return something. Just a note for those of you who use arm-elf-gdb on macports, it will not compile out of the box. I've included the function in question, the change needs to be at the "here" note.
/* This function does the Busy-Waiting for an MRC instruction.  */

ARMword
ARMul_MRC (ARMul_State * state, ARMword instr)
{
  unsigned cpab;
  ARMword result = 0;

  if (! CP_ACCESS_ALLOWED (state, CPNum))
    {
      ARMul_UndefInstr (state, instr);
      return(0); // <-- here
    }

  cpab = (state->MRC[CPNum]) (state, ARMul_FIRST, instr, &result);
  while (cpab == ARMul_BUSY)
    {
      ARMul_Icycles (state, 1, 0);
      if (IntPending (state))
 {
   cpab = (state->MRC[CPNum]) (state, ARMul_INTERRUPT, instr, 0);
   return (0);
 }
      else
 cpab = (state->MRC[CPNum]) (state, ARMul_BUSY, instr, &result);
    }
  if (cpab == ARMul_CANT)
    {
      ARMul_Abort (state, ARMul_UndefinedInstrV);
      /* Parent will destroy the flags otherwise.  */
      result = ECC;
    }
  else
    {
      BUSUSEDINCPCN;
      ARMul_Ccycles (state, 1, 0);
      ARMul_Icycles (state, 1, 0);
    }

  return result;
}

Sunday, December 16, 2012

Matlab does not print whole numbers!

Actually, it does, but it decides what is an "integer". For example:
sprintf('%i',dac_start(4))
This returned 3.317660e+004 even though I told Matlab to print with %i. The solution is to round the number, resulting:
sprintf('%i',round(dac_start(4)))
ans =
33177
Until I realized that my number 33176.6, I was going batty. round() solved the problem.

Saturday, December 8, 2012

macports php5 iconv

I was surprised to find that on macports, php5 does not have iconv included by default.
To get started, I removed all of the versions of PHP that I had, and then did:

sudo port install php5 +apache2 +mysql5 +pear +postgresql +pear php5-curl php5-gd php5-iconv php5-imagick php5-imap php5-mbstring php5-mcrypt php5-mysql php5-pcntl php5-posix php5-soap php5-sockets php5-sqlite php5-xmlrpc php5-xsl php53-apache2handler

After doing that, I still didn't have iconv loading even though apache was loading php. I had to update php.ini with the extensions explicitly. I had to also specify the path:
extension=/opt/local/lib/php/extensions/no-debug-non-zts-20090626/iconv.so

(remember to check phpinfo(); to see which php.ini file is being used!)

Thursday, December 6, 2012

wheretobreakaword

You have to be careful in English of where you break a domain name:
http://www.hawaiinewsnow.com/ Hawaii New Snow or Hawaii News Now?
This consignment store:
http://kidsexchange.net/
...might not have thought their domain name through.

Sunday, December 2, 2012

In this article, the following is stated:
The line of code seems basic, even for BASIC. There aren’t any variables. It uses a GOTO instead of a more elegant loop.  How could something so short and simple generate such a complex result? What can this one line—“10 PRINT,” to use the authors’ shorthand—teach us about software, and culture at large?

I find Computer Scientists to be a fickle bunch because they are told that they are mathematicians; however, they fancy themselves as artists. The line "It uses a GOTO instead of a more elegant loop" is an excellent example of how removed most people are from hardware. A "while()" is just conditional branches, which are just "GOTO".
The x86 assembly for:
void main()
{
   while(1){;;}
}
results in:
_main:
Leh_func_begin1:
        pushq   %rbp
Ltmp0:
        movq    %rsp, %rbp
Ltmp1:
LBB1_1:
        jmp     LBB1_1      //<--jmp is a GOTO
Leh_func_end1:
...which just proves that hardware is "inelegant". I would say that it is very efficient with a single instruction jump, and simplicity is elegant.

24 hour party people

As a huge fan of music, I have a lot of respect for Factory Records and Tony Wilson (RIP). I finally got around to watching 24 Hour Party People. If you are music fan, it's a must-see.

While on the topic of music, Human Traffic is a fine movie based on music and counter culture as well. Stick to the UK version. You too can have Mr. Floppy:

...for just under 13 quid.

Saturday, December 1, 2012

一角獣?

North Korea has found the tomb of the Unicorns. Just remember, it is not the news unless it is the official news, even if it has unicorns.