This channel is intended for people just starting with the Raku Programming Language (raku.org). Logs are available at irclogs.raku.org/raku-beginner/live.html
Set by lizmat on 8 June 2022.
00:04 jgaz joined 00:27 deoac left
pelevesque sub add(Int $a, Int $b) returns Int { $a % 2 ?? "A string" !! $a + $b } ```` Feature or bug. If I pass the wrong type as an argument, it errors at compile time, but if I return the wrong type, it fails at runtime. say add(3, 2); # errors at runtime ``` 01:20
I feel this to be a bug to be honest. 01:22
Or maybe it's just really hard to verify that a return statement is of a certain type.
ab5tract pelevesque: that's not something that the compiler can know at compilation time, IIRC. It's like how 'where' clauses need to be runtime as well 07:25
lakmatiol Raku does not do all that extensive static type checking. Its more runtime type checks with the occasional compile time error in the simple cases. 07:35
07:56 dakkar joined 07:58 Manifest0 joined 08:02 jgaz left
nemokosch I don't think expressions are even assigned a type, unless of course if they get evaluated and then the value itself can have one 09:12
lizmat the value of an expression *always* has a type, as everything in Raku is an object (or can act like one), and thus has a tyoe 09:20
*type
nemokosch the value of the expression, but not the expression
lizmat ah in that sense: yes, an expression is not a single object per se 09:21
nemokosch in theory, the compiler could infer a lot more stuff but it doesn't 09:22
lizmat well, being able to infer more, was one of the reasons to make RakuAST 09:23
nemokosch sub add(Int $a, Int $b) returns Int { "blablabla" }
this really could compile error though, the simplest inference possible
rcmlz Yes, used this language in University (ML-Courses) and School (1. language we teach here) 11:00
lizmat and yet another Rakudo Weekly News hits the Net: rakudoweekly.blog/2023/10/02/2023-...n-4-weeks/ 11:17
antononcube @rcmlz Ok -- good to know. Because your expressed some interest in "Jupyter::Chatbook" here is a teaser video for the Python version of that package : www.youtube.com/watch?v=8pv0QRGc7Rw 13:57
rcmlz Yes, I am currently trying to create lecture material in Notebooks using LLM. 14:40
16:40 dakkar left 16:55 swaggboi left 16:58 swaggboi joined 18:04 MasterDuke joined 18:38 Tirifto joined, Tirifto_ left 20:39 NemokoschKiwi joined 20:49 NemokoschKiwi left 21:05 swaggboi left 21:07 swaggboi joined 22:09 Guest93 joined
Guest93 Hi there 22:09
nemokosch Sup
Guest93 Why you did kill perl?
22:10 Guest93 left
nemokosch To clear up the mind 22:11
antononcube And clutter the soul, instead... 22:12
nemokosch The real plan was to retrospectively eliminate Perl from the flow of IT history 22:13
But complications arised because that would have removed Ruby, Python, PHP and transitively a lot of things that make the current industry 22:15
antononcube Hmmm... @nemokosch is taking time-machine-like perspective. 22:16
From what I can tell, Perl-killers had mixed fillings about killing it. While coping with those they mad NQP. (Yes the name gives it out...) 22:17
nemokosch Maybe you have a study about the estimated age of a Perl programmer? 22:19
antononcube I have — I “just” have to wrap it up and publish it. 🙂 23:28
23:37 Manifest0 left 23:52 guifa left 23:53 guifa joined