Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^2: Curious about Perl's strengths in 2018

by harangzsolt33 (Chaplain)
on Dec 13, 2019 at 17:33 UTC ( [id://11110077]=note: print w/replies, xml ) Need Help??


in reply to Re: Curious about Perl's strengths in 2018
in thread Curious about Perl's strengths in 2018

This node falls below the community's threshold of quality. You may see it by logging in.
  • Comment on Re^2: Curious about Perl's strengths in 2018

Replies are listed 'Best First'.
Re^3: Curious about Perl's strengths in 2018
by jdporter (Paladin) on Dec 13, 2019 at 18:23 UTC
    a JS script won't run on Linux!

    The hell you say. Javascript runs everywhere.

Re^3: Curious about Perl's strengths in 2018
by marto (Cardinal) on Dec 13, 2019 at 19:41 UTC

    Pretty much everything here is outdated. JavaScript has no issue on a Linux system, I dare say Node.js runs on more Linux systems than anything else. You insist on running a dead distro of Perl (TinyPerl) on a dead OS (Windows XP). You're missing out on what modern perl and modern frameworks can offer.

      And also (apparently) modern operating systems.

Re^3: Curious about Perl's strengths in 2018
by haukex (Archbishop) on Dec 14, 2019 at 23:31 UTC
    When working with binary files, Perl can easily read just the first 512 bytes of a 5gb iso file. JavaScript cannot do that. It would try to read the entire file first, and there's nothing you can do to go around that. lol
    #!/usr/bin/node "use strict"; /* perl -wMstrict -le 'open my $fh, "<:raw", "5gig.iso" or die $!; seek($fh,0x8000,0) or die $!; read($fh,my $buf,512)==512 or die; print unpack("H*",$buf)' */ // https://nodejs.org/docs/latest-v12.x/api/fs.html const fs = require('fs'); fs.open( '5gig.iso', 'r', function (err, fd) { if (err) throw err; var buf = Buffer.alloc(512); fs.read(fd, buf, 0, buf.length, 0x8000, function (err, bytesRead, buffer) { if (err) throw err; if (bytesRead!=buf.length) throw "not enough bytes read!"; console.log(buffer.toString('hex')); }); } );
Re^3: Curious about Perl's strengths in 2018
by stevieb (Canon) on Dec 13, 2019 at 17:43 UTC

    I think that Python is much more comparable to Perl than JS is.

Re^3: Curious about Perl's strengths in 2018
by LanX (Saint) on Dec 14, 2019 at 02:31 UTC
    > In Windows, some HP printer setup programs are written entirely in JavaScript, which is very cool. But these scripts will only work on Windows!

    I think you are referring to JScript, MS's own dialect from 20 years ago.

    That's no good comparison to modern JS.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (5)
As of 2024-04-19 07:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found