Skip to main content




Building an OpenAI chatbot in Corinna submitted by /u/OvidPerl
[link] [comments]



I am fairly new to Perl. I did a lot with it in the mid 90s and came back about 8 months ago. There is a lot I dont know and probably a lot of things I have forgotten.

I picked up Perl to write a couple of applications that I was hoping could run on MacOS, Linux,OpenBSD, and Windows. Perl runs on all of them and many come with Perl built in. Simple scripts I have written run pretty well. (Lets forget about Windows for now).

When I start using libraries(packages?) there is a world of hurt.

Now some libraries pretty much usually work, but many do not. Which works and which do not seems to be dependent upon the operating system and distro.

Then I have to start with what version of Perl is running everywhere. That is annoying.

I end up spending a lot of time on a new machine when I want to run my application, doing nothing else than trying to get the libraries installed.

So I decided to adopt PerlBrew (havent tried it on OpenBSD yet) That should give me a stable version across the differnt platforms.

Then I decided I wanted to write a shell script that would handle installing all of the libarires I might use once and for all so I would know they were all accounted for.

perlbrew exec -q --with perl-5.40.0 cpanm install DBI

Then libraries I have pulled from CPAN do not work.

Google here and Google there.

Ok install GCC and make (I should have known this) More problems:

I found a few of these: "Why are you using CPAN for this? Use the compiled packages that come with <OS><type>"

Hmm I would have thought that CPAN shold be the best source? How do I know what exists as pre built packages on what platform?

Using apt search "perl" or "-perl" or "perl" does not help that much.

I have XML::LibXML working on Mac but getting it working on Ubuntu 22 I have been able to do. I have even tried to start OpenBSD yet)

Is writing cross platform applications in Perl meant to be this difficult?

Should I avoid libraries at all costs and write an aweful lot of code myself?

Is there an easy way to guess what libraries will almost certainly work and what libraries will most likely never work? Some kind of warning system?

Should I look into using pp? I havent yet figured out how to make it compile for Ubuntu,MacOs,OpenBSD yet.

In GoLang its a couple of flags to set for each architecture and off it goes.

ShouldI look into Par files? (or was it Far) that are supposesd to contain the nessescary libraries within itself?

What am I doing wrong?

Libraries in my current set Given all the experimenting some of them are now wrong.

Array::Set, Array::Unique, Bundle::LWP, Data::Dump, Data::Dumper, DateTime, DBD::SQLite, DBI, Digest::file, Digest::MD5, Digest::MD5::File, File::Basename, File::Compare, File::Copy, File::Find, File::Find::Rule, File::Glob, File::Path, File::Slurp, File::Spec, Image::ExifTool, Image::Info, IO::All, List::Compare, List::Gen, List::MoreUtils, List::SomeUtils, List::Util, List::UtilsBy, Log::Minimal, LWP, LWP::Simple, Path::Tiny, Term::ANSIColor, Text::Fuzzy, Type::Tiny,Moose,MooseX::Types,WWW::Mechanize

submitted by /u/NoeticIntelligence
[link] [comments]



You may have noticed the slow pace of Corinna development. As it turns out, there's an easy way to speed up the development: tell Paul.

I had a call with Paul "LeoNerd" Evans last night and this, including his email address, is being shared with his permission.

As you might imagine, being a core Perl developer, Paul has many things on his plate. Currently has has tons of PRs against the Perl core, he's doing new work such as experimenting with data checks (don't call them "types"!), and is active on the Perl steering council and in P5P. However, he's previously mentioned that he doesn't get much feedback on his work. For adding something as important as Corinna, just blindly adding it without hearing from the community is bad. Yes, we had a multi-year design phase and Corinna is much better for it, but that doesn't mean it's perfect and we don't want to screw this up.

So here's where you come in. Email Paul at leonerd at leonerd.org.uk. Tell him your thoughts about Corinna. He's he one implementing it and working in isolation as he is, despite his work with Object::Pad, isn't good. Tell him what you like, what you don't like, what you'd like to see next, what bugs you've encountered, and so on. Without hearing from you, he has no way of judging community thoughts/support for this project, so he needs your help.

If you'd like a quick refresher on the new syntax, I've written a short introduction. Here's a dead-simple LRU cache written in the new syntax:

use feature 'class'; class Cache::LRU { use Hash::Ordered; field $cache = Hash::Ordered->new; field $max_size :param :reader = 20; method set( $key, $value ) { $cache->unshift( $key, $value ); # new values in front if ( $cache->keys > $max_size ) { $cache->pop; } } method get($key) { return unless $cache->exists($key); my $value = $cache->get($key); $cache->unshift( $key, $value ); # put it at the front return $value; } } 

submitted by /u/OvidPerl
[link] [comments]


List of new CPAN distributions – May 2024 submitted by /u/perlancar
[link] [comments]



Is it possible to display an image to the user, without loading all the trappings of a whole widget / event-loop environment like Prima, Tk, Wx, Win32::GUI, etc?

Specifically, I want something simple that I can execute in a BEGIN block to display a splash image to the user while the rest of the application is compiled and initializes, which takes about 5-10 seconds. The program in question is a perl Wx application running under MS Windows.

submitted by /u/sue_d_nymme
[link] [comments]



I am making a script with multiple threads, and one of the threads I wish to make is a "cpu usage monitoring thread" that checks both "overall" cpu usage and the "current script cpu usage" or external PID cpu usage.

Then I can decide if any of my threads need to sleep for the moment while CPU is recovering from something (like maybe its executing something heavy) then my perl script needs to adjust.

I wish it will also be EFFICIENT and ACCURATE as much as possible. I don't want the perl script have high CPU usage. Cross Platform would be nice, but if a Windows Solution is more efficient. Please share.

For now I can't find any good solution. 🙁

submitted by /u/DemosaiDelacroix
[link] [comments]



Hey, I have a chance at getting an interview for a position through a connection (internship), and the position I was referred to said the job would mainly focus on PERL, how could I get ready for this interview? On my resume, I want to add a small portion where I say I'm developing my PERL skills. I saw some basic tutorials for making simple calculators and whatnot. What could I do to get ready and impress my interviewers? Also, should I add these simple projects like a calculator on my Git Hub just to show I have at least a little experience? If not, what other projects could I work on to develop my skills with PERL, I'd love any advice I could get, thanks!

Some background: I've only done Python and Java through my university and did a bit of webdev in my free time.

submitted by /u/SquareRaspberry3808
[link] [comments]



Mo utilities for email.

Changes for 0.02 - 2024-04-26T23:02:53+02:00

  • Add tests for error parameters.
  • Rewrite the tests so that the functional tests are first and then the errors.