Assisti esses dias Capitalismo: uma história de amor do Michael Moore (que, aliás, recomendo muito) e um momento do filme me chamou especial atenção:

O Dr. Jonas Salk passou todo seu tempo pondo rins de macaco num liquidificador tentando achar a cura para a pólio. Quando conseguiu, ele decidiu fornecê-la de graça. Esse homem podia ter sido muito rico se tivesse vendido sua vacina a uma empresa farmacêutica, mas ele achava que seu talento deveria ser usado para o bem comum e o salário que ele ganhava como médico e professor era suficiente para ele ter uma vida confortável.

— Quem possui a patente desta vacina?
— Bem… eu diria que o povo. Não há patente. Você patentearia o Sol?

É… Longe se vai a época do Dr. Salk, pois hoje nossas melhores mentes são empregadas em outra coisa. Para onde enviamos os melhores em matemática e ciências?

 

Este post possui intencionalmente apenas imagens e códigos.

Uso do programa que gera triângulo de Pascal mod m

mod 2

Pascal's Triangle mod 2

mod 3

Pascal's Triangle mod 3

mod 5

Pascal's Triangle mod 5

mod 7

Pascal's Triangle mod 7

mod 12

Pascal's Triangle mod 12

mod 23

Pascal's Triangle mod 23

Código-fonte (com alguns bugs inofensivos — procure XXX)

/* pascal -- generate colored Pascal's triangles in XPM format
 
   Copyright (C) 2011 Tiago Madeira <madeira@ime.usp.br>
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 3, or (at your option)
   any later version.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.
 
   You can read a copy of the GNU General Public License at
   http://www.gnu.org/licenses/gpl-3.0.txt */
 
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <getopt.h>
#include <math.h>
 
#define DEFMOD 2
#define DEFSIZE 300
#define DEFPADDING 8
 
int mod = DEFMOD;
int size = DEFSIZE;
int padding = DEFPADDING;
 
char makecolors[6][4] = {
	"001", "010", "100", "110", "101", "001"
};
 
struct option longopts[] = {
	{"help", 0, 0, 'h'},
	{"padding", 1, 0, 'p'},
	{"size", 1, 0, 's'},
	{"mod", 1, 0, 'm'},
	{0, 0, 0, 0}
};
 
char *program_name;
 
void try_help() {
	fprintf(stderr, "Try `%s --help' for more information.\n", program_name);
}
 
void help() {
	printf("Usage: %s [OPTION]... [FILE]\n", program_name);
	printf("Generate colored Pascal's triangles (XPM format).\n\n");
	printf("Mandatory arguments to long options are mandatory for short options too.\n\n");
	printf("  -h, --help        print this help\n");
	printf("  -m, --mod=M       paint with different colors numbers mod M\n");
	printf("  -p, --padding=SZ  image padding (margin) in pixels\n\n");
	printf("  -s, --size=SZ     generate SZ lines of Pascal's triangle\n\n");
	printf("With no FILE, or when FILE is -, write to standard output.\n\n");
	printf("Report bugs to <madeira@ime.usp.br>.\n");
}
 
int baselog(int n, int base) {
	return ceil(log(n) / log(base));
}
 
void *xmalloc(size_t size) {
	void *x = malloc(size);
	if (x == NULL) {
		fprintf(stderr, "There is no enough memory to allocate.\n");
		exit(3);
	}
	return x;
}
 
