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

The day packaging for distros will be easy, we will use it. Right now, making a deb is hard. Isolating 2 projects with different deb verions is hard. Distributing debs is hard. Upgrading your OS but not your python debs is hards.

Then rinse and repeat for red hat, arch, nix, mac and windows ?

Yeah right.


Since Nix packages are distribution-independent, once you have it packaged with Nix, you could theoretically skip packaging for Ubuntu etc., but of course that may raise the bar of entry for your users.


I doesn't work on windows, so you lose half of your users. And WSL is not the answer to that.

Also, unless you repackage thousands of compiled c extensions and you play well with anaconda and can plug into the entire python ecosystem of platforms such as heroku, python anywhere, databrick and so on, you then lose 90%


The purpose of vite is not to be fast for build, but to be a live reload instant dev platform. So you almost never run build. You code with vite's server, and it let you see the result instantly in the browser. You can use modules, modern js, and transpiled languages transparently.

Then when you put in prod, you build once. 30s once a day doesn't matter.


It does matter in a CI environment. Using a different build procedure there is not optimal.


Optimal != Best for most people.


Best for most people != Best for everyone

I mean, notepad.exe is arguably a better text editor for most people compared to anything else most of us are using.

I'll happily take some minor overhead in build configuration over adding 30s+ to every automated build if it's not a personal or small-scale community project.


There is also no Django for Java, no Fast API for Java, no Typer for Java, etc.

Why ? Because it's easier to write great frameworks in Python.

It compounds.


Equally, there's no Hibernate for Python, no Spring for Python. And FastAPI looks basically like JAX-RS to me.

I don't think the lack of any of these things is because they're impossible, or even particularly hard. It's because the community did or did not have the need and energy to build them.

Remember that Java had Java EE forced on it quite early. That defined web development for a long time. Eventually Spring overthrew it, and became the new tyrant. Neither of those are quite like Django, or Rails, but they occupied the space that would have had to have been empty for a Django or Rails to emerge. I think this is rather unfortunate; it would be really useful to have a vibrant Django- or Rails-like framework in Java.

There's no Typer because there isn't much of a culture of building command-line tools in Java. There are some good command-line parsing libraries, but nothing with all the bells and whistles and extensions that Typer has, as far as i know.


> Equally, there's no Hibernate for Python, no Spring for Python. And FastAPI looks basically like JAX-RS to me.

Of course there is. In fact, SQLA is easier to use than Hibernate, and the ecosystem around is as rich. As for Spring, crossbar fits the bill.

> I don't think the lack of any of these things is because they're impossible, or even particularly hard. It's because the community did or did not have the need and energy to build them.

I've never say they are impossible. I've said they require less energy to build them in python :)


No one who writes Python has ever said to themselves, "I wish I had Spring." It's not necessary, and it wouldn't even be beneficial. The kind of dynamism that Spring brings to Java, Python already has.

Also Hibernate is terrible and should be erased from the Earth.


Java, Perl and Ruby all had the same.

In fact, in 2018, Java 8 was still massively used:

https://jaxenter.com/java-8-still-strong-java-10-142642.html

Then you have libs and frameworks, and they break compat too. The JS ecosystem basically broke everyone code for 10 years every 6 month.

It's not a Python thing.


According to the latest jrebel report, about 70% of Java shops are still on Java 8 as of earlier this year. The changes with Java 9 certainly created plenty of work for me. Java's famous claim to backward compatibility mostly concerns the JVM itself. They have done a killer job there. But the virtual machine is not the same thing as the platform that rests atop it.

This is not by way of complaining about Java 9. The changes are good and needed to happen. And the reasons why most people are still on Java 8 are also legitimate. Everyone's handling the situation in a fairly mature way, from what I've seen. The level of histrionics about Python 3, though... I've got a lot less sympathy for that.


Talking about gotchas and then recommend bash is not a sign of credibility in my book.

Bash has one strong point: 4 to 5 lines admin scripts for which concision and expressiveness matter more than anything else. That's it.

There is nothing else it can be better at than ruby, python, perl, php, or even go or kotlin.

The argument you need to learn x stands for bash as well, btw.


I only said to use bash for small scripts. Basically just a series of commands. Maybe setting up one or two environment variables. Anything more complex or involving "if" I would almost never write in bash.


I have a half million users a day streaming website coded in Python. It does machine learning, uploading, encoding, dynamic load balancing, live search, comments, votes and most of the code I had to write was in django or rq endpoints.

