terça-feira, 13 de outubro de 2015

Reflexão com iluminura sobre o Amor

Estou sentado num café, o "Sol Brasil", em Santa Apolónia, à espera do combóio, ou melhor, o combóio é que espera por mim, ou melhor, não, não esperará, partirá às 11:30, quer eu esteja ou não a bordo. Mas estarei. Já tenho bilhete. São agora 11:15. Encontro-me no interior do referido estabelecimento, apreciando um folhado misto com alface, coisa que, inexplicavelmente, só existe em Lisboa. Acompanho a dita iguaria, evidentemente, com um "fino" de Sagres, coisa que, talvez menos inexplicavelmente, mas ainda assim muito inconvenientemente, também não se encontra ao norte, exceto em McDonalds.

A porta aberta do café é um ecrã, um postal ilustrado "alternativo". Contra a luz do Tejo, entre a proa de monstruoso cruzeiro turístico e outros objetos irrelevantes, destaca-se o grito dum grafiti improvável, aposto num vidrão: "O AMOR CEGA-NOS!"

Penso na minha amada, e em como num só dia sofremos e nos curámos dessa cegueira, e sobreviemos maiores, enormes, e com a própria visão muito melhorada. O amor que cega também cura, tudo é um processo, a superação duma crise exige uma força que fica e nos eleva.

São agora 11:20. Previdente, pago, saio, percorro as poucas dezenas de metros até a linha 3. O combóio parte puntualmente, comigo a bordo.

Lisboa, 13 outubro 2015

terça-feira, 23 de outubro de 2012

A message to the editor at m-w.com

If m-w.com allowed login I would leave this message there, as a comment to the "Me and I" video. Wonderful videos. I particulary like this one and the one about "whom". A propos this one about "Me and I": I note there's a lot of (wrong) "you and me" on pop songs. Of course Yes' song "And You and I" is correctly named. Which brings me to a point I'd love to see you cover: the possessive apostrophe. From what I gather my posts are Marius's posts, or Alves's posts. But my colleagues keep writing Marius' posts (without the additional s); as I understand it this can be done only for famous names like in Jesus' teachings. Or Yes' songs (but here we may have a plural). So, am I famous, or my colleagues are wrong? Thanks.

terça-feira, 9 de outubro de 2012

Robert Fisher copia Cervantes

O best-seller "O Cavaleiro da Armadura Enferrujada", de Robert Fisher, 1990, é simplesmente uma versão compacta do "Don Quijote de La Mancha", de Miguel de Cervantes, 1605.

Isso não é dito em lado algum. Devia ser. Não é incorreto fazer versões—até são úteis—, mas é muito incorreto escondê-lo.

quarta-feira, 12 de setembro de 2012

Installing AWS on Windows

See also Installing on Linux

0. Pre-requisites

Cygwin, with Make. GNAT

1. Download and extract AWS

1.1 Download from libre.adacore.com

1.2 Extract. I have extracted to "C:\GNAT\AWS-2012" On my system I have the tree:

C:\GNAT
  |__2011
  |__2012
  |__AWS-2012 <= extract hereto (for example)

where "GNAT\2011", "GNAT\2012" are GNAT instalations. GNAT\2012 is the active compiler. I will install AWS 2012 in "GNAT\2012"

1.2.1 Change to "C:\GNAT\AWS-2012\x86-windows\2012\aws"

1.2.2 Extract aws-gpl-2.11.0-src.tgz in situ

2. Install

2.1 Change to "C:\GNAT\AWS-2012\x86-windows\2012\aws\aws-gpl-2.11.0-src\aws-gpl-2.11.0-src"

