Better HN
topnewbestaskshowjobs
Log inSign up

BiteCode_dev

24,628 karma · joined Oct 21, 2019 (7y ago) · 5,512 submissions

I write to save you time and effort when dealing with Python:

https://www.bitecode.dev/

Email: contact at bitecode.dev

Submissions

comment 4y ago · link · parent

Indeed, but:

- when declaring routing in code, it's harder to shoot yourself in the foot. So many php sites expose what they should not, and .httaccess is rarely crafted correctly

- renaming files don't change your website

- coding locally doesn't require apache if your tooling don't need it for routing. No need for stuff like EasyPhp

- python dev servers automatically reload for you on changes anyway

- declaring routes and parsing them at one place to get url id and slug is less duplication

- declaring url yourself mean you can use the language typing system for their checking too (see fastapi)

- I rarely need an entire file for one route endpoint, making 10 files for 10 enpoints that could fit in one is overkill

- wsgi servers like gunicorn will hapilly reload the workers when it receives SIGHUP in prod. No need to restart the master process manually.

- restarting a process every time mean you can't benefit much from nice python features like lru_cache, process/thread pools, connection pools, etc

- python is slow to start, cgi takes a toll

- it's easier to control the number of max workers that run an any given time

Honestly, even when coding in PHP I will use phpfpm (which is one long running process like python) and frameworks like laravel (in which you declare your routing).

I understand the desire for simplicity, and the one-file/one-route declaration is easy to get into. But if I want simple, I do a static website with a bit of client side JS, not need for a backend.

When I do need a backend, I much prefer long running workers and explicit route declaration.

comment 4y ago · link · parent

Just checked my phone:

- audible, work: I can access all previously downloaded books

- bitwarde and andotp: work

- sms, telegram and signal, work: I can access the full history

- countdown, alarm clock, click counter, work

- dynalist, work

- pi music player and vlc, work

- maps.me, organic map and osmand: work, as the maps are downloaded in advance

- firefox & chrome, work: I can access all the app menus and open html files

- podverse, spotify and netflix, work: everything I pre-downloaded is accessible

- twitter app, work. I can see all tweets previously seen and posted today

- pcloud and dropbox, work

- rbnb, work: my history is accessible

- K9 and yandex mail, work: I can access to all my imap inboxes

- oura ring, work: I can access my stats and history

- calendar, calculator, qt scanner, work

- gallery, explorer, home menu, settings: work

What doesn't on my phone:

- gmail, waze

- banks and cryptocoins appp

- stremio, youtube, and discord

comment 4y ago · link · parent

It's possible, you just have to accept that people will come and complain. It's not a big deal.

comment 4y ago · link · parent

It's not bad logic, it's an imperfect analogy which you are taking at face value instead of understanding the point that something can be useful even if infrequently used.

Wether or not it applies at this case is not determined, but it does underline the fact using only visit metrics for this particular page does not give the whole story.

Which is congruent with the reaction the announcement got.

comment 4y ago · link · parent

I've had a mastodon account for years. Not only you can't get a tenth of the audience or quality publications you get on twitters, but also there is less diversity.

A mastodon instance is often its own island, with one view of the world, and they don't connect to any other instances with a different view of the world because the others are intolerant assholes (but themselves are alright, of course). Ironic, given the protocol is made specifically to link instances together so that the network become more robust, and that people joined because it's a more open design than twitter.

On the other hand, Twitter that is full of trends, SJW, extremists of all sides and censorship, manage to send me toward new paths of thinking regularly.

comment 4y ago · link · parent

I love the github trending page, but I need only to visit it 10 times a year for it to fullfill its role. Yet I go to github every day.

So visits are not the proper metric to depict how useful it is. Just because I consult a doctor once a year doesn't make this appointment less useful than the pizza truck I go to every week.

comment 4y ago · link · parent

I love the trending tab, but I visit them only 10 times a month. It's enought for me to get the benefit of it.

