Do not use GIFs like this. Use a proper video codec.
(I’ve actually flagged this submission, because 120MB is far, far more than anyone reasonable would expect to be downloaded automatically by visiting a page, and expensive for some people—there have been multiple occasions for me in the past few years when it would have literally cost me around $10 to load the page.)
I just landed in Zurich and forgot that it is not part of the EU with respect to roaming charges. Just opening twitter and answering a whatsapp shot through my automatic roaming charge cutoff limit of 60€ (1MB is roughly $16 here).
So that page would have cost me roughly $2k to load if there were no automatic limit :)
On the off chance that you're staying for more than a few days I'd recommend dropping into a Salt or Sunrise store and buying a pre-pay e-sim. They're reasonably priced and should give you 5g everywhere you go.
> Do not use GIFs like this. Use a proper video codec.
Not a defense, but worth noting in the interest of full advice here that Github's README preview (what's showing here) does not support embedded videos, which is why GIFs are a popular choice.
That said, a good workaround for this is simply putting something like:
[](path/to/video/file/or/youtube/link)
This has the double advantage of not hitting your gpu/cpu on load (especially good for mobile) since there's no autoplay.
We had the same problem in Europe before 2016, it was awful - you needed to watch every step and being careful what sites you visit, what apps you open (and many used mobile data without you even knowing it) - people were being charget tens and in extreme cases even thousands of euros. It was even worse with a laptop. Abolishing roaming changes was a huge gamechanger. Of course for intensive internet usage you'd still probably want to buy a local SIM card, but apart from that you can forget mobile charges and just use your regular €5/month mobile plan for everything. The only exception is when you get very close to the borders of the EU and there is a chance of connecting to a non-EU tower.
I always used a prepaid SIM. For me, the knowledge of not getting into debt accidentally is worth the hassle of charging it myself every 3 months or so.
This was especially frustrating when living near a border (which in Europe is not unlikely). Depending on the weather (or the maintenance schedule), sometimes the foreign tower was strong enough for the phone to connect. I don't (want to) remember how much money I lost that way.
And you shouldn’t use any of them for things like this. They’re semantically clearly videos, and benefit from things like a pause/play button and scrub bar.
(Incidentally: why are you mentioning Chrome? All mainstream browsers support these.)
This just made me wonder how is it like to script in Blender.
Found this video https://www.youtube.com/watch?v=r8hqLh_HE08 which seems to give a good quick overview.
The info window that shows ui interactions as code seems incredible ergonomic if you just want to fool around with scripting without a big learning curve.
I have a work thing I can't talk about too much that has basically been a month of me fooling around all day figuring out how to script stuff in Blender. I love it, most of the time everything is exactly where I expect it to be, the documentation is killer, and worst-case-scenario, if I have to engage in "programming by asking a forum", the community turns around an answer for me in about 1-5 hours. Compare that to 24+ for any other time I have to use that last resort.
Unfortunately the functions the UI calls are not very usable in actual scripts, either because they are incredibly sensitive to state (ie. the mouse needs to be over a particular area, etc.) or because they're too slow (most operations update everything in the scene afterwards).
It's pretty nice, but there are some quirks. For instance commands depend on which Blender UI tab has mouse foucs (kind of natural for a GUI application).
Some stuff can only be done through bpy.ops, like changing the order of modifiers (if you really didn't want to use bpy.ops, you would need to remove all modifiers and recreate them, though this would severe any references to the old modifiers outside of your script, so you really can't do it without bpy.ops). Also sometimes operators are faster, so resigning from them sacrifices performance. And of course sometimes there just isn't an equivalent non-operator function, so you would need to recreate a functionality in order to not use an operator.
I never even considered using the Blender Python API in this way before. Funny, bein' I'ma huge fan of both Blender and Python, yet strangely never connected the two in my mind in this manner. I'm now looking at Blender in a whole new way.
Also, thanks to you folks who posted other links to further interesting related research paths. Love Hacker News because of you folks who do that sorta thing. :)
I also never considered this, I have been looking for a python video editing api and I’m pretty sure blender has some video editing stuff built in. Gonna have to give the blender python api a spin this weekend.
Well, visual representation helps convey information for sure.
However animation speed is not to be corelated with sorting performance. Bubble sort is lightning fast compared to merge sort if you judge by animation :) Luckily they have array access and comparison count listed.
Thanks for pointing that out. I was initially very confused and like you, I've had to read the metrics below the animations to get a better understanding
I recently start to play with Blender + Python to render molecular dynamics results. As long as you program properly, and have a large enough memory, you are able to produce very beautiful renderings. Many MD trajectory software from academia does not give you the freedom to use Python or only allow it in very-expensive paid-tier.
The images are a bit misleading by using different timescales.
Bubblesort appears to finish significantly faster than Quicksort if you are just watching the animations... I think the visualizations would be a lot more meaningful if you could visually compare speeds.
This is sick. I've been getting into programming and just rediscovered Blender and its awesome API (admittedly have no frame of comparison to Maya or Max, but IMO it's WAY WAY better than the web/mobile APIs I have experience with). I was thinking of making almost exactly this as I dig into more seriously learning to program.
Surprisingly, it's pretty varied, but Timsort and quicksort are pretty common in language implementations.
I don't know that people are reimplementing these in practice all that often rather than using std library but writing and comparing them was part of my earliest CS education at least.
People just use whatever their programming language provides. There's a concept of sorting "stability" in which equal elements stay in their original order relative to each other. If stability is important, then usually some variant of merge sort is used. If it's not, then some variant of quick sort is used. If the list, or sublist you're working with is small enough, insertion sort is used.
Do not use GIFs like this. Use a proper video codec.
(I’ve actually flagged this submission, because 120MB is far, far more than anyone reasonable would expect to be downloaded automatically by visiting a page, and expensive for some people—there have been multiple occasions for me in the past few years when it would have literally cost me around $10 to load the page.)