Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

The Monastery Gates

( [id://131] : superdoc . print w/replies, xml ) Need Help??

If you're new here please read PerlMonks FAQ
and Create a new user.

Quests
Wall of Larry Quest
Starts at: Feb 26, 2024 at 05:00
Ends at: Dec 31, 2024 at 04:59
Current Status: Active
2 replies by jdporter

    By now you've all seen The St. Larry Wall Shrine. Well, it could use a fresh coat of gold leaf and shellac. Therefore, we are soliciting Larry-related items to be placed on the shrine. Links to offsite content are good; or if you have small bits of content, such as quotes, you'd like to contribute, that's fine too. Please reply to this Quest with your humble offerings. Thank you! And may St. Larry bless your codings and your debuggings.

poll ideas quest 2024
Starts at: Jan 01, 2024 at 00:00
Ends at: Dec 31, 2024 at 23:59
Current Status: Active
2 replies by pollsters
    First, read How do I create a Poll?. Then suggest your poll here. Complete ideas are more likely to be used.

    Note that links may be used in choices but not in the title.

Monk Quips Quest
Starts at: May 01, 2023 at 08:00
Ends at: Apr 30, 2024 at 07:59
Current Status: Active
9 replies by erzuuli
    Esteemed Monk kcott has recently proposed an excellent idea.

    heretoforthwithstanding, we invite all monks to submit ideas for new monk quips!

    Your quip suggestion should include the following details:

    • Intended quip location: either XP Nodelet, Chatterbox, or Monkbar (that's the page header).
    • Text of quip.
    • Optional: background & foreground colours. If you include these, be sure they are nicely contrasting.

    .

Perl News
CFP: Science Track Papers Needed at 2024 The Perl & Raku Conference
on Feb 26, 2024 at 06:01
0 replies by oodler
TPRC Call for Papers is open!
on Feb 16, 2024 at 20:39
1 reply by talexb

    The Call for Papers for The Perl and Raku Conference 2024 is now open!

    From the TPRF website, "TPRC 2024 is being held in Las Vegas, NV from June 24-28 2024." The organizing committe has a few surprises lined up -- there will be more information to come.

    Alex / talexb / Toronto

    Thanks PJ. We owe you so much. Groklaw -- RIP -- 2003 to 2013.

Supplications
PDL undefined reference to pdl_pthread error on install
1 direct reply — Read more / Contribute
by Don Coyote
on Feb 28, 2024 at 10:39

    Fail point in build log

    g++ Core.def -o ..\..\blib\arch\auto\PDL\Core\Core.dll -mdll -s -L"C:\ +Dwimperl\perl\lib\CORE" -L"C:\Dwimperl\c\lib" ... pdlutil.o "lib.a" x +<i>n</i> -Wl,--enable-auto-image-base
    pdlutil.o:pdlutil.c:(.text+0x1f76): undefined reference to `pdl_pthrea +d_realloc_vsnprintf' pdlutil.o:pdlutil.c:(.text+0x4c): undefined reference to `pdl_pthread_ +free' collect2: ld returned 1 exit status dmake: Error code 129, while making '..\..\blib\arch\auto\PDL\Core\Co +re.dll' dmake: Error code 255, while making 'subdirs' dmake.exe: Error code 255, while making 'subdirs' -> FAIL Installing PDL failed.

    h tihere57!

    using cpanm PDL failed here. Also tried cpan PDL, but that did not even want to connect to strawberryperl website, and failed before it started.

    Not sure I could even go in and comment these out, as its being auto-installed from cpan.

    background: tk is way too slow at gfx, maybe SDL will be faster. Reading the Manual, want to intereact iwith my gfx capapbilities if possile. I did do a bit of blitting a while back at the suggestion of an esteemed perlmonk. Hearing the screams rising up from the pits of hell is probably best listened to only once though. OpenGL wont install on usb, so its gotta be PDL, for now.


    DeCoy
Module to extract text from HTML
7 direct replies — Read more / Contribute
by Bod
on Feb 27, 2024 at 06:10

    I've been searching unsuccessfully for a module to extract just the text from an HTML webpage...
    Any suggestions?

    Ideally, I want to feed in a URL and return the page's text as plain text - no formatting, tags, etc.

    Even most of the text would suffice.

    I'm currently using HTML::TreeBuilder and just extracting the p tags which is not quite good enough:

    my $http = HTTP::Tiny->new; my $resp = $http->get($url); my $tree = HTML::TreeBuilder->new; $tree->parse($resp->{'content'}); my @paragraph = $tree->look_down('_tag', 'p'); print "Content-type: text/plain\n\n"; foreach my $line(@paragraph) { print $line->as_trimmed_text . "\n"; }

    I thought I'd found a solution with HTML::Extract. But when the sample code in the documentation doesn't compile I knew I was heading down a dead end!

    Do you know of a module to extract just the text?

Do you have AI::MXNet running?
1 direct reply — Read more / Contribute
by The_Dj
on Feb 26, 2024 at 22:15

    Greetings Monks and lurkers.

    I had a system update break my MXNet installation a while back.
    Sadly it's been long enough that I don't recall the exact magic combination of OS/mxnet/perl/ai::mxnet/phase of moon/sacrificial gpu/other That I'd used to get it running.

    If anyone has a currently working installation of AI::MXNet, please let me know what version of all these things is the magic mix I need to replicate.

    Alternately, I did consider witching to AI::TensorFlow, but I haven't been able to figure out how to train a new model...
    all the sample code uses pre-trained networks and I just can't figure out the (too deep for me) magic to train a new network. I'd be more than happy with a simple 'Hello world' (MNIST handwriting) demo if anyone has something to hand.

    Thanks :-)
READDIR and DBI
4 direct replies — Read more / Contribute
by justin423
on Feb 26, 2024 at 11:42
    This code doesn't work, but I have to think there is an easier way to read a file directory into a database, but I just don't see it.
    my $SQL= "INSERT INTO DIRECTORY_LIST(FILENAME) VALUES ('$filename')"; my $sth= $dbh->prepare($SQL) or die "Prepare".$dbh->errstr; opendir my $dh, $dir or die "Could not open '$dir' for reading: $!\n"; $sth-> execute() or die "".$dbh->errstr; while (my $row = readdir $dh) { if ($filename eq '.' or $filename eq '..'){ next; my ($filename)=($row->[0]); } print "$filename\n"; } print "\n"; closedir $dh; $dbh->disconnect;
PerlMonks Discussions
New Feature: Thread Watcher
3 direct replies — Read more / Contribute
by jdporter
on Feb 29, 2024 at 14:54

    I am pleased to announce a new feature: thread watching. This lets you receive notification whenever someone posts a comment in a thread of interest.

    More specifically, you can get notified when someone replies directly to a specific node of interest, or when someone replies anywhere under a node of interest, no matter how many reply levels below the node. These two modes are called 'direct' and 'any'. The node of interest doesn't have to be a root node in one of the sections; it could be any reply as well, in case you're only interested in a subthread under some post.

    To register for notifications, click one of the new links you'll find by each node, near the "Comment on" link. For a node you're viewing directly (that is, the 'root' of a (sub)thread you're viewing), the new text looks like:
    Watch for: Direct replies / Any replies
    For all other nodes in a (sub)thread you're viewing, the new text looks like:
    Watch: Dir/Any

    If you have already registered interest in a node in this way, these links will not be present. In their place, there may be an indication that you are already watching the node.

    To see a list of all the nodes you are currently watching, go to My Watched Nodes. Next to each watch listed, you'll see a "button" (like [X]) which you can click to delete that watch.

    In addition...

    You can watch a user, i.e. receive notification whenever a specific user posts. To set up this kind of watch, go to the user's homenode, where you will see a link like Watch for posts by this user.