LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-18-2019, 09:39 AM   #16
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,515

Rep: Reputation: 239Reputation: 239Reputation: 239

maybe because Python is in fashion at the moment?
 
Old 11-18-2019, 11:49 AM   #17
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
I still think that the parts that do the heavy lifting are written in some lower level language, but with - how do you call it - python bindings? - so they can easily be deployed in python scripts.
 
1 members found this post helpful.
Old 11-18-2019, 11:53 AM   #18
Samsonite2010
Member
 
Registered: Apr 2015
Distribution: Debian
Posts: 267
Blog Entries: 1

Rep: Reputation: 117Reputation: 117
Quote:
Originally Posted by ondoho View Post
I still think that the parts that do the heavy lifting are written in some lower level language, but with - how do you call it - python bindings? - so they can easily be deployed in python scripts.
This is definitely something I have seen - I worked on a product where the main code was compiled C#, but the code could learn and write new functions and code stored as Python and executed within.
 
Old 11-18-2019, 12:24 PM   #19
freemedia2018
Member
 
Registered: Mar 2019
Distribution: various automated remasters
Posts: 216

Rep: Reputation: 208Reputation: 208Reputation: 208
Quote:
Originally Posted by ondoho View Post
I still think that the parts that do the heavy lifting are written in some lower level language, but with - how do you call it - python bindings? - so they can easily be deployed in python scripts.
Yes, the parts that would suffer most from being done in Python are implemented in something faster and called from Python-- Python is the "just do what I want" tool that holds the other stuff together.

When people don't understand why Python is used for machine learning, ask them why anybody would run their GNU/Linux applications from a slow interpreted shell language like Bash. (It doesn't matter, as the Bash interpreter isn't doing the work.) One of the slowest aspects of Python is the way it handles dynamic typing. It's not necessarily a slow implementation of that task, but a task that is notably less efficient than static typing.
 
1 members found this post helpful.
Old 11-18-2019, 09:06 PM   #20
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,800

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Quote:
Originally Posted by pan64 View Post
that is not true always. Sometimes an interpreter evaluates only the current line, nothing more. python, java and perl [for example] are compiled into byte code which is executed by an interpreter-like way. That means [more or less] the VM will execute this byte code one by one using their native implementations. These are never fully compiled to the native machine language, therefore the execution will be slower than that.
I thought that Perl was fully compiled before being executed---if it was only line-by-line interpreted I'd have seen more time between pressing return and seeing syntax errors in some of my bigger Perl scripts. :^) Once that's done, execution speed was only slightly slower than compiled C. There are Perl compilers out there. I don't think I've ever seen any that were OSS but they do (or did) exist). If a compiler doesn't exist for Python, I suspect it won't be long before it does.
 
Old 11-18-2019, 09:20 PM   #21
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,800

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Quote:
Originally Posted by Firerat View Post
yeap that would be my guess
the portability and the fact that modules can be "dropped in" to easily add features`
Maybe easily dropped in but first you have to find them.

Out of curiosity... does Python have anything like:
  • CPAN -- Comprehensive Perl Archive Network
  • CRAN -- Comprehensive R Archive Network
  • CTAN -- Comprehensive TeX Archive Network
Googling has been helpful in locating some interesting Python modules -- for example, back when I needed to find something to do "fuzzy" pattern matching -- but that doesn't seem as efficient as the Comprehensive Archive Networks and I haven't found anything quite like those for Python. (Just looking to avoid re-inventing the occasional wheel.)

Anyone found something like that yet?
 
Old 11-18-2019, 09:59 PM   #22
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,221

Rep: Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319
I'm curious as to how you managed to miss it:

https://pypi.org/

Last edited by dugan; 11-18-2019 at 10:20 PM.
 
Old 11-18-2019, 10:48 PM   #23
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
https://pypi.org/

https://pypi.org/search/?q=fuzzy+pattern+matching

https://packaging.python.org/tutoria...ling-packages/
https://packaging.python.org/glossar...age-index-pypi


I've only dabbled with python, fixing the odd script.
but that was years ago
 
Old 11-20-2019, 11:40 AM   #24
freemedia2018
Member
 
Registered: Mar 2019
Distribution: various automated remasters
Posts: 216

Rep: Reputation: 208Reputation: 208Reputation: 208
Quote:
Originally Posted by dugan View Post
Plus they have good Python 2 compatibility, considering January is around the corner.

Though I've never done any tasks with Python that benefit from the speed optimisations that PyPi offers. It can't speed up everything.
 
Old 11-20-2019, 01:48 PM   #25
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,221

Rep: Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319Reputation: 5319
I think you're mixing up PyPi and PyPy.
 
Old 11-20-2019, 02:24 PM   #26
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,800

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Smile Thanks...

Quote:
Originally Posted by dugan View Post
I'm curious as to how you managed to miss it:

https://pypi.org/
Argh! Brain fart, I guess. I went through a marathon session a while back trying to merge several collections of bookmarks, organizing them (shees what a hassle that turned out to be), filling in blanks in some topics (esp. in my "languages" folder) and could have sworn I had saved that one. Again, thanks.
 
Old 11-20-2019, 09:27 PM   #27
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,800

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Quote:
Originally Posted by Firerat View Post
That second link sure would have been better than the way I finally stumbled onto the fuzzy pattern matching module I located ("fuzzywuzzy") for a "crash" effort this past summer. I cannot recall how I wound up locating it though I it may have been via googling and finding the author's project page. (It is listed on PyPI now, though.)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Machine Learning, Deep Learning 101 LXer Syndicated Linux News 0 07-20-2016 11:00 AM
[SOLVED] Learning Python, how should I implement the following problem in Python 3 code? rblampain Programming 8 05-29-2016 10:53 AM
LXer: Explore Python, machine learning, and the NLTK library LXer Syndicated Linux News 0 10-09-2012 06:30 PM
LXer: Python Python Python (aka Python 3) LXer Syndicated Linux News 0 08-05-2009 08:30 PM
Try Python, O'reilly Learning Python haknot Programming 5 02-15-2002 08:27 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration