linked-list-good-taste
FFmpeg
linked-list-good-taste | FFmpeg | |
---|---|---|
12 | 486 | |
1,968 | 42,517 | |
- | 1.8% | |
0.0 | 10.0 | |
about 1 year ago | 3 days ago | |
C | C | |
MIT License | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
linked-list-good-taste
-
I wrote these short methods to remove a node from an unbalanced BST. Is it "bad style"?
I'm in a data structures course as an undergraduate over the summer. For practice, I made an unbalanced binary search tree class in C++ with search, insertion, removal. We were given pseudo-code for removal, but I noticed a lot of repeated logic could be used if I traversed the tree with a pointer to pointer to Node, and that it didn't need recursion. I saw the same logic as what's explained by "Linus Torvalds' linked list argument for good taste, explained", and I'm pretty familiar with it by now. My tree traversal about 40 lines of actual code, but about 70 lines with comments. However, I showed this to a classmate, and they couldn't follow it at all, and said that it seemed complicated. I'm also concerned because this logic isn't portable to any language that doesn't allow pointers to pointers, i.e. not in Java, Python, etc., only C, C++, and maybe Rust (I don't know if this is portable there).
-
What's the use of pointers-to-pointers?
One usecase I find kinda neat is for linked list algorithms. See https://github.com/mkirchner/linked-list-good-taste
-
Guess my favorite language based on my frustrated Python comments
Don't believe me? Check out Torvalds elegant solution to remove an item from a linked list using a pointer to pointer. This algo is unimplementable using references. https://github.com/mkirchner/linked-list-good-taste
-
So what should I use then?
Philosophically do-while should have very rare applications. Because as programmers our code should be as generic as possible. If the code is treating the first iteration as different it is by definition not as generic as possible. This is illustrated by how the example you provided creates a bug when n=1. Linux Torvald's linked list example is a famous one for how a special case is removed: https://github.com/mkirchner/linked-list-good-taste
-
Accessing the value of a double pointer to a list node
I'm struggling a little bit with double pointers here. I have a pretty simple personal linked list lib for ints and I'm experimenting with incorporating some of this "good taste" logic based off a TED talk given by Linus Torvalds.
- How's my Doubly Linked List?
- linked-list-good-taste - A deeper explanation on the code Linus Torvalds considers better for removal of an item from a linked list
-
Notation as an avenue for exploring zero-cost abstractions?
A couple of days ago this got posted to /r/programming : https://github.com/mkirchner/linked-list-good-taste
FFmpeg
-
Creando Subtítulos Automáticos para Vídeos con Python, Faster-Whisper, FFmpeg, Streamlit, Pillow
FFmpeg (https://ffmpeg.org/)
-
Show HN: CompressX, my FFmpeg wrapper for macOS, made $9k in the last 4 months
GPL2
Since FFmpeg is GPL2, doesn’t that require CompressX to disclose its source code?
IANAL, apologies if I miss understand license requirements.
https://github.com/FFmpeg/FFmpeg?tab=License-1-ov-file
- Microsoft offered FFmpeg one-time payment instead of support contract
-
Writing x86 SIMD using x86inc.asm (2017)
This turns out to be a lot of assembly macros to help write one x86 assembly. https://github.com/FFmpeg/FFmpeg/blob/master/libavutil/x86/x...
The sibling comment recommending compiler intrinsics is probably the best way to go for writing SIMD code. A mixture of `` style types and intrinsics to specify instructions is a solid 90% solution compared to assembly.
If you want that last 10%, I think macros are putting the emphasis in the wrong place. They're a somewhat easy way to build up a language abstraction which will work if held carefully, but I'm confident the dev experience using this abstraction when you write invalid code will be deeply confusing.
I would suggest to write a parser instead of the macros. That'll tell you clearly when the syntax is invalid (though possibly not with much precision) and it'll give you a place to put semantic analysis for where valid syntax encodes nonsense. Do the equivalent of the macro expansions on the parsed tree instead of on the text. Emit asm as the "back end".
-
Video Generation with Python
You might have heard of FFMPEG or ImageMagick for image and video edition in a programmatic way. MoviePy is a Python module for video editing (Python wrapper for FFMPEG and ImageMagick). It provides functions for cutting, concatenations, title insertions, video compositing, video processing, and the creation of custom effects. It can read and write common video and audio formats and be run on any platform with Python 2.7 or 3+.
- I want some logically difficult c programs
- Looking for a good file converter for upload testing
- Best Way to Rip Rare DVDs?
-
11 Ways to Optimize Your Website
There are many cloud-based tools and websites that can convert your images, but the problem with these tools is that you usually have to upload the files for them to be processed, and some of their services are not free. In this article, I'd like to introduce a piece of software called FFmpeg, which allows you convert the images locally with one simple command.
-
AI-assisted removal of filler words from video recordings
To run the demo locally, be sure to have Python 3.11 and FFmpeg installed.