:: dev ::

Sandro Magi

Main

Affiliations




Contact

Development

 Thought

In My Egotistical Opinion, most people's C programs should be indented six feet downward and covered with dirt.
~ Blair P. Houghton ~

This section has my programs that I've written over the years (either for school work or for learning a new programming language).

I am currently proficient in C#, C, OCaml, Java and Ruby (in that rough order). I'm quite comfortably familiar with Perl, Lisp, Ada95 and C++. I'm also involved with numerous open source projects.

Sasa .NET library - Sasa v0.9.1

This is a extensions library for .NET implementing a pop3 client, Linq extensions,  This project is now hosted on Sourceforge.

Language:C#

License: LGPL

Download:

Simple Process Filesystem - spfs v0.1

File and directory EROS processes implement a simple filesystem. It's so simple as to be largely useless for anything practical, but it might make good tutorial material one day. Any development of real filesystems for EROS should build on the work currently under eros/src/base/lib/unix in the EROS source archive. The code there more fully utilizes EROS's full capabilities.

Language:C

License: LGPL

Operating System:EROS

Download:

Ada Documentation Generator - adagendoc v0.1

Ada has very poor online documentation. There isn't even an up to date API reference. Couple that sad state of affairs with the fact that Ada munges filenames so they don't reflect the actual package names, and learning the API can be very frustrating. This documentation generation script is an attempt to alleviate some of the pain. Just specify a directory of Ada spec files and an output directory, and it will generate a file index referenced by package name linked to the package spec. It's still very rough as I wrote it very quickly. Browse the contents online to see the reference for my latest GNAT installation.

Language:bash

License: BSD

Download:

RFC Date/Time Formatting for Ada95 - adadatetime v0.1

This is a package that can format an Ada Calendar.Time or integer-based (Year, Month, Day, Hour, Minute, Second) tuples according to a variety of RFC standards. It currently only supports RFC 822 and 850 (necessary for HTTP).

Language:Ada95

License: GPL

Download:

Telescope Calculations - telecalc v0.1

This is a small program to calculate parameters for a newtonian truss-based telescope. It currently accepts primary focal length, primary diameter, objective lens diameter and the number of trusses as arguments. It then calculates and outputs optimal values for the secondary minor and major axes, secondary major horizontal position on the left and right, the inner "tube" radius (ie. radius to the closest truss crossing), and the radius to the truss mounting point.

Language:OCaml

License: LGPL

Download:

OCaml Web Server - ocamlhttpd v0.0.3

This is a web server written in ocaml. I've tried to decompose the functions into generic modules as far as possible. The current version is incomplete, but it serves html pages without crashing. Don't try serving anything else though. When complete, the source will have an Http module, a generic Server module providing functionality for any kind of server (ie. request/response dispatching, reading/writing file descriptors/sockets and resource pooling), an Ioevent module which fires events when file descriptors are ready to be read or written, a Mime module, an FsCache module which provides a tweakable in-memory file cache and, finally, perhaps character set and content encoding modules. This release provides simple Http parsing, the Server module and Ioevent module, RFC date time generation. There's still a long way to go.

Language:OCaml

License: LGPL

Download:

Next Gen libc - nglibc v2003-07-10 (UNMAINTAINED)

This is a library that aggregates many useful C data structures and algorithms. It repackages many of the glibc library functions into more meaningful names organized in a pseudo-hierarchy (since names are no longer restricted to 6 characters). This library also adopts many useful object oriented patterns (such as iterators) and provides many ready-made, generic objects such as trees, lists and hash tables all in pure C. One potentially useful new feature: generic typing. Each header uses a generic type which is not defined in the header but must be defined in the client code. Doing so generates statically typed functions suitable for that source/object file. Whether this is a workable approach remains unclear.

Language:C

License: LGPL

Download:

Crypto in Various Languages - cryptolang v0.1

This will be a set of cryptographic algorithms written in various languages. So far I have implemented RSA en/decryption in Ruby and Lisp. An OCaml implementation is coming soon. None of the implementations have been optimized yet. The Lisp implementation has been tested with clisp and gcl.

Language:Ruby,Lisp,Ocaml

License: LGPL

Download:

Mini Content Management System - minicm v0.6 (UNMAINTAINED)

This is a structured set of shell scripts that facilitates content management and versioning. It's very basic and doesn't have any of the fancy features of CVS and similar software. It simply performs basic versioning, updating, and mirroring to remote repositories using rsync. It's basically what I've been developing to help me manage the other software projects listed here as well as some websites. It takes some setting up to get working which isn't documented anywhere just yet. This is now deprecated since I've learned enough shell scripting, and I've now moved to CVS (at least until OpenCM is ready).

Language: Bash

License: GPL

Download:

Bit Manipulations Library - libbits v0.7

This library provides various routines to manipulate the bits in C types and byte arrays. It defines bitvectors and bitstreams. The bitvectors are manipulated by start and end indices like an array, and the streams are manipulated through the familiar read/write/seek interface for file descriptors and byte streams. This library is currently incomplete and has only been partially tested, so I do not recommend using it unless you wish to debug it as well.

Language: C

License: LGPL

Download:

Capability Network Operating System - CNOS (UNMAINTAINED)

This is the current package for CNOS. The archive contains the source for the OS itself, as well as the source for some other miscellaneous software which we may use (in the "extras" subdirectory). The "docs" subdirectory contains documentation for CNOS design, hardware (ie. PIT, PIC, DMA, NIC, etc.), operating system concepts, etc. This project is now closed since my design project is over, so don't expect any more updates.

Language: C, ASM

License: GPL

Download:

Sparse Matrices

This is a simple set of source files which define operations on a data type known as a Sparse Matrix. A Sparse Matrix is a matrix in which the majority of entries are zero. Using a full matrix would be wasteful so a special abstract data type is used: the Sparse Matrix.

My code supports the basic operations required of matrices in as efficient a manner as possible. Take with a grain of salt though, I wrote this quite a few years ago. ;-)

Language: C

License: LGPL

Download:

Process Descriptors and Process Queues

This software implements a Process Descriptor Object and a set of operations. It also implements a Process Queue which can be used in an operating system to implement schedulers and Process manipulation.

I probably won't be extending this code any further. It was part of an operating system's course that some friends of mine were taking and I decided to do in my spare time. ;-)

Language: C

License: LGPL

Download: