Dear all,
given the versatility of generative AI, I want to test it at home. And I would prefer being able to do this in Perl instead of having to master Python.
But: Are there any non-obsolete Perl packages that allow local LLM access? For example, the scripts on [the MiniCPM-V-2_6 page](https://huggingface.co/openbmb/MiniCPM-V-2\_6) don't look frightening, but how would those be translated into Perl?
Basically, my main interests are:
- multilingual text embedding (yes, I am dreaming of a Perl-powered RAG)
- access to an instruct model, e.g. for content augmentation
- if possible, OCR with higher accuracy than tesseract
Thank you very much.
submitted by /u/Patentsmatter
[link] [comments]
Is it possible in Perl to { = BEGIN } = END
so
sub some sub BEGING ...code... END
Having a non English keyboard makes the various []{}|\ more complex to enter:
\ is "7 + option + shift" on a MAC whereas on US keyboard most have their own key and it is pretty straightforward.
I try to experiment with various ways to to make this easier. Still haven't found my. sweet spot. This is just another attempt.
submitted by /u/NoeticIntelligence
[link] [comments]
I want to install tarball of perl 5.38.0 with wget, but it just freezes. Is there other mirrors other than cpan.org ?
Or i just doing something wrong. I am in Russia (I even tryed different proxies - dont help)
submitted by /u/braam76
[link] [comments]
In the spirit of shiny containers gathered neatly under the festive tree, I spent some time using Podman to make a rootless "dockerfile" that contains ALL THE Perl REPLs... as well as a few other useful bits and Object::Pad so people can see how cool the Class/Role syntax is.
Here is the container. Yes, it's big, you will need broadband. ^_^
hub.docker.com/r/jemi298/perl-…
I recommend Podman, but with Docker/Podman, pull the image and give it a try. I tried to make this a "easy"... I'm sure it will download and run faster on your PC than it builds on mine! You could do something like:
Run Devel::REPL... $ use strict; use warnings; use feature 'say'; $ use Object::Pad; $ my @aNumbers = map { $_ } 100..999; $ role rVox { > method doMsg ($inMsg) { say $inMsg; } > } $ class cTEST { > apply rVox; > } $ my $oT=cTEST->new; $ $oT->doMsg(__LINE__. " hello from a REPL!"); 6 hello from a REPL!
The container is based on Debian:Slim (slim, ahem), so let's recognise up front that compared to Alpine Linux, Debian:Slim is a whale! And Devel::REPL in particular depends on a herd of Moose...
This is a learning image, those keen for cloud deployment will not want this to run up their cloud bills.
Here are some of the previous discussions about Perl and containers:
old.reddit.com/r/perl/comments…
old.reddit.com/r/perl/comments…
domm.plix.at/talks/writing_a_g…
Merry Containering, Perling, and REPLing!
submitted by /u/singe
[link] [comments]
Randal Schwartz is giving his "Half My Life with Perl" talk tomorrow Saturday, December 14, at 5:00 PM - 7:00 PM EST. You can register for the livestream.
I think the video will also be available later, and when I know those details I'll post those too.
submitted by /u/briandfoy
[link] [comments]
Me: oi, there's like a few dozen modules I need to rebuild that have changed their maintainers, so their CPAN paths all changed, now I need to update them all, sounds like a bit of busywork, 'innit?
MetaCPAN: don't fret, we have this nifty feature where you use the /modules/by-module/X/X-Y
paths, and those won't change!
Me: OK mate!
... time passes ...
... I need to rebuild the packages again.
Me: MetaCPAN, mate, do you know why am I getting 404 pages instead of tarballs under all /modules/by-module/...
links? Now I have to change them all back to author-based ones! Sounds like busywork again, 'innit?
MetaCPAN: LOL LMAO
submitted by /u/WesolyKubeczek
[link] [comments]
Is there a way to directly include a variable declared in a dumped config file in one of my scripts? The structure of the file is below:
{ my $variable = { “key1” => { “key2” => { “key3” => “value1”, }, }, }; }
1;
As you can see, the variable declares a deeply nested hash_ref which I don’t want to have to parse manually. I also don’t have any control over the dumped variable file, the design flow I am working in dumps that format and it would both be cumbersome to try and get the script owner to modify the output to use our instead of my and this could anyways possibly effect currently existing downstream flows that depend on this specific format. As for why we didn’t use a yml in the first place, no idea lol
For reference, I need to take a list of keys from within the hash and iterate over each element
submitted by /u/Its-goodtobetheking
[link] [comments]
Any one using WWW::Mechanize::Chrome? I gave it a try yesterday on a personal scraping project and my results were hit and miss. I realized that I installed with cpm which does not run test by default. I downloaded it with cpan and manually ran the make and make test. I received dubious responses from the first test all the way to 60 and the testing locked up on t/61-mech-download.t
. I found literally 160 chrome processes zombied.
This was run using perlbrew 5.40 on an updated Debian 12 box.
Anyone else seen something like this?
submitted by /u/LearnedByError
[link] [comments]
use DDP; use DateTime::Format::Strptime; my $strp = DateTime::Format::Strptime->new( pattern => '%m/%d/%y %H:%M', time_zone => 'Europe/Rome', ); for my $date ( "3/25/06 2:44", "3/26/06 2:44" ) { my $dt = $strp->parse_datetime( $date ); p $dt; }
submitted by /u/Perl_Version_42
[link] [comments]
I have code like this: my @f1 = ($from =~ m{/[^/]+}g); my @f2 = ($to =~ m{/[^/]+}g);
Where ($from, $to)
is also aviable as @_
. How would I make this into one line, and so I don't have to copy pase the reuse expression. IIUC, map
can only return a flat array, or arrayrefs, which you cannot initalise the values with.
submitted by /u/Both_Confidence_4147
[link] [comments]
Inspite of bash
being the main Linux "scripting" language I have never liked it much, always forgetting the syntax.
It comes up where regular expressions are concerned, seemingly the one with a good standardized system of regular expression syntax.
Regardless of how archaic or passe it is, once mastered would Perl be a good fit for that need?
I know about Python and Ruby, but if I have no particular interest in AI.
Could Perl be it, once mastered, or could that be Awk?
submitted by /u/vfclists
[link] [comments]