Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×

Comment Re: Heating the metal to erase (Score 2) 133

Maybe not in Europe, but here in the US reloading casings is a thing. http://www.wikihow.com/Reload-... You do need to buy the right equipment though and these days it probably does get you put on lists on either side of the pond.

Casting bullets isn't the preferred way to make them (since these days people want jacketed bullets hollow points etc) but melting lead and casting them from molds is trivial.

Comment Re:I already solved this (Score 1) 389

Politics aside, the biggest problem with this is going to be the housing. Those "low end" apartments almost certainly didn't spring into existence at $0.96/sqft, but upgrading the 600,000 people from soggy cardboard is going to require a lot of new construction, and people building new things are going to want money for that wood, brick and property, even if the entire structure is built with robots. Terrafoam to the rescue, I guess.

That said, if you're willing to not own a lot of stuff or have a bedroom, it looks like 242sqft is plenty of space. It's probably pretty standard in Tokyo too.

Comment Re:Moving to a future where you pay for freedom (Score 1) 111

you pay - either in money or time or experience - for more freedom. Either freedom of privacy

Or you pay for the illusion of privacy, such as getting AT&T with the death star's ever watchful eye on your traffic plus ads for $70 or for only $30 more you can turn off the ads but not turn off the traffic monitoring.

Comment Re:GOTO is a crutch for bad programmers (Score 1) 677

This compiles in my head (it's been a looooong time since I last touched C) and uses three allocations and several places that can fail.

/* Write no more than 1024 bytes to a new file.txt */
if (-1 != (dest = creat("file.txt", S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP))) {
  if (-1 != (src = open("source.txt"))) {
    if (NULL != (buf = calloc(1024, 1))) {
      if (-1 != (rd = read(src, buf, 1024))) { /* should reading zero bytes be an error? */
        total_written = 0;
        buf_p = buf;
        break_loop = 0; /* because break is just another name for goto */
        while (total_written < rd && !break_loop) {
          if (-1 != (wr = write(dest, buf_p, rd-total_written))) {
            total_written += wr;
            buf_p += wr;
          } else {
            break_loop = 1; /* TODO check errno for fixable errors like EAGAIN or EINTR */
            perror("Error writing to file");
          }
        }
      } else {
        perror("Read failed");
      }
      free(buf);
    } else {
      perror("Memory allocation error");
    }
    close(src);
  } else {
    perror("Unable to open source.txt");
  }
  close(dest);
} else {
  perror("Unable to create file.txt");
}

Feel free to bash and/or offer constructive criticism. There's probably some official order to how things should be allocated but I don't know what it is. Maybe memory and sourcefile should have come first to minimize filesystem impact. First thought is that the loop in the middle could be moved to a function to move x bytes from file a to file b using buffer c which relies on x a b c correctness instead of testing it.

Comment Re:Don't forget (Score 1) 330

I house-sat for my sister once years ago, and she had an AV receiver that was hooked up to a DVD player. Once I got bored watching DVDs I tried hooking up my playstation but couldn't get any sound. It took me several hours to accidentally realize that the genius who created it thought it would be a great idea to have completely independent audio and video inputs so even after selecting Video 2, the DVD audio (which was off) was still coming out the speakers.

Comment Re:Fuck beta? (Score 1) 327

I don't know on beta, but on non beta, you go to your preferences (the gear next to the post anonymously checkbox) and choose "Plain Old Text" for your "Comment Post Mode". This gives you the bastard child that is forum style posting, where you can write HTML if you feel like it or you can write whatever and as long as it doesn't look like HTML it will just work but as soon as you want to write < you better break out your html entities guide.

Also remember, two enters is a paragraph.

Slashdot Top Deals

You knew the job was dangerous when you took it, Fred. -- Superchicken

Working...