python-goto
linked-list-good-taste
python-goto | linked-list-good-taste | |
---|---|---|
8 | 12 | |
1,240 | 1,968 | |
- | - | |
0.0 | 0.0 | |
about 3 years ago | about 1 year ago | |
Python | C | |
The Unlicense | MIT License |
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.
python-goto
-
You Don't Need to “Learn” Svelte: Embracing the Simplicity of JavaScript
Goto is control flow. You can’t do control flow with function calls in the sorts of languages we’re talking about, so goto has to be built into the language, typically as a statement.
(In some of these languages you can do awful hacks like using hooks intended for debuggers <https://entrian.com/goto/> or rewriting bytecode <https://github.com/snoack/python-goto>, and frankly what Svelte does is quite similar, just implemented as a compilation step rather than at runtime.)
- after a launch on Reddit, the project only got 2 stars on GitHub. How is that even possible? The answer is the README isn’t flashy enough.
- So what should I use then?
-
Hacker News top posts: Sep 21, 2021
A function decorator that rewrites the bytecode to enable goto in Python\ (70 comments)
- A function decorator that rewrites the bytecode to enable goto in Python
- A function decorator that rewrites the bytecode to enable goto
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
What are some alternatives?
PySimpleGUI - Python GUIs for Humans! PySimpleGUI is the top-rated Python application development environment. Launched in 2018 and actively developed, maintained, and supported in 2024. Transforms tkinter, Qt, WxPython, and Remi into a simple, intuitive, and fun experience for both hobbyists and expert users.
linkedlist - The first generic linked list in go :dancer:
pex - A tool for generating .pex (Python EXecutable) files, lock files and venvs.
LinkedList - Basic data structure used to store data in computer's memory.
theatre - Motion design editor for the web
FFmpeg - Mirror of https://git.ffmpeg.org/ffmpeg.git
ruby-packer - Packing your Ruby application into a single executable.
Git - Git Source Code Mirror - This is a publish-only repository but pull requests can be turned into patches to the mailing list via GitGitGadget (https://gitgitgadget.github.io/). Please follow Documentation/SubmittingPatches procedure for any of your improvements.
plusplus - Enables increment operators in Python using a bytecode hack
zig - General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.
pointers.py - Bringing the hell of pointers to Python.