Nelson Enrique Castillo Izquierdo

There is not intellectual exercise which is not ultimately useless

(==HBLogger==)
(==Cellular Automata==)
(==Random Thoughts==)

(2002-11-22 / Random Thoughts) : Santa Marta / What comes next?
(Last in Thread)
[ -- Previous -- ] / (2002-11-21) : LiteWeb : LightWeight Literate Programming

Text


(2002-11-21 / HBLogger) : My experience with HBLogger / vim user
(Last in Thread)
[ -- Previous -- ] / (2002-11-19) : Genesis / My first log with HBLogger

Here is a snapshot of this blog (blog.tar.gz). I really find it easy to keep my blog in this way and maybe other programmers might agree with me. As I started filling this blog the obvious step to follow was to use individual files for each entry, so I created a directory called 2002 and that's where I'm adding comments. I can use ispell on each log entry =)
I had to include the file in some way, so I tried to use the tag <hb.read> that gets replaced with the contents of a file. That would be nice if I only needed to include plain-old text, but I need to include HB code. I don't know if there is a tag that can do what I want to do, I need something like <hb.include> that can allow me to include code dynamically. Right now I am using the :include command, that lets me include a file with the definition of the code I need to use, but there is something I don't like with this approach: I have to make an include that could cause side effects and I have to make changes in two places to get the log included.

-------------
:include 2002/004-hblog.hb
<blog.add
  title='My experience with HBLogger / vim user'
  topic='hblog'
  date='2002-11-21'
  _=<004-log>>
-------------

I don't know whether what I need is implemented in HB or not, but I'd like to have a tag: <hb.include>. By default it could just include a file as :include does, but we could add options that can either: forbid/allow the definition of sections outside the scope of the file and allow/forbid the use of sections that are defined "outside" the included code. The included code could include other files as well.

Features I'm planning to add to the HBLogger module:

  • Add tags to iterate thru topics in the same way do with the blog entries.
  • Add options to this tags so we can access the counter of the first and the last log (this will alow us to build a simple index)
  • Add a tag or an option to print how many entries are on a given topic.
  • Add an option to the <blog.show> and/or <blog.show.skip> tags so we can restrict the iteration to the entries of a given topic.

So far I've only needed the first three. Briefly stated, the <blog.topic.show> tag is likely to change.


(2002-11-21 / Random Thoughts) : LiteWeb : LightWeight Literate Programming
[ -- Next -- ] / (2002-11-22) : Santa Marta / What comes next?
(First in Thread)

Half a year ago I was talking to Alejandro Forero and Jaime Irving about many things, and then we talked a while about CWEB. We agreed on something: parameters are missing in CWEB. Of course you can still use macros, but that's not the same. Clueless as usual I decided to implement a program just to see how it would look like. My design goals were: 1) The C sources had to look good. 2) of course, send parameters to the sections and 3) use HTML for the "literate" version of the program.
It was a good programming experience for me because I had to manage dependences between sections. You can download this experiment, look at the README, and at the Makefile. The HTML looks good, when a section is used an hyperlink to its definition is added and it also have some highlighting (liteweb.tar.gz)


(2002-11-20 / Cellular Automata) : My final project as an undergraduate. Sight.
(Last in Thread)
(First in Thread)

My final project as an undergraduate student was "Generating pseudo-random number with three-dimensional uniform cellular automata". I used a Genetic Algorithm to find the rules for the three-dimensional CA, the genome was 128-bit long. The fitness for the GA was the minimum entropy in the CA after 4096 time-steps. The evolution required a big amount of computational resources and I needed to perform 100 runs, so I had to build a cluster of 23 PCs (400MHZ each) at the Universidad del Magdalena. I built a disk-less COW (cluster of workstations), the server was a Debian GNU/Linux. That was one year ago and the overall run took 12 hours. I calculated a speedup of 14, so without the cluster this task would have taken more than 100 hours to complete.
I got good results but I still haven't published them in a journal but I'd like to do so. I learned a lot of thinks and I think I could use all what I've learned to build better random number generators with non-uniform, one-dimensional cellular automata. I might try something soon, before 2003. I am releasing release the code of the RNG. You can download it here gen3d.tar.gz.
Well, I'll give you an example of how to run the software.

(all in a single line)
$ ./gen3d seed 2002 xsize 9 ysize 9 zsize 9 file myfile.rnd 
        63789bd66560e90d129fac5ba7529c4a 
        c72ae3fc3f08d8959439f0944d938b72
        f2b9e52dbc43e80547549ce98f0323e9

This builds the file myfile.rnd that will have 8MB by default. The 3-dimensionalCA will have 9x9x9 cells. The seed of the auxiliary RNG that will fill the CA the first time and then we have 3 128-bit rules obtained with the GA. Then we use two well know battery of tests, ENT and diehard (I used diehardc). Well, you can read the rest in the README file (gen3d.tar.gz)


(2002-11-19 / HBLogger) : Genesis / My first log with HBLogger
[ -- Next -- ] / (2002-11-21) : My experience with HBLogger / vim user
(First in Thread)

I finally made my mind so I'll start my blog today. Why? Well, I've been able to learn a lot surfing the Internet and reading everybody else's pages. Sometimes you write code that someone might find useful. Sometimes you just want to let your friends know what you're doing. I can also post here links to interesting articles I find in the web.
I decided to sort the posts using threads so I or someone else can keep track of a given topic. Well, for that I have to use static pages... so I had to decide whether to use Perl or PHP, but I've also used HB for building static pages and so far I have liked it. So I decided to write a module that can help me with my blog.
It was programmed to build the threads for me, and I think it's rather easy to use (if you're a emacs or a vim guy). You'll find a simple text-based blog with the examples. You can download it (HBLogger : patch for hb-1.9.29) and give it a try.


"It is now time to make it unclear
To write off lines that don't make sense
One more special message to go
And then I'm done then I can go home."