On first load, not only the page is ready, but the video has started to auto play (including buffering), under 3 seconds. Less than 500ms on a reload.

The whole project has been running for 10 years on 7 servers. Hosting costs under $1K/mo.

And even better, the code base is a mere 11K LoC, so a single dev can manage it. And make a living out of it.

That's because:

- Python is almost never the bottleneck in a website

- Python wraps compiled languages for slow stuff. That's the whole point.

- your archi matters much more than the language you chose. Because good db providers, proper caching and optimized data fetching will be the pareto moves, unless you are google size.

- you will not code most things anyway. You are not going to code the video encoding, you will use ffmpeg. You will not recode a database, you will use an existing one. You will not code a server, you will use nginx or something else. What you will spend time on is creating logic for your clients.

So I think your are extrapolating this rare use case where your POV makes sense, and ignore the 99% of the case were, indeed, a slow language doesn't matter.

In fact, if electron success tells anything, it's that while I do value speed a lot, the market has voted.


> I have a half million users a day streaming website coded in Python. It does machine learning, uploading, encoding, dynamic load balancing, live search, comments, votes and most of the code I had to write was in django or rq endpoints.

Sounds much more likely that you wrote in python the code that bundle together the libraries that peform the actual network streaming, machine learning, encoding, search, etc, and that those libraries were not written in python.


Yes, that's my whole point.

Where in the stack do you see that Python performances matter?

Only one software out of a 1000 will actually need it. The others will mostly do plumbing or automation.

And scripting languages excel at both.

If you don't fall in that category, then yes, do use a fast language. If you are coding a chat server, use Erlang. If you want to do a rendering engine, use Rust. But if you most likely want to code your company CRUD software and glue it to some external services and providers, use Python.


> Where in the stack do you see that Python performances matter?

As we just saw, most of the code forming your stack is not written in python because its performance would not allow it.

> Only one software out of a 1000 will actually need it.

Not what I see from your example.

It seems to me that you are overinflating the volume of the python code that you wrote and are blind to the huge volume of performance critical code you just take for granted.

You probably mean: most of the code that most of the programmer write is disposable code assembling reusable libraries. This code performance does not matter therefore python is fine.

I agree on this. The problem I see with this reasoning though is that since python is so slow and error prone compared to compiled alternatives that it is unfit when scaled up from small disposable programs to largish permanent software, in a world where all programs trend to grow and stick in production for longer than expected.


3 seconds to load and $1000/mo hosting costs is way over the unacceptability threshold for me.

I don't know what is the website you're running or how many people use it or how much money you make. I know you can make a lot of money doing stuff in python or electron. Does that mean the market has voted that performance doesn't matter? I don't think so. Jira makes a lot of money but almost everyone hates it. I know a lot of other software that is very slow but still makes tons of money.

> you will not code most things anyway

You say that like it's a good thing! It's a bad thing.

You may say it's because you don't need to. But the flip side is that you can't, even if you wanted to.

You can't program a database or a video encoding or a web server in this language you are using to write your program.

So what is the point of this language?

You can't even use it to cache things in memory. That's why everyone uses redis or something similar.


This is the limit to technical solution to political problems. If the gov wants troubles for you, you will get them unless you manage to escape.

A state entity can only be slowed down.


Briar is really neat, and I hope it will land on Linux, Mac and Windows. Being able to send messages and files directly to anybody on a local network without any account just rocks.


since recently, there's a cross-platform desktop client in development using compose for desktop as its UI framework


I found the code repository for Briar desktop port: https://code.briarproject.org/briar/briar-desktop


That's fantastic news.


Ubuntu 08.04 was already allowing this using empathy...


It's very slow for big files though, and requires several clicks on the 2 devices. If you are on the local network, kde-connect is still the golden standard provided you use linux (even with gnome) and android:

- click on the top bar menu to select your device

- select the file

- done

It uploads automatically in the download folder of the other device. It uses the local network speed. Doesn't require additional clicks.

But as soon as I'm on 4G, telegram saved messages is what I use too. In fact, I use it to takes vocal notes, pictures of stuff to remind me later, schedule reminders (yes, it has delayed messages!) and so on. It's my inbox basket for GTD at this point.


Shared drives ?


Yeah, network drives. Like this: https://i.imgur.com/aRS0EdO.png


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

Search: