-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|319|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
SoCoder -> Showcase Home -> Apps and Utilities


 
HoboBen
Created : 24 September 2019
 
System : Cross Platform
Language : Python 3.4+

Pyrrhic: programmable python build tool



Pyrrhic on GitHub
Screenshots
Pyrrhic is a programmable Python build system that supports incremental compilation, dynamic dependencies, and builtins for a range of tasks.

Pyrrhic is great for building static websites, or any build process where tasks are written in Python.

 

Comments


Tuesday, 24 September 2019, 10:34
Jayenkai
Sounds handy.
I used to use Blitz and text based templates to generate my sites, back in the day.
Started getting a bit slow after a while, though, but that's down to Blitz's slowness of string manipulation.
Python would be blindingly fast at it.
Tuesday, 24 September 2019, 10:58
HoboBen
Python is... not that fast!!

That's one of the motivations for this tool.

Instead of running ./build.py and having it rebuild a whole website, every HTML page, minify all the javascript, compile all the CSS, from scratch every time...

Just have it do the update based on what changed! FAR quicker and scales better.

And if I deleted a page, not to leave old outputs lying around that I had to manually delete either.
Tuesday, 24 September 2019, 11:02
Jayenkai
Really? People are always using python for scripty things? Thought it would've been faster..
Huh..
I've recently started using php to do scripty based things, and that's awfully fast at stringy things.
Tuesday, 24 September 2019, 11:11
HoboBen
Python is interesting. It's got all sorts of shortcuts and things it does lazily.

So, if things go right, and you don't need a full list, because it's been lazy you've skipped a lot of work. And because you don't have to have a full list in memory, but can process things lazily item-by-item, you can save a lot of memory.

But if you're in a tight loop, doing lots of computations? Numbers like 50-70x slower than C are accurate. So what C can do in a second, Python will take a whole minute. What C does in a minute, Python might take a whole hour.

Sometimes, Python's smarter lazy algorithms give you a big win, other times Python is just "fast enough", but in terms of pure brute force, sometimes a simple but stupid program in a fast language is enough.

But python is so easy and productive to work with! So with a smart system like Pyrrhic efficiently reducing the work that needs to be done, even slow python scripts are viable for large projects.
Tuesday, 24 September 2019, 11:38
Jayenkai
Sounds useful, then.
Always good to "prerender" whatever you can, and also slightly better for security, too!