Projects
ZofIA
A specialized educational platform geared towards assisting students in their preparation for the admission exam at the most prestigious university in Mexico. Gained over 10k Instagram followers in approximately three weeks after launch.
We have an automated pipeline that produces videos containing text, images and audio where we present a question and its solution. This content is generated with the help of Large Language Models (LLMs), text-to-image models and text-to-speech models. We then integrate these elements using Python to create the final video, that is later posted to our social media accounts.
The backend for the platform is written in Rust, the frontend in React and TypeScript, the database is PostgreSQL and the server is hosted on Heroku.
You can try the platform here: ZofIA
Chip 8
A very simple implementation of CHIP-8, written in Rust and compiled to WebAssembly; it uses a simple canvas to render the graphics.
Demo:
In the game wipeoff you can move the paddle with the keys q and e.
Trueno
A multithreaded and SIMD enhanced CPU ray tracer.
Supports diffuse, metal and dielectric materials, antialiasing, a fully configurable camera (resolution, aperture, focus) and scene.
Implementation based in the book Ray Tracing in One Weekend
FIRE
A modal FIle Reader and Editor (FIRE) written completely in C, without using external dependencies.
This was written in an attempt to dust off my C knowledge and also to try to learn modern common practices, like the usage of standard types (stdint.h), or to avoid using malloc in favor of using calloc. My main guide in this process was the blog post How to C in 2016 by Matt Stancliff, by now is a bit outdated, but still is a good read to catch up with somewhat "modern practices".
I am a big neovim fan and this was my main inspiration while building FIRE, as you can see from the demo above.
Features
- Normal and Insert mode, as in Vim.
- Open, display, edit and save files.
- Incrementally search file contents.
The source code and instructions to run the project are available in the repo.
Interpreter
The implementation of a dynamic programming language, Lux, and also his interpreter. It supports variables, flow control and functions. It has a REPL and it was made with a particular focus on the quality of error messages.
Implementation based in the book Crafting Interpreters de Robert Nystrom.
You can try the REPL (compiled to WebAssembly) here:
Covid Dogs
Work in progress... In the mean time you can read the auto-translated version here.
Reporstat
Work in progress... In the mean time you can read the auto-translated version here.
PokeClassifier
Work in progress... In the mean time you can read the auto-translated version here.
Numerical Methods II
Web page where various numerical methods for solving equations, approximate integrals and numerical interpolation are implemented, explained and represented through graphs.
The methods include Newton's method, some implementation of the trapezoidal rule, fixed point iteration, Lagrange polynomial interpolation, Newton's divided differences interpolation polynomial, among others.
Hosted on Heroku Fly.io,
back end written in Python (Django).
Source code here.
Telegram ChatBot
Two implementations of a chatbot using the official Telegram API. (Sadly Whatsapp and Signal do not provide a reasonable API).
The first bot implementation it is written in Python, hosted on Heroku and runs in a Docker container. It uses a relational database (PostgreSQL) for the data needs, which is hosted on heroku as well.
Unfortunately the performance of this first implementation is not the best and leaves a lot to wish. The average response time is around .5 seconds, for that reason I decided to give this project another shot with a different approach.
In the second implementation of the project I decided to use Rust as the main language because it is know for its blazing fast performance and security features, furthermore, it compiles and runs natively on the target platform that I chose for this project (ARM), in other words, a Raspberry Pi.
For the database system I used PostgreSQL as well but this time running natively on the host machine.
The final result is a chat bot implementation in which the average response time is around 300 µs, a lot faster than the first one.
Brainfuck Compilers
Two compilers for the esoteric programming language, Brainfuck. Brainfuck it is Turing-complete and consists of only the following instructions.
+ | - | [ | ] | > | < | , | . |
---|
For example, this is an implementation of the emblematic Hello World! program.
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<++++++++ +++++++.>.+++.------.--------.>+.>.
The first one creates an executable by mapping the brainfuck commands to assembly instructions, then it assembles the generated instructions using NASM and finally links them using ld.
The second one uses the popular Rust crate Inkwell that exposes the LLVM API, which provides a great interface.
The program crates an ELF file which is dynamically linked using Clang or GCC.
Both compilers are written in Rust, licenced under MIT and available on my GitHub.
Gráfos en Teoría
A web page that me and a few classmates did for our graph theory class. In the web site you can draw graphs and the output is information related to the graph.
Hosted on Heroku and written in Python (Django).
You can find the source code and resources used here.
Numerical Methods I
Cross-platform native program to solve linear and non-linear equations. Implemented in C++ using the popular GUI framework, QT.
The full list of methods and source code can be found in the GitHub repo.
Lunar Lander
To do...
A simple game.