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 6y ago · link · parent

If you don't have typing, you'll have this problem too.

comment 6y ago · link · parent

The title makes it look like the problem comes with the "~username" URLS naming scheme, while it really comes from any features that let the user host static files they upload AND link somewhere else on your website.

The site take the example of apache mod_sites, but alone it's not enough. You need apache mod_sites, and the ability inject a link served by it somewhere else.

Well, yes. If you let user input anything and then inject it anywhere in your website, it's a security whole. Not a surprised.

So if you let your users host entire application on your website, and let other users of your website visit those applications. Well, I mean, sure it's a problem.

The best sandbox is the one you don't need to use.

comment 6y ago · link · parent

Yeah but then, do you want "whimsy" in sensible articles like political/religious/ethical related ones? Then would one expect wikipedia editors to enforce this policy on top of the work they already do? And using what criteria?

comment 6y ago · link · parent

I haven't played the game, but if it's well designed, there is a reason for that, and some level down the road will depend on this mechanism.

comment 6y ago · link · parent

Seconded.

Half of the pleasure of "baba is you" is to discover it. The game assumes this perfectly, and is actually structured to make that discovery part of the gameplay: it's incremental, pleasant, and it surprises you in good ways.

I sometime even laugh at the way the game designer played with me. With one specific block present or missing. With one rule you didn't know about, or didn't think about that way. It's communicating playfulness without a having to say a word.

This game is a beautiful thing.

comment 6y ago · link · parent

With the new dev ops crave, we expect people to understand backend dev, and front end dev and design and sysadmin and networking and project management and infra and product ownership. Not to mention be proficient with tools related to those things.

The result is not people getting experts at all those things, but getting capable of producing something with all those things.

Obviously, to do so, people must take shortcut, and container ~= docker ~= "like VMs, but lighter" is good enough as a simplification for producing something.

Now there is something to be said about the value, quality, durability and ethics of what is produced.

But that's a choice companies make.

comment 6y ago · link · parent

What space do you take ?

comment 6y ago · link · parent

That depends of the scale.

See ansible and the YAML config files.

In this case, a real language would have been a better choice.

Also, sometimes you need to generate config files. In that case, templating is not always a good choice.

comment 6y ago · link · parent

Humans have the tendency to think they understand something if they have a label on it. It helps them take decisions faster, whether it's good or bad.

If you tell people you don't know what causes their respiratory illness, they may think you are incompetent, and feel helpless.

If you tell them they have acute bronchitis, suddenly they feel empowered. It just means they have an inflammation of the bronchi. It says nothing of the direct cause, nor the indirect cause: a virus, tobacco, dust, air pollution or asthma. It says nothing about how bad it is. They don't even know really what it implies for their body or their treatment.

But now they think they know.

Call something a democracy, and nobody will check if it is.

Call something a privilege, and people will start to want it, working hard for it.

Models can be used to help your interact with the world. But they are also used to avoid interacting with the world: if you use them as labels, instead of comparing the model with reality, you get a shortcut to take decisions. It becomes a mere name to justify a decision process instead of a tool for the decision process.

comment 6y ago · link · parent

Stremio and popcorn time. It's netflix for torrent. No popups or animation. I think there is one banner somewhere, but it's so discrete I don't even remember.

comment 6y ago · link · parent

Problem is, that's how they get away with everything.

They fix nothing, then wait for somebody to need them enough, or have compassion enough to handle their mess.

Basically here, they are saying: we didn't listen to all those competent people that told us we should have cleaned this system a long time ago because one day it will bite us back. We didn't think technical debt was a thing. It has always worked. And it's virtual. And IT is always exaggerating anyway.

Now it does bite them back, and do they take responsibility ?

No. They ask for competent people to have mercy and save the day because the situation is dire. Because this is special this time, unlike the other times.

This is completely not like with the health care system that never got fixed and now the medical personal is paying for it so that the people don't suffer as much from this mismanagement.

They will not pay more. They will no fix anything. They will not respect you more, change the way things are done, or take any responsibility for this. And in fact they will probably guilt trip you into give up your health to overwork on this with less resources and for less pay because it's an emergency.

A friend of mine works in an hospital right now. She has been at work for 15 days straight. They already told her she won't get paid for the days she was not supposed to work but did.

Then as a final fuck you, if this turns out ok, if the catastrophe is avoided, they will get the reward.

The nurses or the programmers ? They will be forgotten in a week. Nothing will change.

