in reply to Camel vs. Gopher

I like both languages
Me too.

Concurrency is finally easy and fun.

Being faster then perl is only a bonus.

Replies are listed 'Best First'.
Re^2: Camel vs. Gopher
by Your Mother (Archbishop) on Dec 12, 2018 at 19:52 UTC
    Being faster then perl is only a bonus.

    Hey now. My direct, pure Perl answer was four times faster than the original Perl presented and not even twice as slow as the go; 70% slower on my box.

    vr's answer, with a well-known Perl module, is two times faster than the go and kschwab's answer is ten times faster than the go and still shorter by several lines a few dozen chars. Being faster is a matter of tuning and knowing the problem space. With the evidence presented, Perl is the clear speed, space, and cognitive load winner if you know how to match it with the problem.

      Sure :-)

      In this particular case where you don't even think about doing part of the work in concurrently a perl solution maybe can be optimized to even beat Go.

      But I can see that you're not being too serious...

      For me Go is the new Perl - a language with a rich ecosystem, that is fun to use and that makes things easy that where very difficult before...

        …I am having fun but I'm being a bit serious. The Perl (plus inline C but that's there because it's easy in Perl) is TEN times faster. It leaves Go in the dust and, to me, it's easier to read. Go reads more like the new Java than the new Perl; which I might call Scala but I still like Perl better.

Re^2: Camel vs. Gopher
by 1nickt (Canon) on Dec 12, 2018 at 20:59 UTC

    Concurrency and shared data have been fun and easy and fast in Perl for quite some time, for example with MCE and MCE::Shared.


    The way forward always starts with a minimal test.

      See the MCE and MCE::Shared demonstration here.

      That may be so.

      I see that you need more convincing, so here is another kill-feature of Go: Cross-compiling statically linked binaries.

      On my linux-system I can build binaries for Mac (or Windows) that do not have any dependencies and will simply work when I copy ONE file to another machine running a different OS.

      Do that with Perl.

          ...here is another kill-feature of Go: Cross-compiling statically linked binaries.

          On my linux-system I can build binaries for Mac (or Windows) that do not have any dependencies and will simply work when I copy ONE file to another machine running a different OS.

          Do that with Perl.

        DONE! (Linux + Mac + Windows + FreeBSD + OpenBSD + NetBSD + BIOS)

        NAME

        Perl::Dist::APPerl - Actually Portable Perl

        DESCRIPTION

        Actually Portable Perl (APPerl) is a distribution of Perl the runs on several x86_64 operating systems via the same binary. It builds to a single binary with perl modules packed inside of it.

        Cross-platform, single binary, standalone Perl applications can be made by building custom versions of APPerl, with and without compiling Perl from scratch, so it can be used an alternative to PAR::Packer. APPerl could also easily be added to development SDKs, carried on your USB drive, or just allow you to run the exact same perl on all your PCs multiple computers.

        The comparison doesn't make sense since perl is not normally deployed in binary form (executable/dll). You're comparing statically *compiled* language with dynamic languages (like perl/python). You don't use Perl if you need such compiled language feature.