News for hackers. Stuff that matters.
Re:Symbian Source Code by jillesvangurp on Tuesday May 24, 2022 @12:27PM (#31494155)
One of my colleagues in Nokia Research Center actually created and maintained the python port to symbian. He was dealing with some crazy stuff. NRC actually ported quite a bit of oss to Symbian. You could actually run a webserver on the device which you could share to the internet with a reverse proxy. So, you could host your own photos from your device or use it as a webcam. Php, apache, mysql were part of this effort if I remember correctly. Another team in the same lab was responsible for porting Webkit to Symbian. This actually shipped when the iphone was nothing but a rumor. Ajax websites running on a smart phone. In 2005 when Ajax was still a new thing. Amazing stuff.

Of course all of this was labelled as research and wasn't taken too serious by the business units until it was too late. A pity, because a lot of the stuff that NRC produced wasn't bad. There was a thing called friendview that existed before foursquare was a thing where you could share your location on a map with friends. The team that did that also did another app that allowed people to share photos. Instagram was not a thing yet back then. Another team was doing a thing called sports tracker. These were tiny teams doing amazing things. Sports tracker basically was allowed to take their software outside of Nokia and create a company around it. Nokia shipped a lot of stuff like this via Nokia Betalabs. A lot of that stuff came from teams in Nokia Research Center.

Re:Symbian Source Code by miohtama on Tuesday May 24, 2022 @04:56PM (#31497459)
I was working on the mobile web server project. The project was heavily subcontracted to a company in Oulu, Finland, where I worked by the time before starting a career in open source and Python consultancy. Mobile web server was a Series 60 web server, based on Apache, some glue and reverse proxy gateway (written in Java). You could deploy your own “apps” that could be accessed by anyone, running on your mobile phone.

Unfortunely, the project did not have a real business use case. People believed that peer-to-peer is a thing (XMPP, BitTorrent, IRC) and this would drive mobile-to-mobile interactions. Unfortunately, it turned out not to be true.

Later me and my friend ported Python to Series 60 with our own rewrite, as Nokia’s official port had many issues. Unfortunately by this time Series 60 was already losing market share for iPhone and Android. Furthermore we found that because of module import delay, Python will never be a good run-time for mobile applications, unless you do some sort of a binary dump/prewarmed up interpreter.

Re:Symbian Source Code by liuliu on Tuesday May 24, 2022 @06:19PM (#31498180)
Binary dump / prewarmed up Python interpreter would be amazing even today. Could enable a lot use cases with Python.
Re:Symbian Source Code by nyanpasu64 on Wednesday May 25, 2022 @12:05AM (#31500505)
youtube-dl/yt-dlp (Python) is a full second slower than youtubedr (Go) or youtube.com (JS) to download YouTube videos, and I think a lot of that is due to interpreter warmup (though I don't know exactly why). Sadly mpv only supports youtube-dl/yt-dlp for watching videos, and youtubedr doesn't have the vast plugin ecosystem of yt-dlp for non-YouTube websites.
Re:Symbian Source Code by KolenCh on Wednesday May 25, 2022 @04:32AM (#31501907)
The above mentioned Python’s import delay. This is a notorious behavior in high performance situation (including your cli startup time example). Essentially the import process is IO intensive. This comes up in massive parallel applications as at launch each process is importing the same stuffs. It is briefly mentioned for example in https://docs.nersc.gov/development/languages/python/

If you really care about the startup time, you could pre-compile it. Nuitka and Cython could do this with different limitations.

Re:Symbian Source Code by OOPMan on Wednesday May 25, 2022 @07:33AM (#31503046)
I've run into the import issue as well, it's especially painful if something imported is doing work using a slow library (e.g. a config module loading a HOCON config using pyhocon a.k.a slowasmolasseshocon)
Re:Symbian Source Code by KolenCh on Wednesday May 25, 2022 @07:06PM (#31512008)
That will be another slow down happening at import stage. But even if ideally everything you import only does import with not much work, the import overhead mentioned above still exists. But frankly I’m not sure how significant it is on a typical personal computer with SSD, especially when the OS may cache recently used files already.

The problem you mention can be significant because some design patterns in Python encourages this. Eg function arg with a default that’s expensive. Unfortunately this whole speeds up repeatedly calling the func, the cost is paid at first import.

Re:Symbian Source Code by miohtama on Wednesday May 25, 2022 @07:35AM (#31503070)
Unless your 1) execution environment (CPU, dlls) or 2) Python source code files change, you can use “unexec” strategies like Emacs

https://news.ycombinator.com/item?id=21394916

Re:Symbian Source Code by exhilaration on Tuesday May 24, 2022 @03:28PM (#31496501)
Confirming that I was able to run a webserver on my Nokia 3650 https://en.wikipedia.org/wiki/Nokia_3650 back in 2004. Those were the days when T-Mobile USA actually gave you a public IP address! It was pretty awesome to be able to download photos from the phone via the web - even if only at GPRS speeds.
Re:Symbian Source Code by teknolog on Tuesday May 24, 2022 @04:19PM (#31497096)
Sports Tracker was awesome. I used it for years before it stopped being competitive with Strava and more modern offerings.