int main(int argc, char **argv) {
	int optc, tofile;
	int i, j;
	int width, height, chars;
	char **color, rgb[7];
	int one, pos;
	int *pascal;
	char *line;
 
	program_name = argv[0];
	while ((optc = getopt_long(argc, argv, "hm:p:s:", longopts, (int *)0)) != -1) {
		switch (optc) {
		case 'h':
			help();
			return 0;
		case 'm':
			mod = atoi(optarg);
			if (mod > 48) { /* XXX */
				fprintf(stderr, "At the moment, this program supports only mod <= 48 (color generation limit).\n");
				return 4;
			}
			if (mod > 26) { /* XXX */
				fprintf(stderr, "At the moment, this program supports only mod <= 26 (bad implementation limit).\n");
				return 5;
			}
			break;
		case 'p':
			padding = atoi(optarg);
			break;
		case 's':
			size = atoi(optarg);
			break;
		default:
			try_help();
			return 1;
		}
	}
	if (optind < argc && strcmp("-", argv[optind])) {
		if (freopen(argv[optind], "w", stdout) == NULL) {
			fprintf(stderr, "Can't open `%s' for writing.\n", argv[optind]);
			return 2;
		}
		tofile = 1;
	} else {
		tofile = 0;
	}
 
	printf("static char *a_xpm[] = {\n");
	width = size * 2 + padding * 2;
	height = size * 2 + padding * 2;
	chars = baselog(mod, 26);
	printf("\"%d %d %d %d\",\n", width, height, mod + 1, chars);
	color = xmalloc(sizeof(color[0]) * (mod+1));
	rgb[6] = '\0';
 
	printf("\"");
	color[mod] = xmalloc(sizeof(color[mod][0]) * (chars + 1));
	for (j = 0; j < chars; j++) {
		color[mod][j] = ' ';
	}
	color[mod][chars] = '\0';
	printf("%s c #000000\",\n", color[mod]);
 
	for (i = 0; i < mod; i++) {
		color[i] = xmalloc(sizeof(color[i][0]) * (chars + 1));
		if (i == 0) {
			for (j = 0; j < chars; j++) {
				color[i][j] = 'a';
			}
			color[i][chars] = '\0';
		} else {
			strcpy(color[i], color[i-1]);
			for (j = chars-1; j >= 0; j--) {
				if (color[i][j] == 'z') {
					color[i][j] = 'a';
				} else {
					color[i][j]++;
					break;
				}
			}
		}
		one = 255 / pow(2, i / 6);
		sprintf(rgb, "%02x%02x%02x", makecolors[i%6][0] == '1' ? one : 0,
				makecolors[i%6][1] == '1' ? one : 0, makecolors[i%6][2] == '1' ? one : 0);
		printf("\"%s c #%s\",\n", color[i], rgb);
	}
 
	line = xmalloc(sizeof(line[0]) * (width+1));
	pascal = xmalloc(sizeof(pascal[0]) * size);
 
	line[width] = '\0';
	for (j = 0; j < width; j++) {
		line[j] = ' ';
	}
	for (i = 0; i < padding; i++) {
		printf("\"%s\",\n", line);
	}
 
	memset(pascal, 0, sizeof(pascal[0]) * size);
	pascal[0] = 1;
 
	for (i = 0; i < size; i++) {
		for (j = i; j >= 0; j--) {
			if (j != 0) {
				pascal[j] = (pascal[j-1] + pascal[j]) % mod;
			}
			pos = padding + 2*j + (size - 1 - i);
			/* XXX a implementacao de line ficou toda errada e so estou pegando
			 * o primeiro caractere de color aqui. precisa ser reescrito. */
			line[pos] = line[pos+1] = *color[pascal[j]];
		}
		printf("\"%s\",\n\"%s\"%s\n", line, line, i == size-1 && !padding ? "" : ",");
	}
 
	line[width] = '\0';
	for (j = 0; j < width; j++) {
		line[j] = ' ';
	}
	for (i = 0; i < padding; i++) {
		printf("\"%s\"%s\n", line, i == padding-1 ? "" : ",");
	}
	printf("};\n");
 
	if (tofile) {
		fclose(stdout);
	}
	return 0;
}

(Download — 5kb)

 
stallman

(por Richard Stallman)

Pessoas de fora do movimento do software livre frequentemente perguntam sobre as vantagens práticas do software livre. É uma pergunta curiosa.

Software não-livre é ruim porque ele nega sua liberdade. Logo, perguntar sobre as vantagens práticas do software livre é como perguntar sobre as vantagens práticas de não ser algemado. De fato, isso tem vantagens:

  • Você pode usar uma camiseta normal.
  • Você pode passar por detectores de metal sem ativá-los.
  • Você pode ficar com uma mão no volante enquanto troca as marchas.
  • Você pode arremessar uma bola de baseball.
  • Você pode carregar uma mochila.

Nós poderíamos encontrar mais, mas você precisa dessas vantagens para convencê-lo a rejeitar algemas? Provavelmente não, porque você entende que é a sua liberdade que está em jogo.

Uma vez que você percebe que é isso que está em jogo com software não-livre, você não precisa perguntar que vantagens práticas o software livre possui.

Original (em inglês): http://www.gnu.org/philosophy/practical.html

 

Dear Participant,

The 2011 World Finals is postponed.

Contact your travel agent or airline for a refund or travel voucher.
Consular Travel Warnings should make it easier for you to avoid penalties.

The earliest date will be the last week of May.
Please block the last week of May on your calendar.

Please block the last week of June on your calendar.
The month of July and the first two weeks of August are also under consideration.

We hope to announce the date by February 10th.
We plan to announce both the place and date by February 28th.

I look forward to seeing every one at a spectacular World Finals later this year.

Bill

P.S.
If you need accommodations in Sharm El Sheikh from February 20 – March 5,
please contact .

 
libre-planet

by Peter Brown, FSF Executive Director
(Free Software Foundation Bulletin, Issue 16, May 2010)

Camiseta LibrePlanet A few weeks ago, my six-year-old son Michael looked at my t-shirt from our LibrePlanet conference and started asking me to name each of the various characters and objects shown in the t-shirt design. These characters are the mascots of various well-known (ahem) free software projects. Shame-faced, my memory slipped on a few and I had to go look them up for him.

The symbolism of the t-shirt is reinforced by the tag line “Working Together for Free Software” and this is a theme that the Free Software Foundation is working to promote within the community — that we need to do a better job driving awareness and solidarity to the cause of software freedom.

Free software is strong because of its values and because there are many heads to the free software hydra. For every project that goes moribund another two (dozen it seems) projects rise to take its place. But all too often we see high-profile projects, that are often corporately controlled, acting in ways that hurt free software, often putting their narrow self-interest ahead of the wider adoption of free software platforms, or promoting ancillary proprietary software at the expense of other free software projects. The most common problem is the lack of effort to educate users to the values of the free software they distribute. Leaving a typical user valuing the software only because it can be acquired for little or no cost.

Our campaign for software freedom is not a campaign for freedom of choice. Free software isn’t just an alternative to proprietary software. Free software is a social movement, a movement to rid the world of software that would otherwise be used to divide us and keep us powerless. The software we use is not a matter of utility or convenience, it is a matter of securing our freedom now and ever more so in a future where we become increasingly dependent on the integrity of the software we run.

In the US, we may have a Bill of Rights that prevents government from restricting free speech, free press or free assembly, but government can be ignored and these rights removed when proprietary software corporations have control over a citizen’s computing.

We need to strengthen the free software movement for the long haul. The key to this is to impress software freedom values on our friends and all the people we introduce to free software. Our campaign asks free software supporters and projects to promote free software in ways that consistently emphasize everyone’s right to freedom.

Working Together for Free Software means:

  • Telling all users that they deserve to have freedom and that they should be in control of their computing.
  • Promoting free software as a civil liberty, that protects citizens from government and undue influence in their lives.
  • Prioritizing software development for free platforms, and to recognize that the aim is to eliminate proprietary software like any anti-social behavior.

Please join us in promoting our Working Together for Free Software campaign.

© 2012 Blog do Tiago Suffusion theme by Sayontan Sinha