Stories
Slash Boxes
Comments

SoylentNews is people

posted by cmn32480 on Sunday December 27 2015, @05:51PM   Printer-friendly
from the begin-rehash-port-in-3-2-1..... dept.

It's been 15 years in the making. Unveiled in October, Perl 6 has been officially released:

On behalf of the Rakudo[1] development team, I'm proud to announce the Christmas release (December 2015) of Rakudo Perl 6 #94 "коледа"[2]. Rakudo is an implementation of Perl 6 on the Moar Virtual Machine.

[...] Together, we've built a language that:

  • Retains the core values of Perl: expressiveness, getting the job done, taking influences from natural language, and pushing the boundaries of language design
  • Has clean, modern syntax, rooted in familiar constructs but revisiting and revising the things that needed it

[...] While we are extremely happy to ship an official Perl 6 release, this is not the end of Rakudo's development. We will continue to ship monthly releases, which will continue to improve performance and our users experience. We'll also continue our work on the specification, with feedback from the community.

Related: Perl 6 Gets Beta Compiler, Modules and an Advent Calendar


[1] According to Wikipedia:

The name "Rakudo" for the Perl 6 compiler was first suggested by Damian Conway.[7] "Rakudo" is short for "Rakuda-dō" (with a long 'o'; 駱駝道), which is Japanese for "Way of the Camel". "Rakudo" (with a short 'o'; 楽土) also means "paradise" in Japanese.

[2] According to Wikipedia:

Koliada or koleda (Cyrillic: коляда, коледа, колада, коледе) is an ancient pre-Christian winter ritual/festival. It was later incorporated into Christmas.

Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 1, Interesting) by Anonymous Coward on Sunday December 27 2015, @07:01PM

    by Anonymous Coward on Sunday December 27 2015, @07:01PM (#281477)

    What does that mean to me as someone who uses perl for data massaging? How much of the language has changed?

    Starting Score:    0  points
    Moderation   +1  
       Interesting=1, Total=1
    Extra 'Interesting' Modifier   0  

    Total Score:   1  
  • (Score: 1, Funny) by Anonymous Coward on Sunday December 27 2015, @10:38PM

    by Anonymous Coward on Sunday December 27 2015, @10:38PM (#281522)

    Data massaging, I like the sound of that.

  • (Score: 4, Informative) by bzipitidoo on Monday December 28 2015, @12:53AM

    by bzipitidoo (4388) on Monday December 28 2015, @12:53AM (#281550) Journal

    The Perl6 designers evidently didn't feel constrained to stick closely to Perl5 syntax. The sigil madness has been extended to brackets. They pressed the « » unicode characters into service because they wanted more kinds of brackets than exist in ASCII. Until I do it enough times, I'm having to keep notes on how to type those in. (In Linux, can do ctrl-shift-u then the hex code. For those brackets, the guillemets, the hex codes are ab and bb.)

    Regexs got some makeovers, with things like character sets being denoted with <[ and ]>, which freed the brackets for another use, grouping, same as parentheses did and still do, except that groups denoted with brackets are not captured, that is, not put into $1, $2, and so on. Captures go into a tree instead of an array, that is, in (a(b)), b is not put into $2, it's put into-- well, I'll have to look that up again, something like $1[1]. I thought the way to denote a negative character set is neat, just include a dash between the opening braces: <-[ ]>. Another big change is that space in a regex is now just whitespace.

    References to elements of arrays and hashes are another. @a to represent an array has not changed, but to refer to the first element, it's $a[0] in Perl5, and @a[0] in Perl6. Same thing with hashes. I have to admit on that one I like Perl6 better. Watch out though, the docs are still very much a work in progress. Have come across examples where they're still thinking in Perl5, still using $a[0].

    • (Score: 5, Informative) by Marand on Monday December 28 2015, @02:17AM

      by Marand (1081) on Monday December 28 2015, @02:17AM (#281571) Journal

      They pressed the « » unicode characters into service because they wanted more kinds of brackets than exist in ASCII. Until I do it enough times, I'm having to keep notes on how to type those in. (In Linux, can do ctrl-shift-u then the hex code. For those brackets, the guillemets, the hex codes are ab and bb.)

      It's no wonder you're having trouble, trying to memorise hex codes; it might be the only option in some OSes, but you can do much better than that in Linux (or anything else that uses X11, actually). Allow me to introduce the Compose key [wikipedia.org]. You won't have one by default, but you can tweak your keyboard layout to replace some other unused key with it. With the Compose key, you can input those extended characters with sequences of Compose, key, key. For example, ¥ is Compose, Y, =; and the guillemets are Compose, <, < and Compose, >, > for « and ». It also helps with doing accented characters on keyboard layouts that lack them, such as á being Compose, a, '.

      Enabling compose keys
      The command-line way is to use setxkbmap with the correct -option, such as my preference of using setxkbmap -option compose:rwin to replace the right-side windows key with Compose. Another useful one is compose:menu, which replaces that silly popup menu key. To help with setup, X provides a file that lists all the valid -option entries. On Debian, it's in /usr/share/X11/xkb/rules/base.lst, not sure about other distros. (You can also use setxkbmap -option with no additional arguments to reset to default, in case you don't like your changes)

      Once you're set, you can run it at X startup however you like, maybe as part of xinitrc.

      Another way to set it up is to check for a GUI configuration provided by whatever desktop environment you prefer. KDE keeps it in System Settings, under the "Regional & Language" section. (Specifically, in that section under Keyboard Layout's advanced tab.) It lists all the -option possibilities and has checkboxes to toggle them for easy testing. GNOME should have something similar, if you use that. No idea about Unity, Xfce, etc.; if in doubt, just go with setxkbmap.

      Adding new compose sequences
      By default there's a huge assortment of Compose sequences available. You can either search online for a list or look at /usr/share/X11/locale/en_US.UTF-8/Compose (replace en_US.UTF-8 with whatever your locale is) on your system; any entry that starts with <Multi_key> is a compose key combination. However, not all extended characters have compose keys. If that's the case, you just have to add your own. X11 checks for ~/.XCompose and uses it instead, so you can create that file and define your own entries. Note that it uses it instead of the system-wide one, so you have to add an include statement to refer back to the original. As an example, this is mine:

      include "/usr/share/X11/locale/en_US.UTF-8/Compose"

      <Multi_key> <8> <8> : "∞" # Infinity
      <Multi_key> <KP_8> <KP_8> : "∞" # Infinity
      <Multi_key> <v> </> : "✓" # check
      <Multi_key> <p> <o> : " " # PILE OF POO

      This should be all that's needed, at least with most applications; now Compose,p,o outputs 💩, Compose,8,8 prints ∞, and Compose, v, / gives a check (√). However, Gtk apps may ignore custom entries until you set the environment variable GTK_IM_MODULE=xim. This was a problem with Gtk2 apps, not sure about Gtk3.

      • (Score: 3, Informative) by darkfeline on Tuesday December 29 2015, @03:08AM

        by darkfeline (1030) on Tuesday December 29 2015, @03:08AM (#281952) Homepage

        Or you can use Emacs and insert Unicode characters by fuzzy matching their name. For example, type "rig dou ang bra", press Enter to select RIGHT DOUBLE ANGLE BRACKET. If you need it a lot, you can always bind it to a key.

        Since Emacs supports both server-clients and remote editing, you can use it everywhere. My favorite is running Vim through SSH in an Emacs terminal emulator, then running an Emacs client from within Vim to edit my Neovim configuration on that same remote server.

        Yes, that's a joke.

        --
        Join the SDF Public Access UNIX System today!
    • (Score: 2) by Marand on Monday December 28 2015, @02:34AM

      by Marand (1081) on Monday December 28 2015, @02:34AM (#281575) Journal

      Sorry for the double post, but I forgot to elaborate on why going through the effort of setting up a compose key is worth it: easier memorisation. Most of the sequences are fairly self-documenting, in that they tend to use similar-looking characters and combinations. Instead of learning hex combinations, you can add a ^ onto most characters with compose, ^, [letter]. Likewise for ` and ´ accents, adding ¯ onto characters, etc. Has uses for currency, too: € is C=, £ is L-, c| is ¢. Another great example is fractions, because things like ½ ⅓ and ¼ are combinations of compose and the numbers (so ½ is compose 1 2). This makes them more discoverable generally, and much easier to remember once discovered.

      Also, the URL I used to provide with a list of common ones is dead, but I found this one [cheatography.com] instead.

      • (Score: 2) by bzipitidoo on Tuesday December 29 2015, @01:11AM

        by bzipitidoo (4388) on Tuesday December 29 2015, @01:11AM (#281927) Journal

        Thanks. I'm all for easier methods. I'd encountered compose a long, long time ago, and forgotten about it. Gave it a try, and it mostly works. ±. At least, I can get the guillemets, accented letters, currencies, and some of the other characters, but not infinity or the pile of poo. Never used lwin anyway, was just a dead key to me.

        Wasn't sure where to put the setxkbmap command, but looked at the LXDE website, and they recommended .bashrc.

        • (Score: 2) by Marand on Tuesday December 29 2015, @01:59PM

          by Marand (1081) on Tuesday December 29 2015, @01:59PM (#282050) Journal

          Gave it a try, and it mostly works. ±. At least, I can get the guillemets, accented letters, currencies, and some of the other characters, but not infinity or the pile of poo.

          The infinity and poo were examples of custom-defined ones, you'd have to set up your own ~/.XCompose file to use them. And even then, you might have to do some tweaking depending on what toolkit the app is using; gtk ones are prone to problems as mentioned. Qt apps in my experience "just work" with custom xcompose files, but gtk ones need a custom environment variable to change how they handle input. It's obnoxious, yet another reason gtk is a pain in the ass for the user and just needs to die already.

    • (Score: 1) by jb on Monday December 28 2015, @03:03AM

      by jb (338) on Monday December 28 2015, @03:03AM (#281583)

      They pressed the « » unicode characters into service because they wanted more kinds of brackets than exist in ASCII. Until I do it enough times, I'm having to keep notes on how to type those in.

      Don't worry: next they'll probably bring back trigraphs...

      ...oh wait, that's already happened. I wonder if Filter::Trigraph is Perl6-ready ;)

  • (Score: 2) by The Mighty Buzzard on Monday December 28 2015, @01:10AM

    by The Mighty Buzzard (18) Subscriber Badge <themightybuzzard@proton.me> on Monday December 28 2015, @01:10AM (#281553) Homepage Journal

    Enough that it's not a doable thing to go from perl5 to perl6 and think of it as just a new version. It is most assuredly a new language.

    --
    My rights don't end where your fear begins.