Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Perlscript VS Javascript

Name: Anonymous 2010-03-26 18:25

What is worse or better in your opinon. And how many of you know about perlscript?

I always thought it would be cool having perl both clientside and serverside insead of this faggatory mess we have right now.

I like perl, so perlscript is my favorite but its sad perlscript is not so popular.

Name: Anonymous 2010-03-26 18:43

>>1
ActiveX
PerlScript
Client side

Enjoy you M$ IE-only PerlScript /woprog/.

Name: Anonymous 2010-03-26 18:44

Actually my vote goes to JavaScript. The thing is, I have mad respect for ECMAScript, and the only hate I have for JS stems from the fact that it is faced with the tasks of HTML DOM trees and nonstandard implementations. Doing that to perl would make it just as bad or worse.

Name: Anonymous 2010-03-26 19:10

Javascript is mostly fine.
Personally I'm liking the idea of CL on the server-side and CL on the client-side by compiled ParenScript(compiles to JS).

Name: Anonymous 2010-03-26 19:20

>>3
I like the idea of ECMAScript, but there are too many shitty design decisions and outright bugs baked into the spec for it to be good. Implicit var hoisting up to function scope with no let? typeof null == "object"? And all of the shit that should've been implemented years ago (modules, type annotations) is deferred to the quasi-vaporware ECMAScript Harmony.

Name: Anonymous 2010-03-26 19:41

>>5
Harmony
ALWAYS I WANNA BE WITH YOU
AND MAKE BELIEVE WITH YOU
AND LIVE IN HARMONY HARMONY OOH LOVE

Name: Anonymous 2010-03-26 19:42

>>5
Yeah, ECMAScript has it flaws to be sure. Hell, I don't even know it, really. I've seen some of its flaws but regardless, I really like the strengths I've seen. Perl, which I know very well (if such a thing can be said), is flawed in having too many adornments. The smaller scope of ECMAScript is appealing to me here, but the lack of modules is a bit of an issue to be sure.

Name: Anonymous 2010-03-26 20:10

>>5,7
Well, you can workaround the module thing using different scripts and objects as namespaces. It's not that of a big deal, and you can even use Ajax to make it look more like you're importing modules.

Though, it's just it, a workaround. Most of the flaws in ECMAScript can be overcome by these for its prototyping nature. The worse part, really, for me in JavaScript is the fact you can use only doubles, which makes bitwise and any mathematical operations worse-than-Ruby-performance-wise.

Have never touched Perl, though, so can't really compare both languages.

Name: Anonymous 2010-03-26 20:27

>>7
I agree: Perl is definitely harmed by the insane syntax giving rise to mutually incomprehensible subsets of the language. I like ECMAScript's comparative purity, but just wish they'd included a few more things (for example, a way to mark properties as non-enumerable so that for .. in loops weren't completely worthless), and taken out some of the crap (like with, which is stupid).

And, although THE SUSSMAN would disapprove, I'd also like some syntactic sugar for creating classes. Having every different JS library roll its own shitty object system is a bitch.

Name: Anonymous 2010-03-26 20:38

>>8
AJAX isn't a thing I'm willing to consider. But yeah, using objects as namespaces/modules is... well pretty much what Perl does, in its own special way (i.e. a package is basically all three, which is not bad, IMO. It could be better though.)

>>9
Perl still seems necessary to me. I'm not sure why, because I do prefer purity to adornment. Some of its duplication of services really evens things out, and the fact that regex is first class is a big deal to me. Not because I use regex all the time (though I do often enough), but because passing patterns to functions is just so damn disgusting that I hate to have to ever do it.

Name: Anonymous 2010-03-26 21:11

>>10
HATE MY ANUS

Name: Anonymous 2010-03-26 22:06

perl can't do mutually recursive anonymous functions.

Name: Anonymous 2010-03-26 22:10

>>12
Is that true? I kind of doubt it is, but it's not often necessary.

Name: Anonymous 2010-03-26 22:22

>>12
Of course it can.  Who would spread such filthy lies?

Name: Anonymous 2010-03-26 22:23

>>12,13
There's no tailcall elimination, but otherwise it works.

Name: Anonymous 2010-03-26 22:25

>>12
So Perl can't do something like this:

(let ((a-fun
       (lambda (function n)
         (print n)
         (unless (zerop n)      
           (funcall function function (1- n))))))
  (funcall a-fun a-fun 10))

?

Name: Anonymous 2010-03-26 23:02

>>16
more like this:

function fib(n)
{ return (
  function(i)
  { return i == 1 ? 0 :  arguments.callee(i - 1) + (
    function(i)
    { return i == 1 ? 1 :
        arguments.callee.caller(i - 1) })(i - 1) })(n + 1) }


...which even that ugly pile of syntax you call a language can't do.

Name: Anonymous 2010-03-27 2:40

>>17
see >>14

Name: Anonymous 2010-03-27 3:30

>>18
>>14 just makes an assertion that perl can do it. unless code is posted proving otherwise, >>14 means nothing.

Name: Anonymous 2010-03-27 4:01

if only caller[1] would give you something more useful than "&main::__ANON__" for anonymous functions...

1. http://perldoc.perl.org/functions/caller.html

Name: Anonymous 2010-03-27 4:36

>>19
You know you can pass the caller explicitly right?

Name: Anonymous 2010-03-27 5:20

>>21
that doesn't work so well when the caller is an anonymous function.

Name: Anonymous 2010-03-27 8:56

>>21
You know you can CONTINUATION PASS MY ASS

Name: Anonymous 2010-03-27 10:39

>>19
>>12,17 just makes an assertion that it can't.  And claiming Perl can't do something is absurd.

use Devel::Caller 'caller_cv';

sub fib {
    sub {
        $_[0] == 1 ? 0 : caller_cv(0)->($_[0]-1) + sub {
            $_[0] == 1 ? 1 : caller_cv(1)->($_[0]-1)
        }->($_[0]-1)
    }->($_[0]+1)
}

Name: Anonymous 2010-03-27 10:47

I'd like to see each browser vendor try to make their own, JIT compiled, standards (lol) compliant version of Perl.

Name: Anonymous 2010-03-27 11:08

I'd like to see each browser vendor try to make their own, JIT compiled, standards (lol) compliant version of JavaScript.

Name: Anonymous 2010-03-27 11:43

>>26
IHBT

Name: Anonymous 2010-03-27 16:09

>>26
I cringed and then lol'd

Name: Anonymous 2010-03-27 16:35

>>24
sure, some module written in c can do it, but pure perl can't.

Name: Anonymous 2010-03-27 16:36

>>22
Sure it works. Anonymity doesn't prevent it from being bound.

If you're talking unnamed, unbound functions, that's another story and I wouldn't be even a little surprised to find out that perl can't do it but I'd be even less surprised to find someone making perl do it nonetheless. (It's less surprising than e.g. the persistent locals hack... which even Larry Wall considered abusive.)

Name: Anonymous 2010-11-28 12:16

Name: Anonymous 2011-02-04 19:01

Don't change these.
Name: Email:
Entire Thread Thread List