▶ No.935036>>935038 >>935049 >>935227 >>941209
grammar URL {
rule TOP {
<protocol>'://'<address>
}
token protocol {
'http'|'https'|'ftp'|'file'
}
rule address {
<subdomain>'.'<domain>'.'<tld>
}
...
}
▶ No.935038
>>935036
grammars are hnnng
▶ No.935042
▶ No.935046
>>935027 (OP)
>Why aren't you using Perl 6?
Because I seldom need to write 'write-only' code.
▶ No.935049>>935059
>>935036
how is this used?
▶ No.935056>>935058 >>946679 >>946763
>>935027 (OP)
Because PyPy/Numba is faster than Perl.
Because Conda is better than CPAN.
Because Python 3 is better than Perl 6.
Because there are so many libraries.
▶ No.935058
>>935056
>dog shit is better than horse shit
Thank you for your valuable input.
▶ No.935059
>>935049
It's a means of parsing, but more readable than regex. In this case you'd just do
URL.parse("https://8ch.net/");
▶ No.935065>>935094 >>957830
my $j = 1|2;
if 3 == $j + 1 {
say 'yes';
}
Junctions/Superpositions of values are built-in
▶ No.935066
>>935027 (OP)
>Why aren't you using Perl 6?
For all the reasons that were outlined the last time you made this zero effort thread, you retarded cocksucker.
▶ No.935072>>935448 >>957830
▶ No.935094>>935117 >>935118
▶ No.935117>>935445
>>935094
yes because it acts as two values, hence why it's called a junction
▶ No.935118>>935445
>>935094
also don't forget that it's being added to one, so 1|2 + 1 = 2|3
▶ No.935227
▶ No.935440
For people who want to install Rakudo (Rakudo is a Perl 6 compiler), here's a lot of ways:
https://rakudo.org/files/ - Rakudo Star includes some primary modules; this is the primary method of installation that most people use
OTHER OPTIONS
https://github.com/rakudo/rakudo - For building from scratch, you'll have to build Zef alongside it if you take this route
https://github.com/Tyil/lonestar - A bash script to install it for you (unofficial)
https://nxadm.github.io/rakudo-pkg/ - Precompiled rakudo packages
▶ No.935445
>>935117
>>935118
I thought that was the OR operator, how do you do binary OR in perl6?
▶ No.935448>>937825 >>942277
>>935072
I imagine it is, if you are already versed in the perl world. I doubt they'll attract many newer programmers tough, with the lure and effectiveness of python being what it is.
▶ No.935464>>935682
i use ruby because i want a girlfriend
▶ No.935682
>>935464
Bugman, just use Python
▶ No.935696>>935779 >>935967
Because there is no CPAN. When I go to modules.perl6.org all I see is
>hosted on microshit shithub
Seriously, why can't any other language beat perl5 package system? Why do they think it's a great idea to host packages at Microsoft (embrace, extend, and extinguish)?
>The distribution infrastructure of CPAN consists of its worldwide network of more than 250 mirrors in more than 60 countries.
▶ No.935779
>>935696
>reddit spacing
>github repos can't be mirrored
▶ No.935819
Perl 6 is just a poor man's Lisp. The one good thing about it is how it handles Unicode.
▶ No.935967
>>935696
A lot of Perl6 modules are hosted/mirrored on CPAN actually. But I agree, I'd rather us move away from GitHub altogether.
▶ No.937564
▶ No.937585>>937598 >>937838
>perl 6 is an entirely seperate language than perl 5
God damn this is so confusing. Python and SDL have the same version conflicts too, yet they're aren't as big as requiring a whole different compiler.
Why is rakudo the only compiler out there?
▶ No.937598>>937605 >>942167
>>937585
Just understand that Perl6 and Perl5 are COMPLETELY different, but funded by the same money pool.
It's the only FULL-FEATURE compiler out there.
▶ No.937605
>>937598
Can it be compiled into binaries?
▶ No.937825
>>935448
It's tough attracting users for languages in general, unless you use some leddit tactic like rust did.
▶ No.937838
>>937585
I can understand being upset about Python, but SDL is a library, a change in major version number signifies a break in backwards compatibility.
▶ No.938609
▶ No.941209>>942165
>>935036
That's nice, maybe I should look into Perl after all
▶ No.941289
>>935027 (OP)
>Why aren't you using Perl 6?
Because perl 5 continues to steal the good ideas from perl 6. Also the perl community in general has been hijacked by trannies and sjws. no thanks do not want
▶ No.942165
>>941209
Yeah, they can be really suitable for some things over normal regex, and much more readable.
▶ No.942167>>942168
>>937598
Why is it though?
Why hasn't there been anyone besides Raduko been able to past the test suite?
▶ No.942168>>942169
>>942167
There technically has.. but just like with other languages, one adoption takes precedence with time. All of the main people work on Rakudo (which can run on multiple VMs), really. There are other smaller implementations for people who REALLY want them.
▶ No.942169>>942177
>>942168
Is raduko small and portable? I don't want to work on a VM.
▶ No.942177
>>942169
Eh, it's similar to most modern languages. MoarVM is in the process of being further optimized these days.
▶ No.942274
▶ No.942277>>943318 >>943340 >>943455
>>935448
Sell me on this then. I'm a new programmer, going through the process of learning the most basic things about python. How learning perl6 instead of tons of other languages out there would benefit me, in your perspective?
▶ No.943318
>>942277
>Sell me on this then.
python is dying. their bdfl is a tired faggot. once gov't funding for this shitty US Fed astroturfed language dries up, it'll die for real
▶ No.943340
>>942277
You shouldn't learn it now. You could learn it later.
Perl is deliberately a lot of things that Python deliberately isn't. It's very implicit, it's weakly typed, it revels in having many different ways to accomplish simple tasks, its syntax is compact to the point of being opaque, it attempts to use context to infer what you mean. Python's grammar is LL(1), Perl 5's grammar is undecidable.
Python will hold you to a certain standard of good practice and readability. Perl will tempt you to hack something together that saves you a little typing now but will be a pain in the future.
Knowing both is better than knowing either one, if you have the wisdom to decide which one is appropriate, but it's better to only know Python than to only know Perl.
But while Python and Perl have different philosophies, they do fill approximately the same niche, so there are other languages it's more valuable to learn before Perl.
▶ No.943455>>943910
>>942277
As a beginner you often worry that your code is ugly. You don't have that problem with Perl.
▶ No.943910
>>943455
This is actually true, MoarVM has some ways to go, but that's the same for any modern VM. The Perl6 language specification is beautiful in my eyes, and using it for general scripting makes me happy.
▶ No.944395>>944400 >>944648 >>944739 >>957830
>>935027 (OP)
>why aren't you using Perl 6?
Because I'm masculine and, therefore, not welcome:
Discussion Highlights
=====================
From: Larry Wall
Date: March 24, 2009 10:25
Subject: Re: Logo considerations
[...] I think there's a tendency to
go way too abstract in most of these proposals. I want something
with gut appeal on the order of Tux. In particular I want a logo
for Perl 6 that is:
Fun
Cool
Cute
Named
Lively
Punable
Personal
Concrete
Symmetric
Asymmetric
Attractive
Relational
Metamorphic
Decolorizable
Shrinkable to textual icon
Shrinkable to graphical icon
In addition, you can extend just about anything by attaching "P6"
wings to it. I also take it as a given that we want to discourage
misogyny in our community. You of the masculine persuasion should
consider it an opportunity to show off your sensitive side. :)
Hence, Camelia.
Larry
Source:
https://github.com/perl6/mu/blob/aaa173d49c8ba681628739e96ed28fdb921211ec/misc/camelia.txt#L78-L80
▶ No.944400>>944614
>>944395
>waaa waaa why not everything male race war now
fuck off
▶ No.944614
>>944400
They're specifically wanting to de-maculineize men.
▶ No.944619>>945074 >>946042
so what would be a good program to write in perl6? i've been wanting to create my own text editor for awhile now but have been thinking go/rust would be a better option. where does perl6 fit in?
▶ No.944648>>946298
>>944395
If you are masculine then why are you acting like a woman?
Attached is a video of a real man being threatened.
▶ No.944739
>>944395
>>944395
>I also take it as a given that we want to discourage misogyny in our community. You of the masculine persuasion should consider it an opportunity to show off your sensitive side. :)
What a cuck. He could have just said he wanted something cute and whimsical.
▶ No.945074
▶ No.946042>>946318
>>944619
text processing is good for perl6, general system scripting, backends for websites now
▶ No.946298
>>944648
Since you've failed to actually say what wasn't masculine, I'm forced to assume that you're referring to the fact that I cited sources as being feminine.
▶ No.946318>>946433
>>946042
so why exactly would it be bad for things like system programming?
▶ No.946433
>>946318
It isn't, really. Some optimizations are still taking place within MoarVM, so some things are slow. This has been drastically improved in the last year or so, and is still being improved.
▶ No.946452
▶ No.946679>>956503
>>935056
JavaScript is faster than Python. By your own logic you should be using it.
▶ No.946763
>>935056
Perl6 is relatively young, despite being planned for several times longer.
PDL is Perl5's scientific computing library (mainly), and something similar is being planned to be made in Perl6.
▶ No.951877
▶ No.952002>>952082
>>935027 (OP)
>Why aren't you using Perl 6?
because:
A) the regexes are slow as shit and have been for 10 years, so it's useless for processing text
B) they removed pack/unpack with no usable replacement, so it's useless for processing binary
if I wanted a language that's deaf and blind and a little slow in the head, I'd use visual basic
▶ No.952040>>952083
▶ No.952082
>>952002
Perl6 hasn't been out for 10 years. The first OFFICIAL release was in 2015, 3 years ago.
▶ No.952083
>>952040
> 'perl6' gt 'perl5'
True
▶ No.952116>>957830
>>935027 (OP)
Perl6 will be able to use GraalVM soon, alongside MoarVM+JVM
▶ No.956344
▶ No.956503>>956518 >>956629
>>946679
Python is compiled
JavaShit isn't
There are fundamental difference here faggot
▶ No.956518>>956628 >>956632
>>956503
>Python is compiled
>JavaShit isn't
What?
▶ No.956628>>956737
▶ No.956629
>>956503
Javascript and Python are only reference languages. They both have implantations that compile them, brainlet.
▶ No.956632
>>956518
Python can be compiled
No one does that tho
▶ No.956737
>>956628
Python's reference implementation is compiled to bytecode. It isn't very fast.
Popular Javascript implementations are JIT compiled, and are pretty fast.
A JIT compiler for Python does exist.
But these are implementation details. Working with either language doesn't involve a separate compilation step, unless you're transpiling ES6 to an earlier Javascript standard or something.
▶ No.956785>>956786 >>956977 >>957830 >>958511
# Perl 6 has full unicode support, here's some notable options of Unicode in Perl 6 Operators:
say 5 ÷ 2; # 2.5
say 5 / 2;
say 5 × 2; # 10
say 5 * 2;
say 5 ≤ 2; # False
say 5 <= 2;
say 5²; # 25
say 5 ** 2;
▶ No.956786>>956977
>>956785
# Not to mention all of the maths-y unicode symbols that work out-of-the-box
# ∈ ∉ ∋ ∌ ⊂ ⊄ ⊃ ⊅ ⊆ ⊈ ⊇ ⊉ ≼ ≽ o ∘ ∩ ⊍ ⊖ ≠
▶ No.956977>>956985 >>957416
>>956786
>>956785
Sold! But seriously, modern languages should support these symbols at least as an option.
▶ No.956985>>957041
>>956977
Not necessarily. It makes sense for Perl to support them, but it wouldn't at all fit into Python's design to have a dozen interchangeable spellings of the exact same operator.
There's value in keeping a language small. It makes it easier to read other people's code.
▶ No.957041
>>956985
Python isn't a good example, but I agree for some languages. With that being said, Perl6 is extremely comfy and expressive because of it
▶ No.957414
sub postfix:<!>(Int $x where { $x >= 0 }) { [*] 1..$x };
say 6!; # 720
▶ No.957415
# Slurpee Arguments - Flattens Items into Argument List
sub slurpee( |args ){
say args.perl
}
slurpee(<a b c d>, {e => 3}, 'e' => 'f' => 33) # \(("a", "b", "c", "d"), {:e(3)}, :e(:f(33)))
▶ No.957416
>>956977
Fuck no. Why would you want to make it harder for people to work on each other's code?
▶ No.957417>>957419
It doesn't, really, if they use it properly.
▶ No.957419>>957420
>>957417
That usually means not using it at all if the code may ever be read by another human being.
If I encountered ∈ for the first time, without already knowing it existed, I'd have to look it up just to make sure I understood it, even though I could guess from the mathematical meaning of the symbol. If I didn't already know the mathematical meaning, I would waste even more time. I also have to dedicate extra mental space to remember all of (elem), (cont), ∈, ∉, ∋ and ∌. Meanwhile, Python makes do with just the "in" operator (and the "not in" operator, technically, but that's intuitive and straightforward enough not to take up any extra mental space).
That's acceptable, if you're the only one who's going to work on that code. But I can't think of a proper use in code someone else needs to look at, other than extremely niche cases like executable pseudo-code for a mathematical audience that doesn't know Perl.
▶ No.957420>>957424
>>957419
Part of Perl 6's audience is the same mathematics-oriented functional users of Haskell, which also makes use of things like these. It is an option and doesn't take long to learn at all.
▶ No.957424>>957426
>>957420
It doesn't take long, but it does take a small amount of time, and a small size increase of your mental model, for a small feature. It all adds up. I don't think it's worth it. This instance alone is small enough not to matter much, but it's part of a pattern with a real impact.
Reading code involves a lot of pattern matching. You recognize an idiomatic code fragment and reduce it to a personal mental model so you can reason about it more effectively. The larger the number of reasonable ways there are to do something, the more patterns you have to look out for, and the more effort it takes to reason about code. That's the cost of TMTOWTDI.
▶ No.957426>>957428
>>957424
I think it's worth it.
▶ No.957428
>>957426
I think it's worth it when you're hacking away on your own, but that standardization is more valuable when the code is going to be read by different people.
▶ No.957431>>957434
its been in development for 20 years and is STILL slower than perl5
perl5 is amazingly fast and versatile, just dont write anything too large in it
▶ No.957434>>957751 >>957753 >>957830
>>957431
It isn't, really, anymore. If you were up to date, you'd know the latest optimizations for 6.d are faster in some cases than Perl5. (some aren't though, still obviously)
In any case, Perl6 is speeding up exponentially faster than most languages. The actual implementation of MoarVM & modern rakudo is very recent -- it's the language spec that has been CONSIDERED for 20 years.
▶ No.957751>>957753 >>957814 >>957830
>>957434
how about some sources? because regex in p5 is still superior in speed to anything else in any other language
▶ No.957753>>957814
>>957434
>>957751
Benchmarks compared to Python, Ruby and the rest?
▶ No.957814
>>957751
regex is one of the few parts that hasn't been worked on as much by the core developers
>>957753
still slower, won't be forever
▶ No.957830>>958511 >>958513 >>958995
>>957751
> perl regex are good
https://swtch.com/~rsc/regexp/regexp1.html
>>957434
>latest optimizations
Which are not real optimizations of the compiler or the grammar, but rather ad-hoc replacements of higher-level Perl 6 code with lower level NQP one.
>>944395
You should have also brought up that main developer besides now pozzed Larry are a tranny, a 70-year old dyke and some bunch of mu-males.
>>952116
>JVM
Which is a outdated and abandoned port. Without the interop it has no serious use.
>>935065
Junctions and stuff like >>956785 would make a great macro but instead they are burnt into the core grammar, which is a mess for this very reason.
>>935072
It only seems that way if you have done a lot of Perl 5 or PHP
▶ No.958511
>>957830
It feels nothing like PHP or Perl5 lol, and I had done neither before encountering Perl6 (which I think feels amazing).
>You should have also brought up that main developer besides now pozzed Larry are a tranny, a 70-year old dyke and some bunch of mu-males.
This plainly isn't true. The core developers are mostly all normal white men (albeit somewhat older than what is average with some other programming communities)
>Junctions and stuff like >>956785 (You) would make a great macro but instead they are burnt into the core grammar, which is a mess for this very reason.
This doesn't make anything a mess lol, that's what p6 grammars were built for, handling complicated means of interpretation; for that, they work wonders.>>957830
>Junctions and stuff like >>956785 (You) would make a great macro but instead they are burnt into the core grammar, which is a mess for this very reason.
▶ No.958513>>958683
>>957830
>You should have also brought up that main developer besides now pozzed Larry are a tranny, a 70-year old dyke and some bunch of mu-males
How you know this guy is wrong: Larry Wall isn't even a core developer of Perl6.
▶ No.958683>>958698
>>958513
Stop being retarded. He designed the whole thing, also he is in the top 10.
$ git log | perl6 -e 'lines.grep(/^^ "Author:" \s+ (.*) $$/).Bag.sort(*.value).tail(10).map(*.say)'
Author: Patrick R. Michaud <pmichaud@pobox.com> => 787
Author: TimToady <larry@wall.org> => 822
Author: Tobias Leich <email@froggs.de> => 896
Author: Elizabeth Mattijsen <liz@wenzperl.nl> => 1251
Author: Zoffix Znet <cpan@zoffix.com> => 1694
Author: pmichaud <pmichaud@pobox.com> => 1748
Author: Moritz Lenz <moritz@faui2k3.org> => 2975
Author: Jonathan Worthington <jnthn@jnthn.net> => 3314
Author: jnthn <jnthn@jnthn.net> => 3329
Author: Elizabeth Mattijsen <liz@dijkmat.nl> => 4536
▶ No.958698
>>958683
He didn't design "the whole thing", lol. Perl6 is meant to be community driven. Also is that for the perl6 organization or what?
(1) That doesn't cover any of the implemented compiler or vm.
(2) That must've been years ago; he doesn't contribute ACTIVELY TODAY, meaning he IS NOT A CORE DEVELOPER.
▶ No.958994>>959096
>>935027 (OP)
>Why is the perl community fucked?
This is why.
>https://act.perlconference.org/tpc-2018-glasgow/news/1568
>https://archive.fo/O3t1m
1,000 Internet points for the first person to post Keating's slides or video of talk. Word is it was hilarious.
▶ No.958995
>>957830
>You should have also brought up that main developer besides now pozzed Larry are a tranny, a 70-year old dyke and some bunch of mu-males.
You are not wrong. This describes pretty much anyone who still shows their face at perl gatherings.
▶ No.959023
>all languages are pozzed even ones that are still in beta
I dislike python but fuck me I can't find anything else to use.
▶ No.959096