2.2 Edit "makefile.conf" as follows (don't change the rest)

prefix = /cygdrive/c/GNAT/2012/
ENABLE_SHARED = false
DEFAULT_LIBRARY_TYPE = static
XMLADA = false
ASIS = false
ZLIB = false
SOCKET = std

That is, change the shell/make expressions to constants. Note the "prefix" is in Cygwin format. Note ZLIB = false means AWS own library (I think). Note SOCKET = std means no SSL support. I have not been able to install AWS with SSL support on Windows yet.

2.3 Open a Cygwin terminal. Change to "/cygdrive/c/GNAT/AWS-2012/x86-windows/2012/aws/aws-gpl-2.11.0-src".

2.4 Issue the command "make setup" (this step probably can be skipped)
2.4.1 ignore the complaints "cannot generate system tags, the test are disable (sic)"

2.5 Issue the command "make setup build"
2.5.1 ignore the warnings about no compiler for the make language; see also 2.4.1

2.6 Issue the command "make install"

2.7 Edit the file "c:\GNAT\2012\lib\gnat\aws\aws_lib_shared.gpr" as follows (don't change the rest)

   LIBZ_Path := "c:\GNAT\2012\lib\aws\native\static";

That is, change the Cygwin format "/cygdrive/c/GNAT/2012//lib/aws/native/static" to Windows format.

2.7.1 Before GNAT (?) complained about "/cygdrive/c/GNAT/2012//lib/aws/native/static" missing. So I copied the corresponding GNAT\2011 onto it. But this step probably can be skipped.

Done:-)

3. Test

3.1 Build and run the supplied demos "hello_world", "agent"

See also Installing on Linux

quarta-feira, 11 de julho de 2012

Installing G2F on Linux... not

Trying to install G2F, the Ada binding to ImageMagick, on Linux (Ubuntu).

Installed ImageMagick via apt-get.

The G2F install programs "configure", "config_sys", either "cannot find -lMagick" or cannot find the "GetMagickQuantumDepth" object.

Installed ImageMagick from source. The installation triad (./configure, make, make install) doesn't work as documented. They must be prefixed "sudo". Also, the (documented) command must be issued:

sudo ldconfig /usr/local/lib

G2F configure breaks with "cannot find -lMagick".

The following libMagick files exist on my system:

/usr/lib/libMagickCore.so.4
/usr/lib/libMagickWand.so.4.0.1
/usr/lib/libMagickCore.so.4.0.1
/usr/lib/libMagickWand.so.4
/usr/local/lib/libMagick++.la
/usr/local/lib/libMagickWand.so.5.0.0
/usr/local/lib/libMagick++.so
/usr/local/lib/libMagickWand.so
/usr/local/lib/libMagickWand.la
/usr/local/lib/libMagick++.a
/usr/local/lib/libMagickCore.la
/usr/local/lib/libMagickCore.so.5.0.0
/usr/local/lib/libMagickCore.so
/usr/local/lib/libMagickCore.a
/usr/local/lib/libMagickWand.a
/usr/local/lib/libMagickCore.so.5
/usr/local/lib/libMagickWand.so.5
/usr/local/lib/libMagick++.so.5
/usr/local/lib/libMagick++.so.5.0.0

The G2F configure program is a script to build and run the Ada program Config_Sys. (I like this Adaist approach.) So I looked into Config_Sys and changed the line

 pragma Linker_Options ("-lMagick");
to
 pragma Linker_Options ("-lMagick++");
Now the program builds with
 ./configure
but does not run, because it's in windows syntax. So I run it manually
 ./config_sys

It terminates silently. So to verify I added instruments too. It seems terminates normally.

Now make. Error: the process is looking for the wrong path "/opt/Ada/gnat-2006/bin/gnatmake". Edited "Makefile" with the right paths. Same error! Must be other Makefiles. Fixed all Mafekiles. Same error! Looked for occurrences of the wrong path. Oh, there are GNUMakefiles. Fixed. New error: "cannot find -lMagick". We know it should be Magick++. So now we must look for occurrences, change...

/* this process goes on forever and ever and this is why the software crisis is here, not programming, configuration... */

... error "undefined reference to `SetCacheView'"

Seems this ImageMagick function has been deprecated in 2008. New cache view interfaces to correct shortcommings of original ones. New interfaces are AcquireCacheViewPixels(), AcquireOneCacheViewPixel(), AcquireCacheViewIndexes(), GetCacheViewPixels(), SetCacheViewPixels(), and SyncCacheViewPixels(). The deprecated functions are AcquireCacheView(), GetCacheView(), SetCacheView(), and SyncCacheView(). (http://www.graphicsmagick.org/NEWS.html)

I guess it is now my turn to evolve G2F... Good, I'll be programming:-)... sort of...

I've nullified the offending function and now make terminates normally (?) and the tests build, but... they crash with "raised G2F_IMCORE.CORE_ERROR : Initialize_Magick failed"

A Linux installation does not require explicit initialization, so I commented it out. Now I get "cache" errors...

I gave up on G2F. I am going to use Netpbm (or ImageMagick, or GraphicsMagick) via command line.

Also

  • MagickWand is the recommended interface, instead of MagickCore, so why G2F uses core?
  • Magick++ is common to ImageMagick and GraphicsMagick, so maybe this should be the binding (GM is faster).
  • This IM/GM fork...
  • IM/GM semm too much in flux. I need stability.

Going with good old NetPbm for now.

quinta-feira, 28 de junho de 2012

Installing GNAT and AWS 2012 on Linux

In the past I have tried to install AWS on Windows and found it terribly difficult and, most importantly, never succeeded in building an SSL application (which is mission-critical for me). From several sources including the excellent people on the AWS forum I gathered the intuition that I might succeed on Linux. So I installed a Linux and... indeed succeeded building an SSL application!

The installation of GNAT GPL 2012 and, principally, AWS, on Linux, is not without a few difficulties. For myself and others, hereby I try to record the process step-by-step. This instalation is for AWS with SSL, sans any other extras.

1. Install Linux

I wanted to work on my Windows laptop (I need it for other projects), so I installed Linux on a virtual machine on that system.

1.1 Install VirtualBox

IIRC, this free software from Oracle installs out of the box, no difficulties here.

1.2 Install Ubuntu Desktop
Ubuntu is a Linux. The principal trick here is to install the Desktop version, not the Server version.
1.2.1 Download the ISO image of the Ubuntu Desktop installation CD.
1.2.2 Create a virtual machine on VirtualBox. IIRC, I used all default values.
1.2.3 Setup the virtual machine with a virtual CD-drive from the ISO image.
1.2.4 Turn on the virtual machine and install Ubuntu from the virtual CD.
1.3 From this point on, all operations are done on this Ubuntu system.

2. Install GNAT

2.1 Make a download package with GNAT GPL 2012 and AWS, from libre.adacore.com (the AWS part is a preparation for part 3); download, unzip, untar the package.
2.2 Run the installation program as superuser:
2.2.1 sudo ./doinstall
2.2.2 accept all default values.
2.3 Set the paths
2.3.1 export PATH=/usr/gnat/bin:$PATH
2.3.2 export LIBRARY_PATH=/usr/lib/i386-linux-gnu (or similar)
2.4 Test: write, build and run "hello.adb"

3. Install OpenSSL

3.1 Download the latest package and install thus (takes a while):
3.1.1 ./config
3.1.2 make
3.1.3 make test
3.1.4 sudo make install

4. Install AWS

4.1 Unzip and untar the AWS package downloaded in step 2.1

4.2 Change to the directory ending in "-src"

4.3 Edit "makefile.conf" as follows:
4.3.1 prefix = /usr/gnat
4.3.2 SOCKET = openssl

4.4 Edit "config/makefile" as follows:
4.4.1 LPATH = /usr/local/ssl/lib

4.5 Set the path
4.5.1 export C_INCLUDE_PATH=/usr/include/i386-linux-gnu (or similar)

4.6 Issue the commands:
4.6.0 make clean
4.6.0.1 this is absolutely required if previous installations have been attempted and have failed
4.6.1 make SOCKET=openssl setup
4.6.1.1 ignore the error "Can not generate system tags. The test are disabled" (sic)
4.6.2 make
4.6.2.1 ignore the warnings "no compiler specified for language "makefile", ignoring all its sources"; ignore the warnings about ZLib licensing
4.6.3 sudo make install
4.6.3.1 ignore the errors about not being able to stat aws.html/txt/info

4.7 Test AWS
To test AWS I use the provided demos. Make on the "demos" directory does not work; we must go into each demo subdir and try make, or else gnatmake the provided project file
4.7.1 Change to a subdirectory of "demos", e.g. "demos/runme"
4.7.2 Try make
4.7.2.1 Upon success, goto 4.7.4; upon the error "make: Nothing to be done for `all'.", try 4.7.3
4.7.2.2 Probably method 4.7.3 always works i.e. there is always a valid .gpr file, so we can skip 4.7.2 entirely
4.7.3 Build the provided project, e.g.
4.7.3.1 gnatmake -P runme.gpr
4.7.4 Execute the program e.g.
4.7.4.1 ./runme

terça-feira, 12 de junho de 2012

Ada Annex E for cloud computing anyone?

I want to create a 100% Ada complex web system.
The database component should be distributed, for safety thru redundancy.
So naturally I wanted to use Annex E.
Seemingly at the momemnt only one Ada compiler supports Annex E: GNAT.
The support comes from Adacore in the form of their Polyorb product, which also supports CORBA and other middleware items.
Good thing: these technologies are free.
Bad thing: there are no other, failsafe, Annex E technologies, free or otherwise.
Just a few bits of (essential) information for now.
To be continued, hopefully.
I will try build an Ada Distributed Application (check the acronym of this) based on Adacore GNAT GPL 2011 and Polyorb.
It will take a long time...
Anyone care to help?

sexta-feira, 4 de novembro de 2011

The Internet Business - build me one, I'll pay you

Occasionally I peek into Freelancer.com; today I found this project:

http://www.freelancer.com/projects/PHP-Website-Design/Make-Adsense-Profitable-Website.html

In sum, they are hiring people who can build a Adsense profitable website... on whatever topic!

Perhaps the main silliness here is: why would people who can build such websites be doing it for others?

It's like those books that reveal the secret of finantial freedom. If the author knew the "secret" would he be trying to (and seemingly succeeding in) selling such books? (Maybe that's the secret, selling such books...)

This is just one in a million silly projects around the Internet Business, on Freelancer.com and elsewhere. Although it is well established, by both reason and observation, that any Internet marketing sans real, proper content is a bust, we keep seeing this vast market grow of precisely that, Internet marketing sans content. Thank Google for doing precisely the opposite of what these people seem to thing they do.

(I just could not help it letting off some steam generated by watching stupidity grow each day in quantity and degree on the Human Web, despite the nice rational havens still out there.)

sexta-feira, 28 de outubro de 2011

LaTeX package listings bug with greek letters

Nice Ada source code, with greek letter variables, UTF-8 encoded:


And here is how LaTeX typesets it, via package listings:


Note how line 49 is perfectly typeset, but the variables at the start of lines 42, 43 have moved to end of the previous line. Man, I hate LaTeX!"#$%&/()=?»

sábado, 22 de outubro de 2011

Porquê "Marius"

Eis uma razão porque me intitulo "Marius", e não "Mário", na Internet. Porque, passadas várias décadas, os computadores continuam a não saber grafar acentos. Eis a detestável visão que acabo de ter na minha caixa de correio-e. Outras vezes é Mrio, ou coisas como M$%rio. Cinco décadas de informática! Uma década de Unicode!

segunda-feira, 22 de agosto de 2011

Sem/sans facebook

Abaterei minha conta Facebook muito em breve.
Principal razão: privacidade (no sentido técnico).
Segui-me aqui, ou em http://soundcloud.com/amadoalves, ou noutro sítio decente.

I shall close my Facebook account soon.
Main reason: internet privacy.
Follow me here, or at http://soundcloud.com/amadoalves, or at any other decent place.

sábado, 9 de julho de 2011

D. Quixote destroi João Sem Medo

Comprei um exemplar das Aventuras de João sem Medo, de José Gomes Ferreira, numa edição chancelada pela D. Quixote (ISBN 978-972-20-3553-8). Era para oferecer à minha melhor aluna de Língua Portuguesa de 2010/2011. Felizmente (?), antes de o entregar à aluna, dei uma olhadela ao texto. Terríveis gralhas! Logo na primeira frase, "os homens haviam estalado um Parque". Até fui verificar na "minha" edição (6ª edição, Diabril Editora, 1976), para confirmar o óbvio: é "haviam instalado". Pensei: bem, corrijo isto a caneta, e entrego... se não houver mais gralhas—enquanto ia lendo mais um pouco. Não precisei de avançar muito. Logo na segunda página do texto: "essa Floresta Maltida"! Fui verificar de novo, até porque agora até podia ser um ferreirismo, contração de "mal tida". Não, a minha edição regista "Maldita". Fico muito triste por ver assim tão maltratada uma obra prima da literatura portuguesa. Duas páginas, duas gralhas. O texto tem 170 páginas...

Atualização em Novembro 2011:
Comuniquei este facto à editora em Julho 2011. Nenhuma resposta até agora. (Será que a próxima edição terá uma errata de 170 linhas?)

sexta-feira, 3 de dezembro de 2010

Para uma central

Um dia este sítio será uma maravilhosa central de todas minhas produções.
Comecemos por uma ligação à Academia Musical de Santo Ovídio, blogue irmão.

quinta-feira, 4 de novembro de 2010

Para lembrar a Irene

O funeral, por cremação, da minha mãe Maria Irene Rodrigues da Silva teve lugar ontem, no cemitério de Rio de Mouro, Sintra. Estou obrigadíssimo a todos presentes e a todos os que me comunicaram então, antes ou depois, os seus sentimentos. Deixo aqui a pobre elegia que lá fui conseguindo, entre lágrimas, escrever, no dia anterior, para lá ir conseguindo, entre lágrimas, recitar, ontem, no funeral.

BREVE ELEGIA FÚNEBRE
Hoje há duas tristezas, e nenhuma delas é a morte da Irene. Já faz muitos anos que a Irene desistira de viver. Decisão racional, temperamental, ou resultado de depressão—não se sabe—e esta é a primeira tristeza: a nossa incapacidade de perceber, perceber mesmo, a fase final da extraordinária vida desta extraordinária mulher.
A segunda tristeza é que o próprio Universo, tão estúpido como nós, tenha demorado todos aqueles longos anos a conceder à Irene a concretização da sua desistência. A aceitar a sua demissão. Fê-lo, finalmente, anteontem. No dia dos mortos.
Até ao misterioso pedido de demissão, a vida da Irene é um facto de altíssimo nível que tem de ser lembrado. Professora, autora, mãe, uma vida profissional e pessoal riquíssima, generosa, criadora, corajosa, pioneira, muito acima da média. A Irene possuía no mais alto grau as três qualidades—difíceis de conjungar—da capacidade de trabalho, racionalidade, e emotividade.
Circula a tese de que cada um dos seus três filhos herdou uma destes qualidades—em separado. Parece que isoladas, diluídas na sopa genética, essas capacidades não têm o mesmo poder. Cá estou eu, por exemplo, com a minha racionalidade, não chegando a lado nenhum.
Não. Só conjugadas—improvável, singularmente conjugadas—as três forças—capacidade de trabalho, racionalidade, emotividade—produzem resultados excecionais.  Essa conjugação ocorreu no fenómeno Irene, e é algo que acontece uma vez num milhão de casos, e portanto é algo que tem de ser recordado. É uma alegria do Universo.
Licenciada em Ciências Físico-Químicas, com alta nota, foi convidada para docente da Faculdade. Isto num tempo—década de 1940—em que ainda era difícil e raro uma mulher fazer estudos superiores, especialmente em Ciências, e ainda mais difícil e raro aceder à respetiva carreira académica. Recusou, para ir lecionar no secundário. Porquê?
Rómulo de Carvalho.  A Irene fora aluna deste extraordinário professor—no secundário—e ficara cativa do seu génio. O seu outro modelo era, naturalmente, Marie Curie—cuja história bebeu sem dúvida também dos livrinhos do Mestre, História dos Isótopos, História da Radioatividade. De toda a formação que recebeu, foi a do Mestre a que reteve. Que a impressionou, que a apaixonou. E que, naturalmente, quis emular.
E assim o fez. Com absoluto sucesso. Durante toda a sua vida ativa, a Irene ensinou e escreveu Físico-Química.  Com um cuidado, interesse, abrangência, coerência, rigor, paixão, dum grau extraordinário, que alguns de nós tiveram a felicidade de poder observar.
É principalmente à Irene, à graça da sua educação, ao exemplo da sua história, que devo o meu modo peculiar mas inalienável de olhar o Universo, e das coisas grandes que o Homem sonha e faz nele. Uma visão tentativamente integrativa, que funde humanidades e ciências, espíritos e matérias.
A Irene, ao olhar para dentro do átomo—o principal objeto das sua querida ciência físico-química—, via—corretamente—todo o Universo. Chegou a descrever essa visão artisticamente, na sua pintura amadora.
Com ela eu também aprendi a olhar para o pequeno, para o pouco—até para o nada—e ver tudo. Uma visão de abrangência, tolerância, e duma claridade por vezes cegante e inibidora da ação—mas essa debilidade perante a grandeza é defeito inteiramente meu: não tendo recebido, gratuitamente, o gene do pragmatismo, do fenomenal genoma Irene, também não o soube conquistar.
Devo à minha mãe Irene a compreensão, a apreciação da poesia igualmente integrativa do Mestre que ela fez nosso:
O Universo é feito essencialmente de coisa nenhuma.
Intervalos, distâncias, buracos, porosidade etérea.
Espaço vazio, em suma.
O resto, é a matéria.
Daí, que este arrepio,
este chamá-lo e tê-lo, erguê-lo e defrontá-lo,
esta fresta de nada aberta no vazio,
deve ser um intervalo.
(António Gedeão)
Mário
2010-11-03

Nos meses de luto subsequentes esta elegia tomou forma duma música que me foi aparecendo na cabeça e lá consegui esboçar uma gravação:
http://soundclick.com/share.cfm?id=10222190