Activity

Samuel

Last fixes:
Spacing bug: Fixed an issue where formulas were sticking to surrounding text after translation.
Unit translation: Reworked unit handling to correctly convert prefix + base units, enabling much more units.

Now the extension is basically finished. Formulas stay intact, and problems are finally readable. The next step would be to generalize to more languages.

Attachment
0
Samuel

The goal was simple: translate without breaking formulas.
My approach was straightforward: find LaTeX tags like \text{} and \mathrm{}, send the content to Google Translate, replace it inside the LaTeX source, and let MathJax re-render.
First problem: MathJax wasn’t updating
My content script runs in an isolated context while MathJax lives in the page’s main context. To fix that, I introduced a background.js script. Instead of calling MathJax directly, content.js sends a message and background.js injects code into the MAIN world where MathJax actually lives.
Second problem: units were being mistranslated
Sending some units to the Google Translate API was producing wrong or inconsistent results, so I built a dictionary mapping each Cyrillic unit directly to its Latin equivalent, bypassing the API entirely for those cases.
Third problem: formulas were still visually broken
Even after the translations were correct, the rendered math was displaced and overlapping with surrounding text. After inspecting the DOM directly, I found that Google Translate was reaching inside the MathJax-rendered elements and wrapping text nodes in tags, duplicating content. The fix was to mark all MathJax elements as notranslate before the Translate engine could touch them..
What’s next
Fix remaining small bugs, drop the hardcoded unit dictionary in favor of a smarter approach, and generalize the extension to work with other languages beyond Russian.

Attachment
0
Samuel

For now, I only used the class notranslate to keep the formulas intact, which helps a little with the visualization, but some parts inside the expressions still end up in Russian, line physics units and subcripts. I’m now trying to deal with these.

Attachment
0
Samuel

Just reshipping the project to physics lab. Also, when I shipped, it was an past version, so it didn’t had changable parameters. Make sure to try the complete version.

Attachment
0
Samuel

Shipped this project!

Hours: 14.06
Cookies: 🍪 42
Multiplier: 2.99 cookies/hr

I built a tool to create and test board coverings, which is really useful for math olympiad problems. The trickiest part was getting the piece borders to render correctly, and I solved it by redrawing them on every change.
As an example: can you cover a 4×4 board using L-trominoes and one monomino? What about an 8×8 board? Can you generalize this for 2ⁿ×2ⁿ boards?

Samuel

I fixed some bugs and finished the basic features, including the border of the pieces, the undo (Ctrl + Z) and the selection of cells for typing (Shift + Click).

Attachment
0
Samuel

Now you can color cells. I will add a function to drag to create pieces with border.

Attachment
0
Samuel

I just finished the basic grid thing. The next steps are:

  • Build an X marker for cells
  • Allow the user to make his own pieces, like dominos
  • Construct an algorithm (maybe C++) to find a covering of the the grid using the given pieces.
Attachment
0
Samuel

I think I finished pretty much everything. You can change the constant of the franctal and explore it, zooming in on click.

Attachment
0
Samuel

Shipped this project!

Hours: 1.27
Cookies: 🍪 3
Multiplier: 2.16 cookies/hr

I built a particle collision simulator using p5.js, where users can adjust parameters like elasticity, velocity, scale, and the number of particles. The simulator models collisions between particles in real time, showing how different settings affect their movement. Through this project, I learned about basic physics simulations, collision handling, and creating interactive visualizations with JavaScript.

Samuel

Shipped this project!

Hours: 1.64
Cookies: 🍪 8
Multiplier: 4.81 cookies/hr

I created a simple 3D playground using p5.js where users can select different objects, rotate them, and zoom in and out. The project works by using p5.js’s 3D rendering functions and basic input controls for interaction. Through this project, I learned how to handle 3D transformations, user input for navigation, and how to structure a small interactive graphics project in JavaScript.

Samuel

Now you can select an object and play.

Attachment
0
Samuel

Now you can change the parameters of the simulation, like the balls scale, velocity, elasticity and quantity.

Attachment
0