Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Advice on learning Perl and graphics

by bliako (Monsignor)
on Oct 24, 2022 at 12:55 UTC ( [id://11147642]=note: print w/replies, xml ) Need Help??


in reply to Advice on learning Perl and graphics

Now that I know a bit more about the use-case after your second post I can give my 2 drachmas. 1.5 of which has already been given by fellow monks here.

I usually don't bother with GUI (in the usual context). I put all my effort in building the logic as a non-GUI Perl application and then combine it with Mojolicious to react to user requests locally or remotely and totally compatible with all the OS which support browsers which support standard HTML and javascript. I add extra functionality to the "endpoints", e.g. "login", to communicate (read input params and send out a response) with the user in 2 different ways: HTML and JSON. If the user uses the browser then HTML rendered on their browser can do as much as a modern GUI can do. JSON is intended for allowing an "app" to interact with your back-end. For this last scenario and if you don't want to bother too much with "apps", Android (and I guess IOS) provide a Webview widget which renders HTML and executes JS. Which makes this prospect a click more powerful than a browser because Webview can inject HTML+JS and execute code in the "app" space. So, Javascript, as mentioned already by NERDVANA and Mojolicious by anonymonk. The drawback here is that there can be need for advance JS skills like XHR and the reactive-programming challenges therein. Otherwise JS is cute and easy.

Secondly, I love to scrape! Scraping should be given the "hero of the internets" award. There's data everywhere and scraping it, legally, combining, storing etc. can give you a playground to do super-powerful things. Perl is in par with any other language here with its reliable LWP::UserAgent and CPAN modules to parse received data. Plus Perl's seamless use of regexes (whereas Java needs some boilerplate to do basic regex, yikes).

Thirdly, in some cases I need very fast network response and number crunching. Then I resort to trusty C and C++. There are C-native, open source (a very important criterion in whatever you decide to use) libraries which offer access for, say, curl and OpenCV from C and C++. Perl is perfect for calling C executables. No fancy XS is required, just a simple system() suffices. You want some face recognition? Easy peasy with above setting and OpenCV.

Fourthly, there are languages dedicated for doing certain things. One of which is R. A totally head-hitting-the-wall language with steep learning curves but with an amazing gamut of open-source packages for doing virtually anything in the statistics, bionformatics, data-processing fields. All with easy multi-threading or GPU support. Again, you do not need to write a huge R script and, ouch!, a GUI. All you need is to follow the basic Unix mantra: do one thing and do it well and create a small script which you can call from Perl. You want some sentiment analysis? Easy peasy with above setting and R. There's also LaTeX, a language dedicated to typesetting of the highest standard. You want to render some PDF? Easy peasy with LaTeX (which has a Perl driver so you don't need to shell-out).

Finally, you can't go wrong when you are backed by an OS like Linux*, which is my Fifth and last point. So, for me, nah pop has no style, I strictly roots and I am enjoying every single keystroke of it.

bw, bliako

*) Don't make the mistake to think Linux and OSX are the same thing. Big mistake, keep away from OSX as it has become worse than M$ in the well-known aspects plus a few more perversions that the apple people invented all by themselves. (a good post must contain a rant).

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11147642]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (1)
As of 2024-04-19 00:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found