Monday, June 18, 2012
The Secret of a Successful Programming Language?
A good amusement. ^_^ The Secret of a Successful Programming Language?
Saturday, June 16, 2012
Force all new and pop-up window in firefox open in a tab
According to Browser.link.open newwindow.restriction, this setting need to be at 0.
Thursday, June 14, 2012
Linux creator Linus Torvalds shares Millennium Technology Prize
Sunday, June 10, 2012
Interview with Patrick Volkerding of Slackware
LinuxQuestions has an interview with Patrick Volkerding, the creator of Slackware.
Slackware is my favorite Linux distribution. My first encounter with Linux was through Slackware around 1994. I still remember the days that I went to school's computer lab with a stack of floppy disks to download the latest release, it was frustrated with the lousy floppy disks, I had to write two disks for each disk image just in case one of them failed.
Since then I have used Suse, Redhat, Debian, etc occasionally, every time I have to come back to Slackware for its simplicity and elegant style of system management scripts. From Slackware I have learned lots and have supported it through my subscription to the DVD.
I wish every Slackware supporters would do a subscription to show the appreciation for Patrick's great work if finance is not a problem.
Slackware is my favorite Linux distribution. My first encounter with Linux was through Slackware around 1994. I still remember the days that I went to school's computer lab with a stack of floppy disks to download the latest release, it was frustrated with the lousy floppy disks, I had to write two disks for each disk image just in case one of them failed.
Since then I have used Suse, Redhat, Debian, etc occasionally, every time I have to come back to Slackware for its simplicity and elegant style of system management scripts. From Slackware I have learned lots and have supported it through my subscription to the DVD.
I wish every Slackware supporters would do a subscription to show the appreciation for Patrick's great work if finance is not a problem.
Saturday, June 9, 2012
Ada Unbounded String and Vector Container
Just to get myself to familiar with the Vector container and Unbounded String, I wrote the follow small test program:
Reference: Ada.Containers.Vectors
-- test unbounded string with vector with Ada.Text_IO; use Ada.Text_IO; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Ada.Containers.Vectors; With Ada.Text_IO.Unbounded_IO; with Ada.Command_Line; use Ada.Command_Line; procedure ubt is package My_Vector is new Ada.Containers.Vectors (Natural, Unbounded_String); use My_Vector; package SUIO renames Ada.Text_IO.Unbounded_IO; -- read input file and add each line into str_pool till file end procedure read_input (str_pool : in out My_Vector.Vector; File : File_Type) is begin loop str_pool.Append (SUIO.Get_Line (File)); end loop; exception when End_Error => null; end read_input; File : File_Type; str_pool : My_Vector.Vector; begin Put_Line ("Argument 1 is : " & Argument (1)); Open (File, In_File, Argument (1)); read_input (str_pool, File); Close (File); Put_Line ("Total line: " & str_pool.Length'Img); Put_Line ("File content:"); for i in 0 .. Integer(str_pool.Length) - 1 loop SUIO.Put_Line (str_pool.Element(Integer(i))); end loop; str_pool.Clear; end ubt;Compile it with
gnatmake ubtIt reads the input file line by line and stores them into the Vector container, then prints out the lines.
Reference: Ada.Containers.Vectors
Friday, June 8, 2012
TeX and TeXiA
I have been quite fond of TeX and LaTeX since my first encounter of it. The type set document looks the best and professional compare with other word processors. But it is hard to use when you trying to change the default way of text layout. The TeX macro language is quite hard to understand even I myself am professional programmer.
Over the years, I would like to see if I could come out a better one, but due to various reasons and my own laziness, there is no progress. I finally set myself to start a little bit by re-implementing the TeX engine in Ada - TeXiA, for the purpose to understand how TeX work internally and learning the Ada programming language at the same time. The progress is slow, currently the project just started and not yet reach section 100 of TeX: The Program (Massachusetts: Addison-Wesley, 1986). ISBN 0-201-13437-3.
I found the programming style of TeX, the literate programming introduced by Donald Knuth, hard to follow for me. I'm not a smart guy as Donald. I have to refer to a few C implementations to understand the whole picture: the texlive web2c version, yytex and Common TeX.
There are several other projects that related to computer typesetting are quite interesting:
Over the years, I would like to see if I could come out a better one, but due to various reasons and my own laziness, there is no progress. I finally set myself to start a little bit by re-implementing the TeX engine in Ada - TeXiA, for the purpose to understand how TeX work internally and learning the Ada programming language at the same time. The progress is slow, currently the project just started and not yet reach section 100 of TeX: The Program (Massachusetts: Addison-Wesley, 1986). ISBN 0-201-13437-3.
I found the programming style of TeX, the literate programming introduced by Donald Knuth, hard to follow for me. I'm not a smart guy as Donald. I have to refer to a few C implementations to understand the whole picture: the texlive web2c version, yytex and Common TeX.
There are several other projects that related to computer typesetting are quite interesting:
Subscribe to:
Posts (Atom)