pointers.py
linked-list-good-taste
pointers.py | linked-list-good-taste | |
---|---|---|
37 | 12 | |
884 | 1,968 | |
- | - | |
6.6 | 0.0 | |
about 1 month ago | about 1 year ago | |
Python | C | |
MIT License | 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.
pointers.py
- Literally everyone here
-
Why doesn't Python have pointers?
Just wanted to leave this here, there is a third party module to bring the "hell of pointers" to python: https://github.com/ZeroIntensity/pointers.py
- 'tis the season
- i (mostly) mapped the entire cpython abi to python
- Trial by segfault
- Guess my favorite language based on my frustrated Python comments
-
Looking for cool python packages for kids
Pointers.py is always cool.
-
Im listening...
Oh yeah mb. Fuck pointers and this guy who tried to bring them in python
-
Python code running in the browser, using react-py
Reminds me of this dev who made a pointers module for python
-
What the hell is a "malloc"?
You're welcome
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?
Telebypass_bot - telegram bot to bypasses Linkvertise links
linkedlist - The first generic linked list in go :dancer:
macros.py - The hell of macros, just in python!
python-goto - A function decorator, that rewrites the bytecode, to enable goto in Python
discord.py - An API wrapper for Discord written in Python.
LinkedList - Basic data structure used to store data in computer's memory.
Microsoft365R - R SDK for interacting with Microsoft 365 APIs
FFmpeg - Mirror of https://git.ffmpeg.org/ffmpeg.git
searcher - Run a base query (plus optional add-ons) through ask, bing, brave, duck duck go, yahoo, and yandex.
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.
pylgbst - Python library for LEGO® PoweredUp devices
plusplus - Enables increment operators in Python using a bytecode hack