Need advice about which tool to choose?Ask the StackShare community!

JRuby

86
89
+ 1
32
Perl

3.4K
928
+ 1
574
Add tool

JRuby vs Perl: What are the differences?

JRuby: A high performance, stable, fully threaded Java implementation of the Ruby programming language. JRuby is the effort to recreate the Ruby (http://www.ruby-lang.org) interpreter in Java. The Java version is tightly integrated with Java to allow both to script any Java class and to embed the interpreter into any Java application. See the docs directory for more information; Perl: Highly capable, feature-rich programming language with over 26 years of development. Perl is a general-purpose programming language originally developed for text manipulation and now used for a wide range of tasks including system administration, web development, network programming, GUI development, and more.

JRuby and Perl belong to "Languages" category of the tech stack.

"Java" is the top reason why over 7 developers like JRuby, while over 62 developers mention "Lots of libraries" as the leading cause for choosing Perl.

JRuby and Perl are both open source tools. It seems that JRuby with 3.32K GitHub stars and 830 forks on GitHub has more adoption than Perl with 435 GitHub stars and 152 GitHub forks.

According to the StackShare community, Perl has a broader approval, being mentioned in 133 company stacks & 64 developers stacks; compared to JRuby, which is listed in 13 company stacks and 4 developer stacks.

Advice on JRuby and Perl
Needs advice
on
GolangGolangPerlPerl
and
RustRust

I intend to use a programming language which I'll use as AWS runtime and write a script that will comb through tons of files in a directory and its subdirectories and search for simple text regular expressions and process and write the matches in a file as output. I have heard that Perl is good for regex based search but I also want the performance to be good as it will have to go through tons of files for IO. In this post: https://filia-aleks.medium.com/aws-lambda-battle-2021-performance-comparison-for-all-languages-c1b441005fd1, I see that Rust works well as AWS Lambda runtime with very good performance. Which one should I choose as my AWS lambda runtime for this problem? Golang is also an option as it is fast as per the above link.

See more
Replies (1)
Recommends

I used to work in a Perl shop and must admit that the language is very simple for tasks like these, but as you mentioned it's not fast at execution time. I'm now a Go programmer professionally but I taught myself the language while in college purely out of interest and eventually found my way to the job, not the other way around. I've recently been learning a little rust because of how much that language comes up in conversations around Go. I find the concept of the borrow checker nice but I have to admit I feel lost like I am in most flavors of new fancy framework js. That's not to say Rust is really anything like js, but the learning appears the same to me as someone who's convinced they could learn just about any programming language if it was necessary (over time I've seen procedural, OOP, declarative and functional stuff but never programming logic outside of the prolog code I wrote in school).

Go isn't made for your specific task at hand but it's a very easy language to pick up and it has good directory traversal standard library code and good regex (even though with time perl's has been optimized to be faster and I think it's written in C++) but more than anything Go is "cloud native" programming in that an awful lot of new microservice tech stacks are centered around it, docker and kubernetes are written in it, and there's a thriving community whose focus is generally web-first and performance-oriented. This means for your use case there might already be a large cohort of gophers that have asked the stackoverflow questions for you

I personally would push you towards the NYT Profiler for Perl before I would towards Rest, but that's because I know you wouldn't waste any time being able to get to the task at hand and then make it go faster, and I expect all but a few rustaceans would be able to do so with the same speed.

Whatever you pick I wish you the very best of luck!

See more
Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of JRuby
Pros of Perl
  • 8
    Java
  • 7
    Faster than Ruby
  • 3
    Threads
  • 3
    JVM
  • 2
    Open source
  • 2
    Supports native Ruby gems out the box
  • 2
    Garbage collection built-in
  • 2
    Built-in Testing
  • 2
    Deploy as executable jay
  • 1
    Great community
  • 72
    Lots of libraries
  • 66
    Open source
  • 61
    Text processing
  • 54
    Powerful
  • 49
    Unix-style
  • 47
    Regex
  • 37
    Stable
  • 32
    Concise syntax
  • 29
    Hackerish
  • 22
    Easy to use
  • 15
    Swiss army chainsaw
  • 13
    Code Less Do More
  • 12
    CPAN
  • 9
    Freedom
  • 8
    All purpose
  • 5
    Many ways to do it
  • 5
    Familiar
  • 5
    Readability
  • 5
    Community
  • 4
    Modular
  • 4
    Smart (does alot for you)
  • 4
    Object-Oriented
  • 3
    Postmodern
  • 3
    It's the best one-off task language
  • 2
    For a man
  • 2
    Good man pages
  • 1
    Auto case variables
  • 1
    Single Source Library (CPAN)
  • 1
    Multi-threaded support
  • 1
    Hashes
  • 1
    C-style
  • 1
    Multiparadigm

Sign up to add or upvote prosMake informed product decisions

Cons of JRuby
Cons of Perl
    Be the first to leave a con
    • 4
      Messy $/@/% syntax
    • 3
      No exception handling
    • 2
      Bad OO support
    • 2
      "1;"
    • 2
      No OS threads
    • 1
      Variables are global by default
    • 1
      Copy-on-create for interpreter-based threads
    • 1
      Barewords
    • 1
      Errors/warnings are ignored by default

    Sign up to add or upvote consMake informed product decisions

    What is JRuby?

    JRuby is the effort to recreate the Ruby (http://www.ruby-lang.org) interpreter in Java. The Java version is tightly integrated with Java to allow both to script any Java class and to embed the interpreter into any Java application. See the docs directory for more information.

    What is Perl?

    Perl is a general-purpose programming language originally developed for text manipulation and now used for a wide range of tasks including system administration, web development, network programming, GUI development, and more.

    Need advice about which tool to choose?Ask the StackShare community!

    What companies use JRuby?
    What companies use Perl?
    See which teams inside your own company are using JRuby or Perl.
    Sign up for StackShare EnterpriseLearn More

    Sign up to get full access to all the companiesMake informed product decisions

    What tools integrate with JRuby?
    What tools integrate with Perl?

    Sign up to get full access to all the tool integrationsMake informed product decisions

    Blog Posts

    What are some alternatives to JRuby and Perl?
    Ruby
    Ruby is a language of careful balance. Its creator, Yukihiro “Matz” Matsumoto, blended parts of his favorite languages (Perl, Smalltalk, Eiffel, Ada, and Lisp) to form a new language that balanced functional programming with imperative programming.
    Groovy
    It is a powerful multi-faceted programming language for the JVM platform. It supports a spectrum of programming styles incorporating features from dynamic languages such as optional and duck typing, but also static compilation and static type checking at levels similar to or greater than Java through its extensible static type checker. It aims to greatly increase developer productivity with many powerful features but also a concise, familiar and easy to learn syntax.
    Rails
    Rails is a web-application framework that includes everything needed to create database-backed web applications according to the Model-View-Controller (MVC) pattern.
    Golang
    Go is expressive, concise, clean, and efficient. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel type system enables flexible and modular program construction. Go compiles quickly to machine code yet has the convenience of garbage collection and the power of run-time reflection. It's a fast, statically typed, compiled language that feels like a dynamically typed, interpreted language.
    Java
    Java is a programming language and computing platform first released by Sun Microsystems in 1995. There are lots of applications and websites that will not work unless you have Java installed, and more are created every day. Java is fast, secure, and reliable. From laptops to datacenters, game consoles to scientific supercomputers, cell phones to the Internet, Java is everywhere!
    See all alternatives