Hacker Newsnew | past | comments | ask | show | jobs | submit | more BiteCode_dev's commentslogin

Yeah, and didn't seem reluctant at all at the time.


they just shrugged back then

"But calibrating that response raises questions of principle, practice and priority. Businesses will go their own way. Some, such as PayPal, Visa and MasterCard, which handled donations to WikiLeaks, and Amazon, which provided web-hosting services, have dumped it as a customer in response to American outrage. More may follow. They risk attacks from its fans, just as those that refuse face hostility from their customers in America. Too bad: business is full of hard choices."

https://www.economist.com/leaders/2010/12/09/the-right-react...


I remember this whole thing. No one was ever reluctant! It happened pretty quickly.


Every single time there’s a HN discussion about censorship and I comment about how we shouldn’t be okay with censorship of anyone regardless of how offensive they might be or whether or not it’s some private corporation and usually it gets downvoted. When the wind starts blowing the opposite direction, only then do people wake up.


So you demand freedom for all ... except those that are using their freedom in the way you dont like.

For the avoidence of doubt, I am talking about the freedom to not have someone in your house / your company platform.


No, they demand a principled balance between the two freedoms, that's independent of the content of the speech. What you're talking about is what's status quo - freedom for private businesses to not serve someone, except when it contradicts certain narratives, at which point it becomes a national news story about bigoted business owners.


Saying the balance should be predicated on ignoring the content of the speech makes sense only if speech itself was a pure function without side-effects, only if saying something truly had no other consequence than it being said can we safely ignore the content.

But the precise content of speech is exactly the part that matters! If a death sentence is read out aloud in verse, or just sent in via a short text message (that is via two very different types of speech) is clearly not very important if the end result in either case is an aid worker being blown up with a Hellfire. Speech very often triggers actions, to ignore this fact is to state nothing may be prevented because judgment is only possible by examining actions committed to reality.


> we shouldn’t be okay with censorship of anyone regardless

That is not a balance, that is an absolute position in favour of one side of the coin ... regardless


The "balance" is based on something that, while explicitly stated, you somehow disregarded: that some--and, by and large, the current legal landscape--considers the freedom of speech right of the platform to censor people, and so to obtain "anyone can say anything" we have to take away "the freedom to not say something"... which we actually already do in various instances (often involving protected classes) and so, personally, I consider that to be a tractable goal to regulate: some things are "utilities" or even "quasi-governmental entities" and should be forced to be something like a common carrier.


So, if i would manage to besiege the city of rome, conquer it and declare the forum romanum mine, and to throw out all the romans. Does that make writing "Romanes eunt domus" an act, that forbids you forever the usage of my conquered streets? M i the conqueror allowed to sentence a citizen to house-arrest, by defining social negative space?


You are as free to forbid the speech as those are free to make the speech.


Social media companies which are actively working with the government to censor opposing view points while also enjoying legal immunity from lawsuits. You think there’s a fair balance of “freedom” here? Should telecom/electricity/railroads also get to ban whoever they like? Did you support net neutrality?


The false equivalence here between your house and your company platform is so ick.


I take it you dont believe them to both be private property?


A home can't take credit card payments.


Every single one have fake data, guaranteed. I have yet to see a public facinh site I worked on that didn't have some fake data.

Some outrageously fake, like x10 times the user count.


Unfortunatly you often can't use -o because of the 3rd party libs that didnt' get the memo and use assert for error checking.

We still have -X dev and sys.flags but it's runtime only.


Unless I'm misunderstanding, they are wrapping their asserts in try/catch blocks? That's... yikes.


Most likely they just `assert` error conditions and let that blow up as error reporting, rather than write a full conditional and raise a custom exception.

I’ve been guilty of that in my own code when I just want to tell myself about an error.


Isnt just assert the error condition how assert is actually intended to be used?


Depends. The issue is that since `assert` is stripped out in “O” mode, if the codebase depends on `assert` for correctness… they’re not compatible.


What do you mean by depends on assert for correctness? How?


    get_president_inside_bunker()
    assert president_is_inside_bunker()
    close_bunker_doors()
    assert bunker_doors_are_closed()
    send_nukes()
With asserts enabled this is fine. With asserts disabled you might start sending nukes while the president is still outside or the doors to the bunker are still open.


Thanks! I never thought anybody would do such a thing.


No one should, but it happens.


Care to name any 3rd party libs in particular?


Nope, I just remember my server crashing years ago so I stopped ever since.

Would be interesting to scan pypi and check if this is still a thing.

Maybe create a bot warning lib authors.


Seems like a better idea would be to make a separate flag "--remove-assertions" for people who desire that.


"-o" is mostly "--remove-assertions" already, so that wouldn't help.

While today's use case for assert is unit testing, the actual killer feature of the keyword is that it's removed only from prod.

The idea is that you can write things like function contracts, that are expensive, but only exist in dev.

Now, if one of you dependencies use assert for something they expect to still be in prod, which is the problem we are talking about in the first place, "-o" or "--remove-assertions" will strip their assert too, breaking their code, and hence, yours since it depends on it.


Before this thread i had no idea assert was debug only in python.

Another solution would be to accept the current role of assert as quick error checking and add in debug_assert to indicate a conditional error check. The biggest issue with that approach is that a majority will suddenly ask "Wait, python has a debug mode?"


Not because the -o mode also remove any block testing on "__debug__", and that's a very useful thing as well.

The original feature is perfect. But there is 5 good years of educating users so it can be used.


I still do not understand what the problem is and what users need to know. So assert throws and exception in debug mode and is 'commented out' in production, right?

So the problem is some vendors ship libs that have failing asserts so cannot run in debug mode?


Starlette, SQLAlchemy.


Django Rest Framework.


It's pretty well done, I almost forgot I was in my shell, and when the games gets to "tree to map the dungeon", I was almost surprised I didn't think about it before: I felt like playing a game, not coding in bash :)


It's fun and probably useful, but Python is not 30 times slower than lua (from 33s to less than a sec).

The 2 codes don't do the same thing, if you perform the same computation on the python code (monochrome mandelbrot, inline loop, 49 iterations, etc), you get 0.8 vs 4.8 sec, which seems about right.

I've removed numpy since it's cheating if we compare raw language perfs:

https://0bin.net/paste/nOtLmeMA#0DKGHSvmgoDLPzHlQOhwvVhxxayf...

So yes, Python is about 6 times slower. Significative, but can be worth the compromise if you consider the Python version is much, much easier to read.

And of course, a vectorized algo would be even faster (see pbourke's comment).

What's more, with SharedMemory from 3.8, you could speed that up even in pure Python using multiprocessing by sharing efficiently the array.


The supported python version:

    >>> import tkinter as tk
    >>> tk.Tcl().eval('puts {hello, world}')
    hello, world
    ''
I wonder if this releases the GIL.


Yeah if you see a for loop on a numpy array in a code base, it's game over.


Those those who wonder how it can make it faster since it's using threads and Python has the GIL, numpy releases the gil while doing computation, so thread can actually use multiple cores if you speed most of your time in numpy world.


For this code we can also easily try the process executor instead of the thread executor - then we avoid the GIL. In this case, it has an approximate 10% performance penalty, probably since we have to serialize data back and forth, can't share memory.


You can since 3.8 :)

https://docs.python.org/3/library/multiprocessing.shared_mem...

If you use a data structure that supports the buffer protocol (such as a numpy array), you won't even pay a serialization cost.

Python has made a LOT of progress, concurrency wise. Between asyncio, process pools, threads releasing the GIL and shared memory, you can get much perfs with the stdlib alone.

Then of course you have Dask if you need more later.


Yes, I'm hoping the latest MS effort on speeding up Python will also tackles that.

The JIT effort is great, but projects like mercurial had to hack lazy import because they are so slow in python.

I wish this can be baked in the language some day: loading half the stdlib to run hello world is not very efficient.


And because the users let it.

Most of the people on HN shared the issues about Facebook with relatives, only to get a polite smile at best.

People don't care. They are OK with it. They are consenting victims.


They can't be a victim if they are consenting (aka, knowingly accept the harm because they figured the trade-off is worth it).


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: