News for hackers. Stuff that matters.
Re:The Egison Programming Language by Ultimatt on Friday July 13, 2018 @07:36PM (#17527718)
Or in my fave language:

     my @primes = (1..∞).grep: *.is-prime;
     my @twin_primes = map { ($_, $_+2) }, @primes.grep: (*+2).is-prime;
Re:The Egison Programming Language by sp332 on Friday July 13, 2018 @07:48PM (#17527782)
Gonna go out on a limb and guess... Perl 6?
Re:The Egison Programming Language by ORioN63 on Friday July 13, 2018 @10:02PM (#17528362)
`my` gives away perl

infinite symbol gives away 6

So, yeah. Correct me if I'm wrong.

Re:The Egison Programming Language by Ultimatt on Saturday July 14, 2018 @11:20AM (#17530655)
Yup both right. All the clues were there >:3 I could have used Inf instead of the unicode but thats not really whimsical enough for Hacker News.

A slightly less listy pattern style is to declare types. Like I'd prefer this sort of declarative style:

     subset Prime of Int where *.is-prime;
     subset TwinPrime of Prime where (* + (2|-2)).is-prime;
     my @twin_primes = grep TwinPrime, ^Inf;
Just feels a lot more clear what my intent is and I get some cheap types for later, to use in function parameters that require twin primes.
Re:The Egison Programming Language by nerdponx on Tuesday July 17, 2018 @11:49AM (#17550503)
Huh, this is actually making me want to give Perl 6 another try.

How is performance on a task like this compared to, say, Python?