I suspect lany use it this way. Obviously compared to other tabs, it's going to be very low traffic. But in this case, traffic is a bad metric.

comment 4y ago · link · parent

Don't know for all europe, but air france overbook all the flights Source: my father was working with the CEO.

comment 4y ago · link · parent

That's not the point of my comment. The point is that today we use those words without any notion of the scale they imply.

So they lost their meaning. To me it's the other side of virtue signaling, easy words to toss around to get an ego trip without having to think too hard about the nuances of the world. And you can only do that precisely because you live in a free society, because the people you are calling fascist will not kill you for doing it. Because you have the education to do so. Because you have the time and energie to do so. Because you are safe with the medium and your audience to do so. And because you don't have a fascist as a leader that is so obviously so dangerous that calling someone fascist on tweeter in comparison would make you feel stupid since it's so obviously dispropostionate.

The point is, the people doing that are immature, unexperienced, and use a word that meant to target the horrors and evil of this world to attack what are merely bad people.

It's not a political statment that they are making. It's a demonstration of how naive, ignorant and arrogant they are.

And it's an insult to people living with actual fascists every day, that one does from the comfort of their sofa where they can get food delivered and watch youtube video.

You can call someone fascist in a democracy, but then they must have in their political program the same thing as Mussolini or Hitler did. The burden is on the person to quote Main Kampf (which I doubt their read) or show similar live actions and show the parallel.

And it cannot be a single thing, it's a collection of ideas and behaviors. A racist or a pro life or somebody going to a book burning is not diserving the title. Because it's only one thing. Everybody is doing ine thing somebody else find terrible.

It's a very, very high bar to pass.

comment 4y ago · link · parent

What you are saying is that some OS are limiting you in what they let you do on non rooted deviced. Any desktop computer don't have this limitation, and pwa is not just about mobile.

It's about native vs a web app, in general.

comment 4y ago · link · parent

The overwhelming majorities of apps you use, you don't even notice you are using them. They are usually provided by the os by default, like the home screen, the alarm clock, the web browser, the network selector, the file browser, contact selector, text message sender, unlock screen... Most of them is cutstomised on one of my devices, but most users don't even think about it as software. It's just there.

None of them can now be pwa. Not event something as simple as the alarm clock because of the device going to sleep.

Some of them can be pwa but the experience is terrible on mobile: map apps and video apps are an example.

comment 4y ago · link · parent

I'm pretty sure __terminal__ AIDS is not easier to live than diabetes. In fact, it's probably not easy to live for long.

comment 4y ago · link · parent

> Anything CRUD

Not even true, if you want advanced features. Do you want sync over the local network? Nope, WebRTC cannot use Bonjour or Avahi to detect other peers without accessing the internet. Do you need your CRUD app to be able to accept parameters different configuration file granularity and from env vars? Forget about it, you don't have access to most of the FS, nor env vars. Do you need it to query a specialized database yet work offline (e.g: sig)? Shim over localStorage won't cut it. Do you need smart search, or completion? Better it not work with machine learning, cause as soon the network is down, you are on your own.

So you can do a CRUD in the sense of what microsoft access used to allow you to do. That's useful, but it's a far cry from what native can do.

comment 4y ago · link · parent

That's not listing wifi networks though, which requires access to the wifi card and the security keyrings, both things you can't do from a PWA because nobody want expose those things to the Web. Not to mention we don't have a uniform way of accessing those (check the python keyring library to see the different implementation).

comment 4y ago · link · parent

I'm pretty sure mining a empty rock from thousands of km away of 0.000000001 of its mass is less risky than mining the same thing in our backyard. Zero risk is impossible, but we know the risk of doing the things we do right now.

So unless you are willing to give up on the things that allow you to post this very comment on HN, the the building materials most come from somewhere. Better it come from the moon that the amazonia.

The option of not mining at all exist, but the chances that it happen are so low betting on it would be like hoping to win the lottery to pay for your hospital bill.

comment 4y ago · link · parent

Because you require deep integration with the OS for some tasks, and the browsers will always lag behind that.

How do you create a menu to select a wifi network from a PWA right now? Or a new driver for you graphic card? Or an equivalent to LittleSnitch?

You can't.

The only way it would be possible would be that browser, os vendors and standard commitees manage to formalize an API for every single OS behavior accross all major platforms, and do so every time something new appear on them.

This would require a level of resources and cooperation that simply doesn't exist. We already have a hard time cooperating of thing that accessing BT and USB which have been there forever.

comment 4y ago · link · parent

Honestly, if you mine only the dark side of the moon, people will never even notice. It's not like we are destroying any ecological niche, and the volume you remove is unlikely to be enough to influence moon gravity.

I think the dangerous part is political: who get the wealth out of the moon? That's going to be a heated debate.

comment 4y ago · link · parent

This comment can only originate from someone who has lived in democracy all their life.

Having travelled the world for most of my life, and saw dictatorship at work, I think a lot of HN and Twitter evil sensors need serious calibration.

It's like looking at somebody with diabetes and saying they have terminal AIDS.

comment 4y ago · link · parent

22C is not summer temp. It's spring temp.

Complaining about not sleeping well in the middle of a hot summer is very different from not being able to sleep at all in the middle of spring without an AC.

comment 4y ago · link · parent

What makes me scared about this is that it's immunosuppressive. The immune system is a very important part of the human body, and I worry that taking it could have terrible health impact after years of acting on your body lines of defense.

What can you tell me about it?

comment 4y ago · link · parent

Indeed, and they were outside more, which means more exposed to the weather.

Also food was different. I noticed that some food make my body temperature rise a lot, and that may play a role.

comment 4y ago · link · parent

Not sure about this, I'm 110 kg (242 pounds), and I sleep fine with temps up to 30C (86F). Higher than that is less comfortable, but not to the point of not sleeping. It starts to suck above 35.

I think it's more a about if you have lived with AC most of your life or not.

While being fat does mean I get more heat, I have witnessed drastic differences in body temperature adaptation that are independant of the weight of the person. Your ability to change your blood vessels dilatation, produce sweat, and work out your mitochondrias probably plays a big role, and I would imagine they are worse when you are overweight, and better if you lived in Africa or Canada.

comment 4y ago · link · parent

The entire world didn't have AC just a few decades ago and most people slept fine.

If in less than a century of introducing a tech your body becomes so dependant to it it impairs a critical body function if you don't have it, yes, it's a handicap.

comment 4y ago · link · parent

I converted it to celsius and just realized it means you can't sleep if the temperature is above 22C. IMO, that's a reaching the level of a physical handicap: it's a very mild temp.

comment 4y ago · link · parent

And Lincoln did a lot of damages to the slave-based economy when he championed abolition.

I almost went full Godwin point on this.

comment 4y ago · link · parent

The article is alarmist at best.

But it does point out one critical point: if you start using the whole ecosystem because of convenience, you may end up reliying on MS Codespace, and therefore lock yourself in.

The solution seems simple to me: don't put your entire stack in codespace. Make sure you can easily use your whole stack on your own computer, and migrate easily.

comment 4y ago · link · parent

I see the benefit in this, having one script that works everywhere.

It's also good to know linux has autokey (https://github.com/autokey/autokey) for the same result. The name is close, but it's a different project.

It's not compatible with autohotkey, but you can script using python. I used it to enter dates, emails and automatize dynalist.io actions.

comment 4y ago · link · parent

Never been there, what makes it mediocre ?

comment 4y ago · link · parent

Firefox, VLC, Signal, chromium, codium, veracrypt, ublock origin, bitwarden, ubuntu...

comment 4y ago · link · parent

Also, let's remind the author that quote next time he or she needs surgery: no aenestesia, ignorance is never better than knowledge.
1
899091
184