[ / / / / / / / / / / / / / ] [ dir / cafechan / hisrol / ita / leftpol / soyboys / sw / thestorm / vg ][Options][ watchlist ]

/tech/ - Technology

You can now write text to your AI-generated image at https://aiproto.com It is currently free to use for Proto members.
Name
Email
Subject
Comment *
File
Select/drop/paste files here
Password (Randomized for file and post deletion; you may also set your own.)
* = required field[▶ Show post options & limits]
Confused? See the FAQ.
Expand all images

File (hide): 7d3c9a375fd0de0⋯.png (20.93 KB, 425x281, 425:281, rakudo-camelia-sri.png) (h) (u)

[–]

 No.917410>>917411 >>917535 >>919159 >>920728 [Watch Thread][Show All Posts]

Why aren't you using Perl6?

--

https://rakudo.org/

https://perl6.org/

For help visit #Perl6 on irc.freenode.net

 No.917411

>>917410 (OP)

>100% built on C and a lighterweight version of itself

>friendly and inviting community

MoarVM - https://www.moarvm.org/

Weekly Changes - https://p6weekly.wordpress.com/

Resources - https://perl6.org/resources/


 No.917412>>917414

>no traction

>no one cares about it

>basically a living meme

who cares?


 No.917413


> my $Fibonacci := 0, 1, -> $a, $b { $a + $b } ... *; 1;
1
> $Fibonacci[^10]
0 1 1 2 3 5 8 13 21 34


 No.917414>>917423

>>917412

A dedicated community of mature SysAdmins/Developers cares. o/


 No.917415

http://pl6anet.org/ is a good blog for Perl6 if anyone is looking. PerlMaven is also great.


 No.917418>>917457


> perl6 -e 'for (lines) { say $_ }' /path/to/file.txt
> perl6 -e 'for (lines) { $_.say }' /path/to/file.txt
> perl6 -e 'for (lines) { .say }' /path/to/file.txt
> perl6 -e '.say for (lines)' /path/to/file.txt
> perl6 -e '.say for lines' /path/to/file.txt

Simple file work is a breeze with Perl6. TIMTOWTDI


 No.917419

The official module installer/manager for Perl6 is Zef:

https://github.com/ugexe/zef

For a list of all modules go to:

https://modules.perl6.org/


 No.917423>>917427

>>917414

>sysadmins care about perl S I X

>developers caring about perl at all

>shitty reddit arm waving emote

faggot


 No.917427


 No.917434

perl is doodoo


 No.917441>>917449

We abandoned perl for a reason, newfag.


 No.917449

>>917441

>We abandoned X for a reason, newfag.

>where X = anything


 No.917457>>917476

File (hide): 9cce645e75c245a⋯.png (3.54 KB, 964x124, 241:31, p.png) (h) (u)

>>917418

What's that lines business? Anyway I guess it's not much different.


 No.917463>>917477

Perl makes Rust look nice.


 No.917476

>>917457

It's just simply combing for stuff inbetween '\n' in an optimized way.

say "The file contains ",
'50GB-file'.IO.lines.grep(*.contains: 'Perl').elems,
" lines that mention Perl";


 No.917477

>>917463

Rust is genuinely probably the worst modern language, get it right brainlet.


 No.917480

Everyone shits on perl. It's fine when I used it.

See is good but bash+used is awful.


 No.917494>>917517 >>918402

But I do anon.

Dem sexy grammars


 No.917517>>918402


 No.917535>>917536 >>917548

>>917410 (OP)

Because Perl 6 spent too long bogged down in "development" (that'd be Larry Wall autistically injecting his religion into the specs), and in the end didn't offer a sufficiently compelling alternative to any number of languages, interpreters, and software ecosystems that were developed in the meantime.

Is there a use case for which Perl 6 is clearly and significantly superior to one of Python, Ruby, Lua, or js (node)?


 No.917536

>>917535

It's better than python at preventing reverse engineering.


 No.917548>>917612

>>917535

That first argument is stupid - no language can be released without sufficient development having taken place. MoarVM is being perfected.


 No.917612>>917713 >>918298

>>917548

Too. Damn. Slow.

Python 3 > Perl 6


 No.917618>>918302

Does Perl 6 come with a REPL yet?

It might be the main reason I didn't continue trying to learn Perl (given that I already knew another language in the same approximate niche). How can you stand it?


 No.917713>>917715

>>917612

>slow

>says python

Are you joking?


 No.917715>>917945

>>917713

Python's development is pretty fast.

You did interpret that post within the proper context, didn't you? It would be embarassing if you didn't at least read the two posts before it.


 No.917939>>918299

I dunno. I like Lua. It leaves an extremely small memory footprint, extremely readable and I'm experienced with it


 No.917945>>917952

>>917715

>Python's development

>fast

Oh, the language we're still using 2.7 on since they've added absolutely no fucking reason to upgrade for a decade? It's Perl all over again.


 No.917952>>918457

>>917945

Proper unicode support, type hinting syntax, formatting string literals, dataclasses, lazy operation of standard functions and methods where applicable, sensible division semantics, asynchronous functions, to name a few things.

Python 3 is genuinely a much better language than Python 2, and every minor release brings more.


 No.918298

>>917612

Python has its performance issues too, and most python developers overlook mistakes in their implementations.

As for Perl6's speed, it is a WIP, though it has greatly improved and offers some great performance currently with exceptions for a few routines.


 No.918299

>>917939

This is a reasonable argument, but only for Lua. Perl6 is aiming to become something different.

(I like Lua too)


 No.918302

>>917618

Yeah, it does.


 No.918303

> say (1..^Inf).rotor(1..^Inf)[^5]
((1) (2 3) (4 5 6) (7 8 9 10) (11 12 13 14 15))


 No.918402>>918417

File (hide): c31af4739009313⋯.png (10.3 KB, 278x94, 139:47, ClipboardImage.png) (h) (u)


 No.918417

File (hide): 078feb782c396bf⋯.png (1.8 KB, 112x56, 2:1, Selection_005.png) (h) (u)

>>918402

nice one


 No.918457>>918487

>>917952

>Proper unicode support

It still doesn't have proper unicode support, we still need ICU bindings. The limited unicode support it has works just as well in python 2.7.

>type hinting syntax

Have you tried using it? Try it before you say it's a feature. It's like C++'s template concepts. I don't expect anyone to ever seriously use it.

>formatting string literals

Backported to 2.7.

>dataclasses

It's a pure python decorator and can be used on 2.7. Many projects, especially web frameworks, already had their own variant in 2.7.

>lazy operation of standard functions and methods where applicable

3 remains slow as fuck.

>sensible division semantics

Their division semantics are madness. How does quietly switching types to turn an infinite precision integer into a limited precision float make any sense? Division was consistent in python 2.7 and they fucked it up.

x=222222222222222222222222222222222222222

x/2*2

2.222222222222222e+38

Try to justify that shit as more natural and sensible than python 2.7. Silent information loss converting between infinite and finite, oh yeah, that's so much better than when it used to just fucking work. And why if they have transparently infinite precision integers do they not use their transparently infinite precision floats? It's such a confused mess. You have to be a sycophant or a moron to say this is sensible.

>asynchronous functions

There are numerous libraries for 2.7 that asyncio was based on that go back a decade. It's not a new feature.

There is no reason to migrate to python 3 and lose compatibility with the breadth of 2.7 code for those non-features. Python 3 was a mistake and should be ignored.


 No.918487>>918606

>>918457

>It still doesn't have proper unicode support, we still need ICU bindings. The limited unicode support it has works just as well in python 2.7.

Consistently using unicode strings for text without mixing it up with raw bytes is an improvement over Python 2.

>>type hinting syntax

>Have you tried using it? Try it before you say it's a feature. It's like C++'s template concepts. I don't expect anyone to ever seriously use it.

I do use it. It works great with mypy.

>>formatting string literals

>Backported to 2.7.

No. I'm talking about formatting literals, like f"{x}", not "{}".format(x).

>>dataclasses

>It's a pure python decorator and can be used on 2.7. Many projects, especially web frameworks, already had their own variant in 2.7.

Python 3.7 has it in the standard library, so it's reliably available from there on, and versions before 3.6 can't support a version as nice as that one. It lets you do something as simple as this:

@dataclass
class C:
x: int
y: str
z: bool = False

o = C(3, 'foo')
print(o)

C(x=3, y='foo', z=False)

It has simple syntax for simple uses and it's standard. That matters.

>>lazy operation of standard functions and methods where applicable

>3 remains slow as fuck.

It's not just about naive speed. Being able to do "x in d.values()" without instantiating an entire list matters a lot in case d is a large dict. In Python 2 you'd have to choose between doing it the simple clear way or the correct way, in Python 3 they're the same way.

>>sensible division semantics

>Their division semantics are madness. How does quietly switching types to turn an infinite precision integer into a limited precision float make any sense? Division was consistent in python 2.7 and they fucked it up.

>x=222222222222222222222222222222222222222

>x/2*2

>2.222222222222222e+38

>Try to justify that shit as more natural and sensible than python 2.7. Silent information loss converting between infinite and finite, oh yeah, that's so much better than when it used to just fucking work. And why if they have transparently infinite precision integers do they not use their transparently infinite precision floats? It's such a confused mess. You have to be a sycophant or a moron to say this is sensible.

It's sensible in a language with dynamic typing.

When you actually use division you usually have a clear idea of whether you want truncating division or true division, and the types involved are only known at runtime. So in Python 2 you either end up with subtle bugs that happen when you get an int where you were expecting a float or vice versa, or you have to put float or int conversions all over the place just to make sure it doesn't accidentally use the wrong kind of division sometimes. Python 3 is much better in most cases.

Your example loses information in Python 2 if it's an odd integer.

>>asynchronous functions

>There are numerous libraries for 2.7 that asyncio was based on that go back a decade. It's not a new feature.

Standardization and syntax matter.


 No.918589

Unless Perl 6 start working with Tensorflow and R, NOPE


 No.918606>>918643 >>918668 >>918710

>>918487

#include "share/atspre_staload.hats"

datatype C =
| Crawler of (int, string)
| Floater of (int, string, bool)

val o = Crawler(3, "foo")

fun print_C(coord: C): void =
case+ coord of
| Crawler(x, y) => print!("C(", x, ", ", y, ")")
| Floater(x, y, true) => (print_C(Crawler(x, y)); print!(" ** floating **"))
| Floater(x, y, false) => (print_C(Crawler(x, y)); print!(" ** grounded **"))

(* permits println!() macro to work with this type *)
overload print with print_C

(* alt. version *)

typedef C = @{ x=int, y=string, z=bool }

val q = @{x=3, y="foo", z=false}

implement main0() = (
println!(o);
println!(q2) where {
val @{x=x, y=y, z=z} = q
val q2 = Floater(x, y, z)
};
println!(Floater(3, "hi", true));
)
output:
C(3, foo)
C(3, foo) ** grounded **
C(3, hi) ** floating **
I was going to go on to mock Python for its speed, but Python 3.6.5 throws an error on your example at @dataclass. Latest Python in Homebrew... probably because shit breaks under 3.7, same as with any other version difference with Python.

ML is a supernova, but you are so far from its light and God's light that the brightness of a candle impresses you.


 No.918643

>>918606

>ML is a supernova, but you are so far from its light and God's light that the brightness of a candle impresses you.

kek


 No.918668>>918669

>>918606

List of things that Perl 6 does not have.

1. Web scraping (Selenium among others)

2. Machine Learning (Keras and Gluon)

3. Statistics (SciPy ecosystem)

4. Education (Jupyter Notebook)

5. Web building (Django and Flask)

6. Cryptography (too many to count)

7. Image, Audio and Video (FFMPEG)

...

Come back when Perl 6 start having programs or wrappers for these


 No.918669

>>918668

You did absolutely NO research. Just having looked at the modules page, I've found literally 6/7 of those FULLY built in Perl6, not even just wrappers.


 No.918710

>>918606

It's a library, called dataclasses. It won't work unless you install (on 3.6) and import the library. You need to add "from dataclasses import dataclass". I should have mentioned that.

Your example is neat, but it's much more tedious than the Python version, or alternatively, less fully featured. ML is not a Python replacement, and Python is not a ML replacement.

I don't think Python dataclasses are particularly impressive or sophisticated, but they are an advantage Python 3.7 has over earlier versions, which was the topic of the conversation. It was more about showing Python 2's deficiencies than about elevating Python 3 above non-Python languages.


 No.918728>>918736 >>918738 >>918755

Python seems kinda over at this point. It's been completely replaced as an embedding language to the point no one even mentions it as an option for this anymore, it was abandoned by RedHat as the future of shell utilities more than a decade ago, it's been abandoned as a replacement for the script glue in an init system as that all went back to C instead, and even webdev faggots seem desperate to get away from it. There's not even any passion around it, I never hear people wistfully speculating what marvels a python 4 might bring. All its growth seems to be coming from it being the language of choice in diploma mills instead of industry. I don't get why anyone's defending it in this thread.


 No.918736

>>918728

>I don't get why anyone's defending it in this thread.

Context. This is a

>hurr y u not use perlsicks?

thread, and however badly Python might suck, it is orders of magnitude more popular and more useful than Perl 6 is or will ever be.


 No.918738

>>918728

Tell me the solution


 No.918755>>918756 >>918942

File (hide): 4cb278165eebf25⋯.png (58.35 KB, 1000x1000, 1:1, indeed.png) (h) (u)

>>918728

I would guess that "Academic" refers to scientific uses, not diploma mills.

>I never hear people wistfully speculating what marvels a python 4 might bring

I've seen a little of this, but it's misguided, because Python 4 won't be necessary to bring marvels. It will be an opportunity to make backward-incompatible changes, but no major ones seem to be necessary, and it won't be as drastic as Python 3. Most of the goodness is coming from minor releases.

The only Python 4 change scheduled so far is lazy evaluation of annotations. Even most code that is affected by it won't be broken by it, and you can already opt into it in 3.7.

Python is ranked fourth on a lot of rankings, and that seems consistent with the percentages in your image. 10% is actually a lot. The hype might have died down, but it established itself.

>I don't get why anyone's defending it in this thread.

Someone said Python's development moves faster than Perl's development and a bunch of people misunderstood.


 No.918756>>918759


 No.918759>>918890

>>918756

The GIL is an implementation detail of CPython. There are compatible implementations of Python 3 that don't have it. Binning it wouldn't be backward-incompatible, so it doesn't require a major release.

Optimizing namedtuple doesn't require a compatibility break either.

Everything in that article is about implementation details. None of it is about changing the language, let alone changing the language in a backward-incompatible way.


 No.918890>>918892

>>918759

Then what is wrong with the syntax, if the guts of it is not the problem?


 No.918892>>918946

>>918890

The syntax of Python 3, you mean? Nothing worth breaking backward compatibility for. There are problems, of course.

You might be missing the point of major releases. Major releases, like Python 3, can make major backward-incompatible changes. Minor releases, like Python 3.7, can add anything that doesn't break backward incompatibility.

Python 4 is allowed to include breaking changes. The only breaking change scheduled so far is a semantic change to annotations.

The things in the article aren't even about the guts of the language itself, they're about the guts of CPython, the most popular implementation of Python. There is no need to release a new major version when they're implemented.


 No.918942>>919845

>>918755

>scratch toy """language""" job openings

wat


 No.918946>>918956

>>918892

They're going to have to break compat in a major way to solve the startup time problem and if they want to do signed/verifiable libraries. That's all due to how excessively dynamic the language is, and that there is no real "import library", it's just "run code claiming to be a library that will probably modify the environment to present itself as a library would".


 No.918956

>>918946

I don't feel qualified to say much about startup time, but you probably do have a point there. It could be brought down without breaking compatibility, but it's enough of a structural problem that breaking compatibility could be necessary to get it to the point where it's no longer an issue.

I feel like it should be the job of a package manager, but verifying library signatures at import time could be implemented right now in pure Python. Remove all directories you don't unconditionally trust from sys.path (I assume the standard library is fine to keep), then append your own import system to sys.meta_path. Or replace the default import system with your own.

I actually wrote an import system a few weeks ago for a nasty bit of metaprogramming. It's a lot more accessible than I expected. I implemented one from the ground up because I wasn't importing Python code, but you could subclass the components of the standard import system as exposed in importlib.machinery to do verification before execution.


 No.919159>>919340 >>919370 >>919383

File (hide): 5afe0c669c60b99⋯.png (32.91 KB, 288x288, 1:1, perl.png) (h) (u)

>>917410 (OP)

tbh perl5 still gets me hard


 No.919340>>919383 >>919406

>>919159

Why can't Python be more like Perl?


 No.919370>>919383

>>919159

Same, a lot of people haven't really explored Perl, but it's worth it.


 No.919383

File (hide): dc63559330b2149⋯.jpg (27.21 KB, 600x425, 24:17, perl-scripts-done.jpg) (h) (u)

>>919340

>>919159

>>919370

Perl 5 is literally the best language


 No.919406>>919455

>>919340

The reason why Python took over was that it wasn't like Perl.


 No.919455>>919460

>>919406

Python caters to retards

Perl doesn't


 No.919460>>919461

>>919455

The competent programmer is fully aware of the strictly limited size of his own skull; therefore he approaches the programming task in full humility, and among other things he avoids clever tricks like the plague.


 No.919461>>919463

>>919460

>I'm not a brainlet I'm just aware of how retarded I am

I doubt it brainlet


 No.919463>>919465


 No.919465>>919467

>>919463

wait a minute did dijkstra say something contrarian??!! no way


 No.919467>>919470 >>919817

>>919465

This particular thing isn't that controversial. Debugging code is harder than writing it, so if you write code that's as clever as you are you won't be clever enough to debug it. A major trick to writing maintainable software is to make it boring.

Not all software needs to be maintainable. Perl is a good choice for software that doesn't. But it's notoriously bad for software you might want to modify again some day.


 No.919470>>919853 >>920014

>>919467

It's hard if you're a mental midget, yeah. That's why python exists, so the industry can hire mental midgets for dirt cheap.


 No.919817>>919910

>>919467

>Not all software needs to be maintainable.

Scripting languages give you four advantages:

1. (guaranteed) when any kind of problem crops up with a scripting-language program, you will find the full and complete and immediately alterable and executable (in altered state) source of that program right next to it. This is the height of maintainability--any admin that comes along can dig into things, figure out what the problem is, and then fix it, even fix is a quick temporary patch to only the local copy of the script.

2. (very often, and usually with too great an emphasis) portability of scripting-language programs across architectures

3. (often) a larger pool of potential maintainers because the language can be easy to learn, f.e. because it has only 3-4 super capable types that everything works with, like old adage about why lists are good in Lisp, and unlike languages where you'll get an error saying "woah! you tried to pass an int! But I was looking for a port, which is a very special kind of int!"

4. (ideally) relatively faster coding for some application domains, because the language itself has been optimized for expressing solutions to problems in those domains.

That #1 point there is super fucking important. If you ever have a problem that really doesn't need to be maintainable at all, then write it in Nim or OCaml or whatever you like, produce a standalone binary, deploy that, and then throw away the source.


 No.919845

>>918942

almost assuredly in education


 No.919853

File (hide): f56fad1773f37da⋯.jpg (26.79 KB, 270x270, 1:1, 1520468542.jpg) (h) (u)

>>919470

harsh truth


 No.919910

>>919817

Python > Perl if it tried.


 No.920014>>920038 >>920227

>>919470

Try bringing bugzilla up to modern standards. Learn what it's like to work with a large perl project with multiple contributors, and why perl was abandoned.


 No.920038

>>920014

Everything modern is bloated botnet shitware tho, so no thanks.


 No.920052>>920455

Why would I use Perl? I am not a webdev black slave I am a white man


 No.920227>>920727

>>920014

>this one project is bad

ever look at bittorrent's source?


 No.920455

>>920052

Perl isn't just for webdev, it's great for just general scripting.


 No.920727

>>920227

Find a large perl project with multiple contributors that is not nightmare-tier. Learn why perl was abandoned.


 No.920728

>>917410 (OP)

Because Racket, and even Python are better.




[Return][Go to top][Catalog][Screencap][Nerve Center][Cancer][Update] ( Scroll to new posts) ( Auto) 5
77 replies | 8 images | Page ?
[Post a Reply]
[ / / / / / / / / / / / / / ] [ dir / cafechan / hisrol / ita / leftpol / soyboys / sw / thestorm / vg ][ watchlist ]