Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why #1

Open
TKIPisalegacycipher opened this issue Mar 11, 2022 · 14 comments
Open

Why #1

TKIPisalegacycipher opened this issue Mar 11, 2022 · 14 comments

Comments

@TKIPisalegacycipher
Copy link

Would you do this

@ZeroIntensity
Copy link
Owner

because why not?

@JesseTG
Copy link

JesseTG commented Mar 21, 2022

There isn't enough pain in this world.

@prkhrv
Copy link

prkhrv commented Mar 21, 2022

WHY?? I switched to python to avoid dealing with pointers.

@ZeroIntensity
Copy link
Owner

from pointers import to_ptr

to_ptr(19) <<= 21
print(9 + 10) # 21

@JesseTG
Copy link

JesseTG commented Mar 23, 2022

I'm sure there's some kind of regulatory agency for programmers, and as soon as I figure out what it is I'm going to report you to it.

@Delation
Copy link

from pointers import to_ptr

to_ptr(19) <<= 21
print(9 + 10) # 21

I understand why now.

@ldo
Copy link

ldo commented Jun 16, 2022

ctypes is cool, though. I have used it a lot.

Tip: I note with approval you have avoided doing “from ctypes import *” as per the documentation examples. However, I find continually typing “ctypes.this” and “ctypes.that” to be quite tedious. So I shorten it using “import ctypes as ct” instead. Then references become “ct.this” and “ct.that”.

@ZeroIntensity
Copy link
Owner

my ide was saying that doing from ctypes import * was illegal as wildcard imports from library wasn't allowed, so i didn't bother trying to hassle with flake8 or mypy which would complain about it later

@ldo
Copy link

ldo commented Jun 16, 2022

It’s not illegal, but minimizing namespace pollution is a good idea.

@NewbCooder
Copy link

The world cannot be at peace!! Hence we have pointers😂😂

@DexterAntonio
Copy link

Someone wrote a medium article describing how great this package is for writing faster code 😟. I'm sure this is being used in production somewhere.

@ZeroIntensity
Copy link
Owner

havent tried any benchmarks, but i doubt that this makes things any faster (other than c bindings, but that still has a lot of abstraction going on)

@tommyvo
Copy link

tommyvo commented Aug 18, 2022

Could this be used to implement linked lists?

@ZeroIntensity
Copy link
Owner

you can implement linked lists just fine without this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants