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

Why is it not just blocked in India? How come an American product, some of it is hosted on European servers cannot be reached in France?


The new generic syntax is great as well, the debugging improvements are handy and I do appreciate the new @deprecated. But 3.13 really shines, once again, with the improvement of error messages.

Now when you are a professional dev, you see them less and less, because you make less mistakes, but also because you heavily use tooling to prevent errors or diagnose them.

But if you observe beginners with modern versions of Python, it's quite magical really. The autonomy and confidence they get from those are huge.

The energy that Pablo Galindo Salgado injected into the culture of good error message has been a boon to the language.


Yes, because all the other people on HN use unlock origin.


Their own home page says their Hot reload on RSBuild is slower than Vite's.

Since I don't care if my build takes 1 second more (per their benchmark again), but I do care very much that the page refreshes faster when I do an edit, it's a hard sell.


I love Vite and I use Vite, but come on man, the values you are comparing are 50 ms vs 80 ms. They're the same from a practical standpoint.


This just benchmarks a small "hello world"-type demo app[1]. With larger apps it can become 500ms vs 800ms, or 1 second vs. 1.6 seconds. It's not really a very useful benchmark.

[1]: https://github.com/rspack-contrib/performance-compare


I just wrote a script that uses 2 ultrasonic sensors + 1 raspy to detect if somebody is moving in one direction, so that I can put that in a giant green tunnel at the entrance of a video-game-themed party next week:

https://0bin.net/paste/GrfAHJRt#oqVtar1pUzqtdCWWzvEEK71mNlcd...

When the person walks in the tunnel, it makes the sound of Mario when entering a pipe.

It does nothing else. It's for one night only, and nobody will ever use it again.

Meanwhile, it's setup in my bathroom, because it makes me giggle when I go.

It's the little things.

I do have a timing problem, as for now the sound is triggered no matter the direction I walk.

For the same party, I made a "loot generator". You scan a QR code, and go to a page that asks you to enter some info. Then it generates what your own cadaver would loot to heroes if they killed you. Used that as an excuse to try Cloudflare workers:

https://loot-generator.drax2industries.workers.dev/

(It's in French and can get pretty politically incorrect)

Again, it's one-time use software, mostly for drunk people to have a giggle. Then it will disappear like tears in the rain.

Last year, it was a light-speed effect on a fake spaceship cockpit:

https://www.bitecode.dev/p/light-speed-with-python-and-js?ut...

Ephemeral software for the fun of it.


>> the sound is triggered no matter the direction I walk

if you use it in a bathroom, the easy fix would be to only trigger sound on odd detections. Unless you are in the habit of going in a bathroom with company or if there is another way out of the bathroom.

Your projects look like they bring delight into this world!


In the party, it will be used at the main entrance, but there will be multiple secondary ones so it won't work.

What I need to do is to move my ass and fix the timing.


Python can actually do this using "# coding:", albeit less elegantly than lisp.

I would say it's a good thing, I don't want to see a hundred of half baked, badly tested and vaguely document DSL with no decent tooling support.


That's probably an argument for a language with good DSL support.

When this comes up I usually link to the work of Alan Kay and others (the very mystical sounding STEPS project at VPRI)

""" The big breakthrough is making it easy to create new DSLs for any situation. Every area of the OS has its own language (and you can just add more if you feel the need) so that the whole OS including networking and GUI is very compact, understandable, and hackable. This particular project focused on compactness, just to prove that it is quantitatively more expressive. """

comment by sp332 https://news.ycombinator.com/item?id=11687952

final report from 2016 https://news.ycombinator.com/item?id=11686325


Can you provide some more info / links regarding the “# coding:” feature? I wasn’t able to find anything.


Codecs (https://docs.python.org/3/library/codecs.html) can change the content of the file on the fly. You can abuse that to create new syntax, although it is evidently not the original intent.

Let's say you hate significative spaces, here is a (very fragile) PoC for your pain:

https://0bin.net/paste/42AQCTIC#dLEscW0rWQbE70cdnVCCiY72VuJw...

Import that into a *.pth file in your venv, and you can then do:

    # coding: braces_indent
 
    def main() {
        print("Hello, World!")
        if True {
            print("This is indented using braces.")
        }
    }
You also can use import hooks (python ideas does that), bytecode manipulations (pytest does that) or use the ctypes module (forbiddenfruit does that).

Still, I'm very happy it stays limited to super specific niches. Big power, big responsibilities, and all that.


The idea is you can register a custom file encoding, analogous to built-in file encodings like utf-8, and use it to transform the source file before python loads it. An example is pyxl, kind of like jsx, where you put `# coding: pyxl` at the top and then it will transform bare `<html>` in the python file into calls to a template builder: https://github.com/gvanrossum/pyxl3

Incidentally this turns out to be super hard to search for without asking an LLM, since "python coding" is so overloaded, and using the feature this way is intentionally undocumented because it's not really what it's for, and not something I think most python users really want to encourage. So, forbidden python knowledge!


It's specified in PEP 263 [0] which pulls up easier on search if you quote it and include the typical "special comment symbol" -*- around it.

[0]: https://peps.python.org/pep-0263/


If you place `# coding: utf-8` on the first line of a Python script, it'll try to interpret the raw bytes contained later in the file by passing them through a relevant codec[1]. Since the codec receives the raw source and transforms it before any interpretation happens, you can (here's the point I'm starting to guess) supply a codec that parses the code, transforms the AST, and dumps it back to the source for execution. It would be similar to how "parse transforms" work in Erlang, though there you're handed AST and not bytes.

[1] https://docs.python.org/3/library/codecs.html


>how "parse transforms" work in Erlang, though there you're handed AST and not bytes.

Oh, I didn't know about this. Was thinking about doing something similar in my own language, so I'll have to check that out.


Continuous inflation without raised salaries means exactly the opposite of this.

I ran a python script the other day using the French state data on pricing. Minimal wage was about 1000 euros after tax in 2003, and is 1300 in 2023. But 1000 in 2003 is about 2300 euros in 2023 according to the same official data.

I don't know a single vital thing in my life that is not more expensive now than when I was a kid: food, water, energy, shelter, clothes, health... They are all more expensive.

Now sure, internet access is less expensive and better, but you can't eat wifi.


Why would one expect those things to not be more expensive? Governments explicitly and intentionally manipulate currency so that prices (overall) are on an upward march.

Also, comparing changes in income deciles over time would be more useful than minimum wage changes, as legislatures are not necessarily reacting in real time.

> food, water, energy, shelter, clothes, health

Many of these are things where technological advances resulting in greater and greater economies of scale plateaued, or where technological advances mean that your expectation of the quality of goods or service greatly increased.

The former would be water/energy/shelter/food/clothes. The world has a lot more people competing for these resources, but there was no commensurate increase in supply.

The latter would be health, where the healthcare from your childhood is a greatly different product (at the advanced levels, not necessarily the routine checkup or flu visit).


Given that prices for health in the US are exorbitant because they are based on the free market and the prices in France much cheaper (even when you pay 100% of of pocket) because the market is state controled, I have a hard time to take your comment seriously.

But I'm sure you will find a reason while health is an exception.


We'll never know if prices would be exorbitant under a free market in the US because we've got a nasty mix of corrupt insurance companies, healthcare administrators, and political lobbying (bribery) keeping it from being a free market. Generally we can't even ask the price of a procedure with which to compare providers, and for most insurance, you can't even choose your provider anyways. Does that sound like a free market to you?!?

As the other poster pointed out: Your logic is flawed because your premise is wrong. If the US had state controlled medical, I have no doubt our politicians would figure out some way to ruin that too.


> But I'm sure you will find a reason while health is an exception.

Pretty easy to find an exception when you start with a false premise.

> Given that prices for health in the US are exorbitant because they are based on the free market


Unchecked capitalism trys hard to turn into feudalism.


France, a state with famously unchecked capitalism bordering on libertarian anarcho-capitalism.


Why something so strong and not melatonin?

Real question, never tried any.


Melatonin isn't a sleep drug. It's something your brain makes naturally at the end of the day when it gets dark etc. As I understand it, it's part of your bio clock and is not much more than your brain telling your body it's time to go to sleep. But if you're on a plane and you're nervous about flying, you won't fall asleep any more than in any other situation where you're nervous and not lying in your bed. You don't necessarily need something stronger, you need something different.


I am sorry, melatonin doesn't really do anything. It might give some the extra "kick" to fall asleep in a relaxed situation at home, but it definitely is not useful for "I need to go asleep while being pretty wound up" which is what people are talking here.


One not-oft-mentioned thing melatonin seems to do (at least in my own experience) is that it cancels out the effects of earlier-consumed caffeine in preventing sleep. So if you're overtired and awake only because of caffeine, melatonin will put you out pretty quickly.


Specifically, whitelisting the URL for the bot protection, but not the cache, so that you are still somewhat protected against adversarial use.


An adversary can easily send no-cache headers to bust the cache.


The CDN can choose whether to honor those. That hasn’t been an effective adversarial technique since the turn of the century.


does cloudflare give such an option? Even for non-paid accounts?


They ignore request cache control headers, I believe unconditionally so you’d have to disable caching for the endpoints which clients are allowed to request uncached.


Cloudflare is a fantastic service with an unmatched value proposition, but it's unfortunately slowly killing web privacy, with 1000s paper cuts.

Another problem is "resist fingerprinting" prevents some canvas processing, and many websites like bluesky, linked in or substack uses canvas to handle image upload, so your images appear to be stripes of pixel.

Then you have mobile apps that just don't run if you don't have a google account, like chatgpt's native app.

I understand why people give up, trying to fight for your privacy is an uphill battle with no end in sight.


> Then you have mobile apps that just don't run if you don't have a google account, like chatgpt's native app.

Is that true? At least on iOS you can log into the ChatGPT with same email/password as the website.

I never use Google login for stuff and ChatGPT works fine for me.


See other comment.


The privacy battle has to be at the legal layer. GDPR is far from perfect (bureaucratic and unclear with weak enforcement), but it's a step in the right direction.

In an adversarial environment, especially with both AI scrapers and AI posters, websites have to be able to identify and ban persistent abusers. Which unfortunately implies having some kind of identification of everybody.


No, it's more than that. Cloudflare's bot protection has blocked me from sites where I have a paid account, paid for by my real checking account with my real name attached. Even when I am perfectly willing to give out my identity and be tracked, I still can't because I can't even get to the login page.


They block such visits because their pragma suspects that your visit is the account of a real human that was hacked by a bot.


You notice that Analogue Devices puts their (incredibly useful) information up for free. That's because they make money other ways. Ad supported content farm Internet had a nice run but we will get on without it.


That's another problem, we want cheap easy solutions like tracking people, instead of more targetteed or systemic ones.


> The privacy battle has to be at the legal layer.

I couldn't disagree more. The way to protect privacy is to make privacy the standard at the implementation layer, and to make it costly and difficult to breach it.

Trying to rely on political institutions without the practical and technical incentives favoring privacy will inevitably result in the political institutions themselves becoming the main instrument that erodes privacy.


Yet without regulation nothing stops large companies from simply changing the implementation layer for one that pads their bottom line better, or just rebuild it from scratch.

If people who valued privacy really controlled the implementation layer we wouldn't have gotten to this point in the first place.


The point we're at is one in which privacy is still attainable via implementation-layer measures, even if it requires investing some effort and making some trade-offs to sustain. The alternative -- placing trust in regulation, which never works in the long run -- will inevitably result in regulatory capture that eliminates those remaining practical measures and replaces them with, at best, a performative illusion.


> Then you have mobile apps that just don't run if you don't have a google account, like chatgpt's native app.

That's not true, I use ChatGPT's app on my phone without logging into a Google account.

You don't even need any kind of account at all to use it.


On Android at least, even if you don't need to log in to your google account when connecting to chatgpt, the app won't work if your phone isn't signed in into google play, which doesn't work if your phone isn't linked to a google account.

An android phone asks you to link a google account when you use it for the first time. It takes a very dedicated user to refuse that, then to avoid logging in into the gmail, youtube or app store apps which will all also link your phone to your google account when you sign in.

But I do actively avoid this, I use Aurora, F-droid, K9 and NewPipeX, so no link to google.

But then no ChatGPT app. When I start it, I get hit with a logging page to the app store and it's game over.


I have a similar experience with the pager duty app. It loads up and then exits with "security problem detected by app" because I've made it more secure by isolating it from Google (a competitor). Workaround is to just control it via slack instead.


Well you can use the web base chagpt so there is a workaround. Except it's worse a worse experience.



That won't make chatgpt's app work thought.


It might well do, depending on what ChatGPT's app is asking the OS for. /e/OS is an Android fork that removes Google services and replaces them with open source stubs/re-implementations from https://microg.org/

I haven't tried the ChatGPT app, but I know that, for example my bank and other financial services apps work with on-device fingerprint authentication and no Google account on /e/OS.


I already have microg installed.


So the requirement is to pass the phone’s system validation process rather than having a Google account. I don’t love that but I can understand why they don’t want to pay the bill for the otherwise ubiquitous bots, and it’s why it’s an Android-specific issue.


You can make a very rational case for each privacy invasive technical decision ever made.

In the end, the fact remain: no chatgpt app without giving up your privacy, to google none the less.


“Giving up your privacy” is a pretty sweeping claim – it sounds like you’re saying that Android inherently leaks private data to Google, which is broader than even Apple fans tend to say.


A person who was maximally distrustful of Google would assume they link your phone and your IP through the connection used to receive push notifications, and the wifi-network-visibility-to-location API, and the software update checker, and the DNS over HTTPS, and suchlike. As a US company, they could even be forced to do this in secret against their will, and lie about it.

Of course as Google doesn't claim they do this, many people would consider it unreasonably fearful/cynical.


Sure, but that says you shouldn’t have a phone, not that ChatGPT is forcing you to give up your privacy.


> it sounds like you’re saying that Android inherently leaks private data to Google, which is broader than even Apple fans tend to say.

Yes? I mean, not "leaks" - it's designed to upload your private data to Google and others.

https://www.tcd.ie/news_events/articles/study-reveals-scale-...

> Even when minimally configured and the handset is idle, with the notable exception of e/OS, these vendor-customised Android variants transmit substantial amounts of information to the OS developer and to third parties such as Google, Microsoft, LinkedIn, and Facebook that have pre-installed system apps. There is no opt-out from this data collection.


Google and Apple were both part of the PRISM program, of course I'm making this claim.

That's the opposite stance that would be bonkers.


PRISM covered communications through U.S. company’s servers. It was not a magic back door giving them access to your device’s local data, and even if you did believe that it was the answer would be not using a phone. A major intelligence agency does not need you to have a Google account so they can spy on you.


Forest for the tree.

Google and Apple are both heavily invested in ads (apple made 4.7 billion from ads in 2022), they have a track record of exfiltrating your data (remember contractors listening to your siri recordings?), of lying to the customers (remember the home button scandal on iPhone?), have control over a device that have your whole life yet runs partially on code you can't evaluate.

Trusting those people makes no sense at all. You have a business relationship with them, that's it.


It’s interesting how each time you say something which isn’t accurate you try to distract by changing the topic.


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

Search: