Raku: The Programming Language You Didn't Know You Needed

preview_player
Показать описание
This is an update of my Perl 6 for Mere Mortals talk. There's not much new, but it refers to Raku instead of Perl 6 and some slides have been cleaned up.

This was presented for the 2021 FOSDEM conference.
Рекомендации по теме
Комментарии
Автор

16:30

It is not true that the halting problem prevents this kind of constraint from being checked at compile time. It is possible with dataflow analysis to enforce constrained types like int x: 0 < x < 100. Liquid Haskell and Agda can enforce types of this kind *at compile time*.

The halting problem (+ the Rice theorem) only tell you that there is no automatic, sound and complete way to prove an arbitrary program doesn't halt (or is guaranteed to have any properties at all). Type annotations are allowed to throw some false alarms and therefore aren't bound by this restriction (they are sound but not complete).

There are actually *lots* of programs that we can prove dont halt. The halting problem only tells us there will always be *some* programs that don't halt but we can't (soundly) prove don't halt. The Rice theorem extends this from "will halt or not" to any property of the program.

frenchmarty
Автор

for anyone wondering, to get the floating point result in bc, you add the scale variable to tell BC how many decimal places of precision you want, ie: echo "scale=1;7/2" | bc

also, I was pleased to see raku has a "div" operator for integer division. Sometimes you really want an integer result from your division.

State variables look awesome. I am intrigued by lazy lists and grammars and want to see what those look like.

icanhasurvideos
Автор

Omg thanks for your insight, yes. The Integer Math part you're so correct, we're brainwashed into believing it's normal just to accept a result that would accommodate the computer...

wiskasIO
Автор

I feel that Raku has something very unique going on: it has the benign version of the C++ problem: it's choke full of features, but they actually make sense and they will take lots and lots of time and coding to get used I just hope that one can fully dig them all.
To me what awoke my interest is the linguist features like grammars, for the maths I already program in functional languages like Haskell and I'm good with those.

freedom_aint_free
Автор

Nice I would normally use python or Perl for certain tasks relating to active directory and stuff but raku looks like something I’m going to bring up in a meeting as it seems like a much clear well presented Perl5

ThatBoringDeveloper
Автор

About the value constraints 16:13. Yes, in the general case you can't know if a program will halt, but in dependently typed programs there are workarounds.
A trivial is "run the type check for a while, if not returning, fail the type check",
alternatively use a provably non-halting subset of allowed programs used for type checking.

FreeScience
Автор

31:18 In python3 you can implement the constraints directly in the __set__ or __init__ no need to make an extra class for this at all.

OOD
Автор

In the Eiffel language 0.1 + 0.2 - 0.3 will give the wrong answer, however if we typecast them to type REAL like this: {REAL} 0.1 + {REAL} 0.2 - {REAL} 0.3, we get the correct answer.

finnianreilly
Автор

Enjoyable. Least boring video of this type I have watched in a while, and Raku is now my goto desktop calculator.

timhowe
Автор

Hmmmm, Lots of interesting things in this. Raku seems to have the same kind of magic and innovation that separated Perl from other languages back in the days only amplified and modernized. The function signatures, multisubs, and the state variables in functions is genius... Do any other languages even do any of those things?

CallMeWB
Автор

I've known my entire programming career that Smalltalk, a language I like, has rational values. Yet, even working with flexible languages that let me define my own types and define arithmetic over those types, I have never wanted a rational type.

I've known my entire programming career that Lisp has integers that can grow without limit - and yet I have never had any use for a bignum.

I have had use for integers and floats. They take up a set amount of memory, they're supported in hardware over every function and they're fast to use.

Once or twice I've had a use for higher precision numbers than "double precision" but at those moments I was, not coincidentally, using a math system like Mathematica and they were sitting there ready to use.

I do love constraints on types.

joshuascholar
Автор

for number theorists, 7/2=3 remainder 1 is prefereable.

davidjohnston
Автор

I'd forgot all about this. I'm afraid that the software world mostly also has forgot

timothykeith
Автор

Python 3 was released 13 years ago, and uses floating point division by default. The fact that you, in 2021, decided to use Python 2 to represent Python's basic division operand is a hard stop for me.

erikpotter
Автор

At 12:13 you decry TIMTOWTDI, but then you skip ahead without explaining what, if anything, Raku does to avoid this. (Or why it's bad.) Does Raku do anything systematically here, or is it more of a cultural shift towards "there's a right way, please do it that way"?

VynceMontgomery
Автор

"Raku: the programming language you didn't know you needed." I've watched the video and still do not know that.

TheLongestConfidence
Автор

It looks like text. This is an interesting language. I think a framework is much needed for companies to pick this language up and use it. Did you saw anything that was worked on?

danyschalifour
Автор

Здравствуйте, как работать с языком программирования RAKU + HTML + XAMPP. Спасибо. - (Russian language)

yaroshchenko_coder
Автор

05:17 is this typically behaviour when knowingly lying and talking nonsense?

MsDuketown
Автор

The subset thing is nice. But the language itself kinda looks like it can't decide if it wants to be verbose or concice, and seems to have many build in features that could have been done with less additional syntax

nordern
welcome to shbcf.ru