🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). Log available at irclogs.raku.org/raku/live.html . If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 6 September 2022.
Xliff Can you feed arguments to a grammar? 02:23
lizmat Xliff: yes, you can specify attributes in your grammar, and .new will set them for you 09:08
tellable6 lizmat, I'll pass your message to Xliff
lizmat Xliff: and you can pass a Capture to the :args argument of .parse, and that will be passed on to the first token executed (which is usually TOP 09:09
tellable6 lizmat, I'll pass your message to Xliff
Geth advent/main: 29b91e5339 | (Elizabeth Mattijsen)++ (committed using GitHub Web editor) | raku-advent-2023/authors.md
Schedule vrurg's post for the 16th
09:14
librasteve raku Set operations include the notion of a null Set ∅ (aka 'Set()') 09:40
raku Range operations lack this idea, and this lack recently became apparent in this So question stackoverflow.com/questions/776080...es-overlap 09:41
(this is not the same as the "zero" Range which I take to be '0..0') 09:42
currently I can go...
m: say 0..0
evalable6 Cannot test bd43800b14919ed61c8fa3fcef1447684fa249c1 (Broken archive)
Raku eval 0..0
librasteve m: say Nil..Nil 09:43
evalable6 Cannot test bd43800b14919ed61c8fa3fcef1447684fa249c1 (Broken archive)
Raku eval Nil..Nil
librasteve soon we will have...
m: use v6.e.PREVIEW; say so 1..0;
evalable6 Cannot test bd43800b14919ed61c8fa3fcef1447684fa249c1 (Broken archive)
Raku eval True
librasteve (errr that should be False! since the endpoints are not ascending) 09:44
m: use v6.e.PREVIEW; say so 0..0; 09:45
evalable6 Cannot test bd43800b14919ed61c8fa3fcef1447684fa249c1 (Broken archive)
Raku eval True
librasteve ^^^ and correctly (?) even thought the IRC preview is not working(?) 0..0 is True because it is well formed (I could argue that like Int, a zero Range like this should be False, but I guess someone has already thought this through?) 09:47
m: use v6.e.PREVIEW; say so Nil..Nil;
evalable6 Cannot test bd43800b14919ed61c8fa3fcef1447684fa249c1 (Broken archive)
Raku eval True
librasteve so ^^^ once again IRC preview is broken, in the wild, this goes
[1] > say so Nil..Nil; Range cannot be iterated over because its starting point 'Any' does not have a '.succ' method in block <unit> at <unknown file> line 1 in any <main> at /Users/stephenroe/.rakubrew/versions/moar-2023.10/bin/../share/perl6/runtime/perl6.moarvm line 1 in any <entry> at /Users/stephenroe/.rakubrew/versions/moar-2023.10/bin/../share/perl6/runtime/perl6.moarvm line 1
So 6.e.PREVIEW has changed the behaviour of Nil..Nil literal (which may throw up some suprises) ... my request (after this long winded thread) is that we collectively decide that the null Range is Nil..Nil special value and make this available to return from Range operations eg. when no overlap between two arguments is the result ...? 09:52
lizmat shouldn't it be Empty ? 10:02
librasteve m: say ∅ ~~ Set 10:05
evalable6 Cannot test bd43800b14919ed61c8fa3fcef1447684fa249c1 (Broken archive)
Raku eval True
librasteve m: say Empty ~~ Range
evalable6 Cannot test bd43800b14919ed61c8fa3fcef1447684fa249c1 (Broken archive)
Raku eval False
librasteve good question, naively I would say the same rationale that applies to null Set should apply to null Range (whereas Empty is a null List afaik) 10:06
or maybe we make something up like ∅..∅ ? 10:07
lizmat well, the empty Set is an instantiated Set object without any elements
librasteve currently Nil..Nil is a Range object without any endpoints (I believe an instantiated Range holds the endpoints and does not interpolate them on creation) 10:08
github.com/Raku/problem-solving/issues/410 <== anyway I made a discussion here 10:10
lizmat m: (Nil..Nil).iterator.pull-one # I feel this should produce Nil
camelia Range cannot be iterated over because its starting point 'Any' does not
have a '.succ' method
in block <unit> at <tmp> line 1
librasteve yeah, if we agree Nil..Nil then any kind of non Range operation treating like an Iterator should return Nil 10:13
hmmm use of Nil in Range is generally problemetic (already) .... 10:25
m: say Nil..0
evalable6 Cannot test bd43800b14919ed61c8fa3fcef1447684fa249c1 (Broken archive)
Raku eval Nil..0
lizmat yeah... I tried a quick fix, but that quick fix didn't fix and borked other stuff... 10:26
librasteve oops
lizmat so let's see what semantics we decide on in the problem solving issue before working on the code
which is now roughly 10 years old... so maybe it needs a full overhaul 10:27
librasteve I am leaning to making up a symbol like 𝟘 (aka Range())
sure ... I'll take this over to the issue
lizmat 1D7D8 MATHEMATICAL DOUBLE-STRUCK DIGIT ZERO 𝟘 10:28
librasteve scary! 10:40
yep 10:40
lizmat and yet another Rakudo Weekly News hits the Net: rakudoweekly.blog/2023/12/11/2023-...ore-magic/ 13:02
ab5tract so I've been exploring optimizations for the snowfall simulator... and I can't seem to stop the performance degradation. Here's the update version, in case anyone is curious: gist.github.com/ab5tract/ff5373154...5fb0599c93 17:59
Xliff Where can I get Raylib? 18:31
tellable6 2023-12-11T09:08:04Z #raku <lizmat> Xliff: yes, you can specify attributes in your grammar, and .new will set them for you
2023-12-11T09:09:18Z #raku <lizmat> Xliff: and you can pass a Capture to the :args argument of .parse, and that will be passed on to the first token executed (which is usually TOP
Xliff lizmat++: Thanks! Got it. 18:32
Rajhan hello Raj here from India, want to learn programming, want to start with Raku. kindly suggest how to prroceed 18:36
Xliff Rajhan: docs.raku.org is a decent starting place. One sec... 18:54
Rahjan: There is also: course.raku.org/
[Coke] raku.org/resources/ - newcomers 18:57
jdv pick a rando problem and try to solve it?
jdv fail or not on task itll be worthy learnings 18:58
ab5tract Xliff: it should be available in your package manager 19:35
Rajhan: welcome! there is also a Raku track at exercism and people also find this one helpful: learnxinyminutes.com/docs/raku/ 19:37
tellable6 ab5tract, I'll pass your message to Rajhan
.vushu @abstract I got a solution for your problem 20:07
I think I should be a ok solution 20:08
maybe you can improve a bit upon it 20:08
gist.github.com/vushu/ea36578a5728...26eed768d1 20:10
So the trick is to recycle the flakes 20:11
they fall a bit clustered but the frame rate is fine, a bit of tweaking can be done, but you get the gist of it. 20:13
cdn.discordapp.com/attachments/633...2a8cd&
ab5tract .vushu: awesome! 20:30
tbrowder__ hi, whadda y’all think about a project to completely rakuize the Raku-Advent.blog? maybe get a grant for some cro export like tonyo to lead the project. it bothers me that a company that makes so much money has such a terrible UI (and UX, and all the other U* acronyms) 22:41
pardon me, but i seem to get on this rant every year, my innate scrooge i guess 22:43
tbrowder__ *cro expert 23:24
tbrowder__ tonyo is 23:24