Loading video...
Video Failed to Load
Who said Python isn't a production grade lanugage?
242,069 views • 1 year ago •via X (Twitter)
49 Comments

I mean if your python is just a wrapper for libraries written in c that do the heavy lifting.

We used to do this, but openpilot is largely moving in the direction these days. New UI ships next release that drops C++ Qt+Wayland for a much simpler and more performant Python version.

@HeadBand42 If you managed to make C++ slower than Python you must have no clue what you're doing

@HeadBand42 Of course it's possible to make it fast in C++ too, but the point is that there's more to the choice than C++=good and Python=bad. The old stack was complex and hard to reason about, but the new one is fast (even though it's Python) because you know exactly what's happening.

Imagine it was C

Would it drive better?

Only one way to find out.

> Production-grade Python code > Look inside > Python API that calls C code

"production grade" is the "military grade" of the software engineering world.

Looking great driving straight, not changing lanes by itself yet.

this brings a whole new meaning to "updating drivers"

Is all the compute handled by the device in the windshield? No way!

Yes, all compute is local on the comma 3X

It works, but at what cost?

$999 on

@ThePrimeagen would be sad.

@ThePrimeagen Because he hasn’t tried openpilot yet?

I think I'll finally give it a shot and get a comma next month!

i swear i didn't.

Do yo support indian roads?

openpilot is trained 50-50 on US and international data, so it works anywhere with roads. We have a handful of Indian users.

Great to hear that, is there a way to be part of your model training program or maybe sign up for an international launch?

yes! the comma 3X shows you how to upload to get in the training set, and tells you how much of your driving is used.

Great thanks, will explore more on this!

it's wild the amount of static about python is in this thread. Bitching about how people make their sausage is such an insufferable waste of communication. You think you can do it better, then do it better. Yap less.

Who said you need to proofread before posting?

okay chill you are on a highway

I would NOT trust this car 😭

C++ and ROS2 are the kings

Could have coded it to not hog the middle lanes

lol

Thank all the C and C++ guys doing all the work 👍

Python is literally a prototyping language. Sadly we didn't include a pathway from prototype to production grade code transformer. Now we are stuck with whatever we have - a gazillion versions, broken dependencies, GIL!

amazing rage bait. free marketing.

oh wow cruise control ...

in Python!

But it's slower by 2ms bro

so this is a lane keeping device?

Here a Python dev, every language is suitable to be production ready if the team has enough skills and knowledge Python is slower than other languages? True, but if everyone were looking for the maximum performance they would be coding in assembly xD

It's all fun and games til a TypeError at runtime wraps you around a fucking tree 💀

The fact that you've open sourced the source code makes this even more based

So our life depends on Python speed? Scary!

I 💕 python . Greetings from 🇨🇭

People who run 100k for loops.

That’s too many

Nobody remembers this cartoon?

Got low memory in the middle of today’s highway drive. No way I could restart my comma during drive. So, I guess it’s not that great?

Is that a 5th gen CR-V?

Then why do you need all that janky C++ then huh? Huh?
