🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). This channel is logged for the purpose of keeping a history about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Log inspection is getting closer to beta. If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 25 August 2021.
Nemokosch The documentation of Raku is already way better than the documentation of Typescript, that's for sure... 10:38
Geth doc: bc64f20137 | Coke++ | doc/Type/Any.pod6
Note what happens in the case of no elements.

Closes #4030
15:04
linkable6 Link: docs.raku.org/type/Any
Geth doc: ad9a53af14 | Coke++ | doc/Type/Slip.pod6
Note when Emptys are created

Closes #4017
15:15
linkable6 Link: docs.raku.org/type/Slip
Geth doc: 3de67873f7 | Coke++ | doc/Type/Promise.pod6
Note that &code is passed the Promise

include example
Closes #3974
15:37
linkable6 Link: docs.raku.org/type/Promise
drakonis github.com/alabamenhu/BasicTest i'm wondering how goto gets implemented here 18:40
nine drakonis: looks like every BASIC line is compiled into a sub, so it's callable. A more advanced way would be to recognize the constructs that the GOTO is part of (e.g. loops or conditionals) and compile the code to those 18:51
drakonis cool 18:53
rakudo is still missing the ability to actually jump to arbitrary labels, right? 18:54
still getting a NYI for label.goto
Geth Documentable/search-categories-streamlined: e2933402a7 | Altai-man++ | t/202-references.t
Bring back an innocent passing test
18:58
Geth Documentable: Altai-man++ created pull request #159:
Search categories streamlined
19:00
drakonis i'm currently traipsing through raku tutorials and this is very fun 19:44
Geth doc: Altai-man++ created pull request #4051:
Search categories update
19:45
guifa drakonis: as author of the module haha, I can say that nine is correct. If you look in the actions file, above the very verbose RakuAST code is a comment with the corresponding Raku code 22:15
drakonis haha i see
guifa there's a pointer variable called $BASIC-INDEX
drakonis it doesnt yet quite behave like basic should 22:16
guifa when you hit goto, it does $BASIC-INDEX = %BASIC-INDEX{$line}
drakonis oh, huh, nice. 22:16
guifa where %BASIC-INDEX is a hash that stores the labeled BASIC lines to the indices in an array of statements
drakonis but real talk 22:17
i wanted to do TCO and implement the missing goto call on rakudo, where would i even begin with this? 22:18
guifa the main loop is ` while $BASIC-INDEX < X { @BASIC-LINES[$BASIC-INDEX].() } `
where X is the count of lines
drakonis i might need a bit of recursion for a build system i'm writing 22:19
that's a fancy trick
it also explains how to call a function stored in the list
guifa as to implementing GOTO, I'm not sure how far folks have thought out even how it would look like. e.g. scoping and what not
drakonis speaking of, that list contains strings?
i think there's already some level of GOTO support but not for jumping to arbitrary labels 22:20
docs.raku.org/type/Label 22:21
only available inside control flow such as loops
not much there.
guifa yeah, it's not really a proper goto
moon-child afaik goto is nyi 22:22
guifa For the description of goto in Raku you'd need to go to the design docs
drakonis doesn't nqp provide that either?
design.raku.org/S04.html#The_goto_statement
i remember seeing something on nqp regarding goto 22:23
guifa if it does exist, it's not been documented yet
drakonis the instruction exists
its very much not documented 22:25
moarvm also implements it but it isnt exposed to nqp yet 22:26
github.com/Raku/nqp/blob/master/sr...nsMAST.nqp
work to be done i see 22:28
SmokeMachine I've finally found a way to use the `subset` keyword to create my submodules! The `of` on the subset creator is a trait, so I can use a different treat there... So I've created `is sub-model` trait on Red. Now you can do `subset Admin is sub-model of User where *.role eq "admin"`, like this: twitter.com/smokemachine/status/15...7APBzma-eA 22:39