But for the mismanagers, their superior will thank them for managing this situation well. They may even get promoted and have more responsibility.

So you have the choice between saving the money of poor people now and reinforcing the suck of the whole system, of letting people suffer for a chance of a redo and purging the ones that lead to this.

This is a terrible choice to have to make.

Especially since we have the empathy to make us discuss this, while clearly they don't.

comment 6y ago · link · parent

If you write a project, you probably won't change the database. But you may add new data layer services such as a cache backend, a search engine with, a secret server, a session store, a permission micro service, etc. They will all interact with permissions and change where you source the data from.

Then there is the case where you don't write a project, but a lib. Or the case where you extract such a lib from a project. In that case, you limit the use case of your lib to your database. Because if you don't change database during your project life time, the users of your lib may start a new project with a different database.

This is why Django ORM allowed such a vibrant ecosystem: not because it allows changing the data base of one project (although it's nice to have and I used it several times), but also because it allow so called "django pluggable apps" to be database independant.

comment 6y ago · link · parent

> Development and unit tests for these functions is as easy as plain Javascript.

Since most popular product in the JS world are product to avoid writing Javascript (webpack+babel, typescript, coffeescript, jsx, etc), and plv8 supports non of that nor does it support standard unit tests framework like Jest, I'm not convinced.

To make things even worst, remote debugging is not supported anymore: https://github.com/plv8/plv8/issues/131#issuecomment-2377111...

comment 6y ago · link · parent

> it is cached, in the database’s memory, where the cache can be invalidated automatically. It is better to cache views than data anyway.

The cache may not be for the data in the data base, but for something else (task queue, calculation, user session, pre-rendering, etc). You effectively split your cache into several systems.

> it is portable to every platform postgres runs, which in practice means it will run everywhere. Portability between databases is overrated because it rarely happens in practice.

As I mentioned, for a project it doesn't matter. For a lib it does.

> the access control logic evolves together with the schema, guaranteeing they have an exact correspondence. This is a good thing.

Not always. Your access control logic could be evolving with your model abstraction layer, which frees you to make changes to the underlying implementation without having to change the control logic every time. It's also a good for your unit tests, as they are not linked to something with a side effect.

> integration tests should involve a live database

Integration tests are slow. You can run them as you develop.

> Have you looked at jetbrains datagrip?

It's fantastic. If you are willing to pay the price of it for and force it on your entire team. If you are on an open source project, will your expect that from all your contributors ?

High barrier of entry, with no modularity. Linters, formatters, debuggers, auto-importers, they all depend on that one graphical commercial product that is not integrated with your regular IDE and other tools.

Not to say it's not a good editor if you do write a lot of SQL, as JetBrains products are always worth their price.

comment 6y ago · link · parent

Somebody is above the legal department. That person doesn't care that the department is important or not, only that it's useful.

So how does that happen ?

comment 6y ago · link · parent

But that also means that:

- the code is not reusable outside of a database setting. So not cacheable.

- the code is not reusable accross different storage layers. So not portable.

- the code may needs updating if the schema change, you can't abstract that

- changing the logic means a db migration

- testing the code requires a DB

- tooling support to check that code si limited to SQL tooling, which is very weak, especially for code completion, refactor and debugging.

That's a lot of constraints for just making the application logic a lot simpler.

comment 6y ago · link · parent

You make the mistake a lot of geeks does, thinking it's a technical problem. It's not.

You can have the best tech in the world, if the state is against you, if laws are against you, if society is against you, you'll only have scraps of a life.

It's all about people caring. Because only the mass of human can oppose anything. The rest are just sparks.

And you can state "do care about anonymity and privacy" as much as you want. Words don't matter. Actions do.

And people are still putting their entire life willingly on Facebook.

comment 6y ago · link · parent

>that python is not that complicated to install

This is not the instructions to install Python.

Those are the instructions to teach anybody in any OS with any configuration to install python and deal with 3rd party dependencies.

E.G: if you are a Windows 10 user, instructions to install python are 2 lines:

- install from the store

- run "py -X.Z" to start python

The complication comes when you have people with Windows, and Mac, and Linux, and they already have some Python installed in various ways, and then want to install stuff with pip, etc.

Which is true for Ruby, JS, PHP, etc.

comment 6y ago · link · parent

This is not the instructions to install Python.

Those are the instructions to teach anybody in any OS with any configuration to install python and deal with 3rd party dependencies.

E.G: if you are a Windows 10 user, instructions are 2 lines:

- install from the store

- run "py -X.Z" to start python

That's it.

The difficulty is to have general instructions for all cases, including packaging. Which is a problem with every scripting languages.

comment 6y ago · link · parent

Rust management system is first class because the language has been designed from scratch 10 years ago.

Python has been around since 1991. It came out before installing dependencies from internet was a thing. It had support for Windows XP, Atari, Solaris. You gotta be able to pip install stuff that are written in C (numpy) or in Fortran (scipy). It had been implemented in the JVM, .net, and Python itself using pypy.

All those years, what we knew about or needed from packaging system changed, and the tooling followed. We had easy_install, then setuptools, then distutils, then distutils2, the pip + setuptools again. We had virtualenv, then venv.

You cannot break from the past easily, especially on such a popular language, with half of it's user not even being devs.

comment 6y ago · link · parent

Because conda and other tools don't mix.

If you only use conda, it works.

If you start to pip install or use venv, it will break at some point.

comment 6y ago · link · parent

There has been a long debate about it between core devs, pypa members, conda CEO and a few key elements of the community recently.

The conclusion has been that:

- distributing story is handled ok, but distributing program is not.

- python has some unique problems due to its popularity, diversity of user base and long history

- the py command should be available everywhere

- communication on best practices is lacking, and people mixes project deployment, dependency management, lib packaging and program distribution

- the way python deals with imports is the root of all evils, not the packaging system, which actually is a consequence of it

The best course of action to take is still not clear though, as creating yet another layer on top of the mess is probably not the right thing to do.

comment 6y ago · link · parent

I've been tasked to make a PR for the pypa website with something like this. If it doesn't get merged, I'll still have a copy of it to some website as a single page. I bought usepyhton.info for this purpose, since pyformat.info did a great job.

comment 6y ago · link · parent

Given none of them are used outside of their specialty, no.

For Python, it's the reversed: it's used everywhere, except for a few topics.

It's the only scripting language like that.

comment 6y ago · link · parent

Yes. Now what are you going to do about it?

Nothing.

Because alone you can't.

And the others not only won't help you, but their actions will hinder yours.

Because they don't care.

Are you going to educate them?

Here is a list of all the people that did that: https://en.wikipedia.org/wiki/List_of_whistleblowers

Most of them got their life ruined.

Nothing changed.

Because nobody cares.

Educated people have been repeating "don't put things on facebook", "use free software", "gov is spying on you".

The answers have been "I don't have anything to hide" and "you are paranoid".

Because nobody cares.

You can craft the best technological solution to that, if nobody cares about it, nothing will happen.

You can give the best information, if nobody cares, nothing will happen.

You can provide the most secure thing, if the competition gain an advantage from not doing it and you gain nothing, you will lose.

And deep inside you know that because:

1 - you are using a throwaway account

2 - you don't provide any solution to the problem

The situation is exactly the same as with all other topics where we gain a lot of comfort individually to do the wrong thing collectively.

Did we slow down global warming? Didn't we prevent 60% of the insects from disappearing? Did we stop delegating slavery to asian countries? Did we even stop buying from all those companies that enrage us in the news?

Nope.

comment 6y ago · link · parent

All of them. See PRISM and XKeyscore.

comment 6y ago · link · parent

Well, not pip and venv. It's provided on windows and mac automatically. venv forces you to chose the version of python. venv doesn't care if you are in project mode or not. IDE integration is great.

comment 6y ago · link · parent

Well, with the covid 19 confinement, I'll give training remotely. So if you know companies that need their IT department trained in anything Python (intro, senior, syadmin, API design, flask/django, numpy/pandas, etc.), think about me :)

comment 6y ago · link · parent

Thanks. Fixed.

Being stuck at home, I currently give training remotely. If you know people that need trained in anything Python (beginner, advanced, scripting, architecture, web, data analysis, etc.), think about me :)

comment 6y ago · link · parent

Phone calls, emails, and text messages don't have e2e encryption, and we have been using them for 40 years. We are still using them.

Nobody cares.

The USA communications are under constant mass surveillance, by a group of people that denies it, abuses it, uses secret courts to rule about it even when unconstitutional, coerce others to submit every data and shut up about it, and destroy the life of whoever point finger at it.

And people still don't care.

Good luck with telling people that are recording their entire life on facebook, snapchat and tik tok to be mindful about the tools they use.

1
170171172
184