pythonofftopic | Unsorted

Telegram-канал pythonofftopic - Offtopic

12466

Offtopic group for casual talking about anything. @rules_for_python still apply (except for the ontopic rule)

Subscribe to a channel

Offtopic

I did read and it was quite inspiring

Читать полностью…

Offtopic

Nice work and good for you! Surely some will find the time to read!

Читать полностью…

Offtopic

What the fuck is this actually

Читать полностью…

Offtopic

this is too long for me to read

Читать полностью…

Offtopic

If you know any programming language, you can start using those Data Structures you learned instead of just consuming information or knowledge. What do you know so far?

Читать полностью…

Offtopic

Well wats the best learning path for DSA

Читать полностью…

Offtopic

maybe you'd take some practice on codewars before further learning

Читать полностью…

Offtopic

if you mean to get used to common data structure concepts and not only to use them

Читать полностью…

Offtopic

It could help yes. My personal experience is that my study partners always quit and I end up having to finishing it alone anyway

Читать полностью…

Offtopic

What do you mean by that?

Читать полностью…

Offtopic

Since it doesn't have any backend

Читать полностью…

Offtopic

Hello everyone
how much will it cost for a website for a learning center
single page with language switcher without backend

Читать полностью…

Offtopic

Sounded like a challenge to me.

Читать полностью…

Offtopic

Let's see if you can get yourself unbanned, shall we?

Читать полностью…

Offtopic

most programs embedding it don't care for sandboxing it so that's why probably

Читать полностью…

Offtopic

Copy paste in AI and shorten bro

Читать полностью…

Offtopic

But i shall not be hateful

Читать полностью…

Offtopic

This was my experience building a Python-based solution to run Mermaid.js code. In the end, it turned into the MermaidX package – which even caught the attention of the Doxygen maintainer (he was opening issues on my repo!).
Sorry for making it so long, I know I went overboard 😅
Hope you found it useful.

Читать полностью…

Offtopic

From a simple idea to becoming a core programming infrastructure – the story of MermaidX.

Back in 2014, a JavaScript library called MermaidJS was born. It was basically a new pseudo-code language for generating engineering diagrams. It supported all kinds of charts, and you could draw beautiful diagrams with almost zero effort. It got so popular that it even made its way into the Markdown spec, and platforms like GitHub started supporting it natively. You can check out the live demo here:
https://mermaid.live/

But it had one major flaw: heavy reliance on JavaScript and the browser. To run, it absolutely needed access to the browser's DOM. What's the problem with that? Well, in a lot of use cases, we actually need a CLI that works on servers or headless environments. The official repo does provide something called mermaid-cli, but it's stuck in the Node.js/npm ecosystem and uses Puppeteer – which installs a full Chromium browser on your system, eats up hundreds of MBs of memory, and causes all sorts of trouble on headless/graphics-less servers.

Personally, I really didn't want to install Node at all. I wanted everything to live inside the Python ecosystem. Unfortunately, Python didn't have any clean, straightforward solution for this.

So, I wrote my first package called Phasma. I bundled a fully headless PhantomJS browser inside it and gave it a Playwright-like API (similar to Microsoft's Playwright). The coolest part? The wheel file for my Phasma package was only about 20MB – with the browser included! Meanwhile, the official Playwright package is 45MB without any browser. This solved a huge chunk of the problem, and I was able to create my own mmdc package in Python.

But there was a catch: because PhantomJS was outdated, it couldn't support Mermaid.js v8 and above. At first, I thought about writing a lightweight, super-fast browser from scratch. Then I realized that using a full browser for this was actually total overkill. All I really needed was a minimal DOM environment to generate the SVG output – not to take screenshots. I could just use a separate package to convert the SVG to PNG later.

So, in the new version, I completely ditched the browser approach. Instead, I used a lightweight JavaScript engine called QuickJS. I rebranded the whole thing and named it MermaidX. Later on, I added even more backends, including one fully written in Rust that's incredibly fast and runs without executing any JavaScript at all. Right now, MermaidX supports 4 different backends, and its total size ranges from 5MB to 25MB, depending on which optional dependencies you install.

Now here's where things got really interesting. Out of nowhere, the maintainer of the super popular Doxygen library started opening issues on my repo – almost 5 to 6 per day! In one of the issues, I jokingly told him that his speed at opening issues was way faster than my speed at fixing them. He then introduced himself and said he was actually evaluating MermaidX (from the Python ecosystem) to replace the official mermaid-cli for Doxygen, because he personally prefers Python over Node.

Honestly, that felt incredible. From a simple side idea, my work is slowly turning into a core infrastructure tool – maybe even surpassing the original one day. It's a really sweet feeling.

I just wanted to share this experience with you all. If you found it interesting or useful, I'd really appreciate a star on the repo:

https://github.com/mohammadraziei/mermaidx

https://github.com/mohammadraziei/phasma

Читать полностью…

Offtopic

I'm interested as well. I've worked through Grokking Algorithms (a bit oversimplified), Algorithms, 4th Edition (pretty balanced), and Introduction to Algorithms, which requires the strongest math background and isn't organized in a beginner-friendly progression.

Читать полностью…

Offtopic

pylings, afaik, unfortunately cannot provide progressive experience like rustlings,, and the quiz are way too abstract than emulated "real problem" in codewars

Читать полностью…

Offtopic

sometimes I get lost in my learning because cs and programming contains so much info and concepts

Читать полностью…

Offtopic

cs61a is a good start

Читать полностью…

Offtopic

Probably studying together

Читать полностью…

Offtopic

Any one interested in joining me unto data structures and algorithms in python

Читать полностью…

Offtopic

You can use GitHub pages

Читать полностью…

Offtopic

Am i not a professional communist joker? :(

Читать полностью…

Offtopic

I just get emotional sometimes. If you haven't seen, he was promoting his "unban" services.

Читать полностью…

Offtopic

That's reasonable, as sandboxing may cause ~ half of exising ecosystem non available

Читать полностью…

Offtopic

I would just load it as WASM if you need sandboxing.

Check out PyOdide
https://pyodide.org/en/stable/

Читать полностью…
Subscribe to a channel