🦋 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.
00:00 reportable6 left 00:02 reportable6 joined 00:27 skyesoss joined 01:01 MasterDuke joined 01:04 xinming left 01:05 xinming joined
skyesoss What's the best way to move ~/.raku somewhere else? I couldn't find any documentation surrounding it, but is RAKUDO_PREFIX something to look to change, because it's messing up my include paths 01:50
02:05 linkable6 left, evalable6 left 02:06 evalable6 left, linkable6 left, linkable6 joined, evalable6 joined, xinming left 02:08 xinming joined 02:24 tea3po joined 02:27 teatwo left 02:35 swaggboi left 02:58 swaggboi joined 03:59 sourceable6 left, notable6 left, committable6 left, linkable6 left, benchable6 left, bisectable6 left, evalable6 left, tellable6 left, quotable6 left, tellable6 joined, evalable6 joined 04:00 benchable6 joined, sourceable6 joined, quotable6 joined 04:01 linkable6 joined, committable6 joined 04:02 bisectable6 joined, notable6 joined 04:05 xinming left 04:07 xinming joined 04:41 rf left 05:41 committable6 left, sourceable6 left, bloatable6 left, reportable6 left, greppable6 left, unicodable6 left, tellable6 left, squashable6 left, nativecallable6 left, releasable6 left, shareable6 left, coverable6 left, coverable6 joined, squashable6 joined, reportable6 joined, nativecallable6 joined, releasable6 joined 05:42 bloatable6 joined, sourceable6 joined, greppable6 joined, unicodable6 joined 05:43 committable6 joined, tellable6 joined 05:44 shareable6 joined 06:00 reportable6 left 06:03 reportable6 joined 06:26 xinming left 06:28 xinming joined 07:02 codesections1 joined 07:03 codesections left, codesections1 is now known as codesections 07:59 rjbs left, rjbs joined 08:40 sena_kun joined 09:31 Xliff joined
lizmat weekly: felix-knorr.net/posts/2023-06-24-r...esome.html 09:43
notable6 lizmat, Noted! (weekly)
lizmat also on Hacker News: news.ycombinator.com/item?id=36465989 09:49
10:14 Sgeo left
Voldenet > (1, 2, 3).map(* + 1) 11:02
it's pretty amazing how most language complicate lambdas 11:03
especially when most lambdas are simply one-arg ones 11:04
leont Seems I lost the slides for my 2021 presentation ("Raku syntax I miss in other languages"). I really ought to make it a blog series. 11:07
lizmat leont: you should! and do a RCS one :-)
leont RCS?
11:14 linkable6 left, evalable6 left 11:15 linkable6 left, evalable6 left, evalable6 joined 11:16 linkable6 joined 11:17 RonaldR34g4m left, RonaldR34g4m joined
lizmat Raku Core Summit ? 11:17
timo social.coop/@jsbarretto/110598797097154054 i feel like raku is the perfect language to prototype these two suggestions 11:44
lizmat the deparsing part for Dutch is already done :-)
timo indeed, i saw that, though i haven't tried it yet or seen any example? 11:45
11:47 sena_kun left
timo m: use nqp; augment class ClassHOW { method gender() { nqp::sha1(self.name).substr(2) } }; say Str.^gender; say List.g 11:47
camelia ===SORRY!=== Error while compiling <tmp>
augment not allowed without 'use MONKEY-TYPING'
at <tmp>:1
------> use nqp; augment class ClassHOW⏏ { method gender() { nqp::sha1(self.name
expecting any of:
generic role
timo m: use nqp; use MONKEY-TYPING; augment class ClassHOW { method gender() { nqp::sha1(self.name).substr(2) } }; say Str.^gender; say List.^gender; say Hash.^gender
camelia ===SORRY!=== Error while compiling <tmp>
You tried to augment class ClassHOW, but it does not exist
at <tmp>:1
------> se MONKEY-TYPING; augment class ClassHOW⏏ { method gender() { nqp::sha1(self.name
expecting any of:
lizmat m: use v6.*; use RakuAST::Deparse::L10N::NL; say Q|say "Hoi allemaal" if 42|.AST.DEPARSE
camelia say("Hoi allemaal") if 42
lizmat m: use v6.*; use RakuAST::Deparse::L10N::NL; say Q|say "Hoi allemaal" if 42|.AST.DEPARSE(RakuAST::Deparse::L10N::N) 11:48
timo m: use nqp; use MONKEY-TYPING; augment class Perl6::Metamodel::ClassHOW { method gender() { nqp::sha1(self.name).substr(2) } }; say Str.^gender; say List.^gender; say Hash.^gender
camelia Could not find symbol '&N' in 'RakuAST::Deparse::L10N'
in block <unit> at <tmp> line 1
===SORRY!=== Error while compiling <tmp>
You tried to augment class Perl6::Metamodel::ClassHOW, but it does not exist
at <tmp>:1
------> augment class Perl6::Metamodel::ClassHOW⏏ { method gender() { nqp::sha1(self.name
expec…
lizmat m: use v6.*; use RakuAST::Deparse::L10N::NL; say Q|say "Hoi allemaal" if 42|.AST.DEPARSE(RakuAST::Deparse::L10N::NL)
camelia zeg("Hoi allemaal") als 42
lizmat timo ^^ an example
timo can we also de-deparse like that? :D
lizmat timo: not yet, but that's the plan 11:50
timo amazing
leont Oh right! Yeah I hadn't gotten around to writing that either.
lizmat thanks to the power of RakuAST :-) 11:51
timo ok, i tried to constant CH = Str.HOW and augment CH, but that tells me CH is closed, and i wonder if that means i'm not doing it right because otherwise it would have said ClassAHOW
ClassHOW is closed*
Geth setup-raku/dependabot/npm_and_yarn/semver-7.5.2: f6c2e1f0d6 | dependabot[bot]++ (committed using GitHub Web editor) | 2 files
Bump semver from 7.3.7 to 7.5.2

Bumps [semver](github.com/npm/node-semver) from 7.3.7 to 7.5.2.
  - [Release notes](github.com/npm/node-semver/releases)
  - [Changelog](github.com/npm/node-semver/blob/ma...NGELOG.md)
  - [Commits](github.com/npm/node-semver/compare......v7.5.2)
... (7 more lines)
11:53
timo m: use v6.*; use RakuAST::Deparse::L10N::NL; say Q|my $foo; our $bar; class A { has $.hello }|.AST.DEPARSE
camelia my $foo;
our $bar;
class A {
has $.hello
}
lizmat m: use v6.*; use RakuAST::Deparse::L10N::NL; say Q|my $foo; our $bar; class A { has $.hello }|.AST.DEPARSE(RakuAST::Deparse::L10N::NL) 11:58
camelia mijn $foo;
onze $bar;
klasse A {
heeft $.hello
}
leont The Dutch squicks me 11:59
lizmat afk& 12:00
12:00 reportable6 left, reportable6 joined 13:00 evalable6 left, benchable6 left, shareable6 left, statisfiable6 left, coverable6 left, unicodable6 left, bloatable6 left, sourceable6 left, linkable6 left, notable6 left, committable6 left, quotable6 left, squashable6 left, greppable6 left, reportable6 left, bisectable6 left, nativecallable6 left, releasable6 left, tellable6 left 13:01 unicodable6 joined, quotable6 joined, nativecallable6 joined, bisectable6 joined, coverable6 joined, greppable6 joined 13:02 benchable6 joined, committable6 joined, evalable6 joined, tellable6 joined, sourceable6 joined, notable6 joined, squashable6 joined, statisfiable6 joined 13:03 bloatable6 joined, releasable6 joined, shareable6 joined, reportable6 joined, linkable6 joined
Xliff use v6.*; use RakuAST::Deparse::L10N::ES; say Q|my $foo; our $bar; class A { has $.hello }|.AST.DEPARSE(RakuAST::Deparse::L10N::ES) 13:34
m: use v6.*; use RakuAST::Deparse::L10N::ES; say Q|my $foo; our $bar; class A { has $.hello }|.AST.DEPARSE(RakuAST::Deparse::L10N::ES)
camelia ===SORRY!=== Error while compiling <tmp>
Could not find RakuAST::Deparse::L10N::ES in:
/home/camelia/.raku
/home/camelia/rakudo-m-inst-2/share/perl6/site
/home/camelia/rakudo-m-inst-2/share/perl6/vendor
/home/camelia/ra…
Xliff m: use v6.*; use RakuAST::Deparse::L10N::JP; say Q|my $foo; our $bar; class A { has $.hello }|.AST.DEPARSE(RakuAST::Deparse::L10N::JP)
camelia ===SORRY!=== Error while compiling <tmp>
Could not find RakuAST::Deparse::L10N::JP in:
/home/camelia/.raku
/home/camelia/rakudo-m-inst-2/share/perl6/site
/home/camelia/rakudo-m-inst-2/share/perl6/vendor
/home/camelia/ra…
Xliff m: use v6.*; use RakuAST::Deparse::L10N::DE; say Q|my $foo; our $bar; class A { has $.hello }|.AST.DEPARSE(RakuAST::Deparse::L10N::DE)
camelia ===SORRY!=== Error while compiling <tmp>
Could not find RakuAST::Deparse::L10N::DE in:
/home/camelia/.raku
/home/camelia/rakudo-m-inst-2/share/perl6/site
/home/camelia/rakudo-m-inst-2/share/perl6/vendor
/home/camelia/ra…
Xliff consideres use cases... and his eyes go wide.... 13:40
Coooool!
Geth setup-raku: f6c2e1f0d6 | dependabot[bot]++ (committed using GitHub Web editor) | 2 files
Bump semver from 7.3.7 to 7.5.2

Bumps [semver](github.com/npm/node-semver) from 7.3.7 to 7.5.2.
  - [Release notes](github.com/npm/node-semver/releases)
  - [Changelog](github.com/npm/node-semver/blob/ma...NGELOG.md)
  - [Commits](github.com/npm/node-semver/compare......v7.5.2)
... (7 more lines)
14:06
setup-raku: ecf28d5c4e | (Shoichi Kaji)++ (committed using GitHub Web editor) | 2 files
Merge pull request #28 from Raku/dependabot/npm_and_yarn/semver-7.5.2

Bump semver from 7.3.7 to 7.5.2
14:16 linkable6 left, evalable6 left 14:17 evalable6 joined 14:19 linkable6 joined
elcaro Has someone a blog/gist on migrating my modules from legacy ecosystem & CPAN to zef 14:28
I figure at the very least, a version bump & author update, and push to zef. 14:29
legacy ecosystem I probably just delete it from that big flat file
CPAN I'm not so sure... Can I even delete from CPAN? I guess I should log into PAUSE and check, but if anyone has a min-guide that would help 14:30
(or am I basically on the right track with the above statements)
14:31 tea3po left, tea3po joined 14:33 teatwo joined 14:36 tea3po left
timo Xliff: what use cases can you think of? i'm not entirely sure 15:15
leont elcaro: you can delete files from CPAN, though I have no idea how the indexer handles it 15:22
15:36 linkable6 left, evalable6 left 15:38 evalable6 joined 15:39 linkable6 joined 16:00 rf joined 16:07 RakuIRCLogger left, lizmat left, Geth left
rf Morning folks 16:08
16:09 lizmat joined
timo there's also i think a website that keeps deleted stuff from cpan 16:53
sjn set your mirror to backpan.perl.org to download packages that have been removed from cpan 16:56
17:05 xinming left 17:07 xinming joined
ingy anyone know if this work got done for raku? news.perlfoundation.org/post/grant...s_for_raku 17:17
17:27 sena_kun joined
nemokosch soon™️ for years 17:34
ceterum censeo, it's a nonsense that YAML doesn't support mixing anchored arrays in another array
18:00 reportable6 left 18:03 reportable6 joined 18:10 lizmat left 18:11 lizmat joined 18:12 Geth joined 18:33 rf left 18:49 rf joined 19:21 ab5tract joined, Sgeo joined
Xliff timo: I18N Raku? 19:24
20:01 ab5tract left
Voldenet I've seen some programming languages with i18n and it was the most horrifying stuff I've ever seen 20:21
it seems like a good idea to not use english everywhere, but then you end up using single syscall/module/some moving part that only uses english for its debug output, exceptions and other messages 20:23
timo excel has i18n for formulas 20:40
support.content.office.net/en-us/m...287f35.png 20:41
support.microsoft.com/en-us/office...cc8d326889 20:42
guifa so for i18n, one thing we COULD do (and I had kinda working) is i18lize the error messages 20:56
the catch is it requires wrapping .message on every X:: on INIT which is, well, slow (I don't think it was working on BEGIN when I last looked at it) 20:57
21:01 evalable6 left, linkable6 left 21:02 evalable6 joined 21:03 linkable6 joined
[Coke] if we are doing internationalization right, we should have a lookup table for all the error messages, and not have english be special. 21:36
Voldenet formulas in excel create very annoying problem that is solved by "functions translator" addin 21:42
this is not particularily useful, because excel itself isn't that user friendly to begin with
it's from the same the same line of reasoning that translates error messages 21:44
You _help_ your users by letting them use _their_ language 21:46
lizmat I think the most important thing is being able to deparse a program in language X in language Y 21:47
so that people using different languages can help each other fixing problems
Voldenet sure why not, as long as it's a programming language 21:48
21:53 derpydoo left
Voldenet imo english variable, class, method names and comments are bigger problems than keywords in any actual code 21:54
I'm not going to hate deparsing too hard, but translated exceptions are pure evil 21:56
Most error messages are always going to be irrelevant (no matter the language) for end users, but when the developer gets an error message that uses enduser's language, they actually may not understand what it says 22:00
on top of it, translated messages are really, really difficult to find 22:04
lizmat if all error messages are typed, then translating should be a smot (simple matter of translation) 22:06
so maybe we should first try to get rid of ad-hoc error messages in core :-)
I think though that multi language support would be befitting a 100 year programming language 22:07
Voldenet I'd just argue to make translations opt-in choice
[Coke] elminating ad hoc messages is great on its own.
lizmat Voldenet: they would always be opt-in: in the DEPARSE examples, you need to specify a role to get translations 22:09
Voldenet of course, but for exceptions, I'm scared of C# way of doing it
lizmat on that thought, /me goes to sleep& 22:11
[Coke] ~~ 22:13
22:16 squashable6 left 22:19 squashable6 joined
nemokosch C# putting people to bed lol 22:20
Voldenet implementing nqp in C# would let you see `未将对象引用设置到对象的实例` as error message when using zh-Hans locale 22:21
that doesn't invite good night's sleep 22:22
Tirifto I think multilingual programming would be great to have, but perhaps tricky to get right. I’ve seen Citrine do it, but from what I know, the implementation of the localisation was pretty naïve. 22:32
22:36 sena_kun left
Tirifto I don’t think translating whole programs is a particularly efficient way to go, but you’d definitely want the interface to be translatable. So any names that get exported from a package (variables, subs, methods). Because otherwise a module written in Chinese would be practically unusable by modules written in Hebrew, for example. 22:38
Voldenet in the meanwhile, all programmers will simply switch to english :) 22:39
if you don't get a single thing right that is
Tirifto And then languages have the problem of not mapping one-to-one. A word can be translated in different ways, just as multiple words can have the same translation in a different language. Which can cause problems in translating code, i.e. if you rely on polymorphism that only works because the names of two different methods happen to agree in your language, but might not in others. 22:42
Voldenet, all programmers already use English, so the only way to go is up. :P 22:43
22:46 derpydoo joined
Voldenet but of course, some programmers use the funny math symbols mostly, but eventually there's tons of english there 23:08
guifa [Coke]: that I think could be done. I don't think the error messages themselves are per se Raku standard. 23:40
lizmat: you know I'm VERY in favor of getting rid of adhoc messages. I think it's good not just for i18n, but also for allowing errors to be filtered better 23:41
(e.g. some messages make a message based on a priviate attribute, or generate a message that combines three or four data points but aren't easily extreactable)
leont Yeah, less ad-hoc exceptions would be great 23:42
guifa given 23:45
23:46 evalable6 left, linkable6 left
guifa class A { method x { … } }; class B is A { method x { … } }; 23:46
23:46 linkable6 joined
guifa is there anyway I can wrap A.x() that would ALSO manage to catch calls to B.x() ? (I'm assuming no) 23:46
23:47 evalable6 joined
guifa if that's the case, if we did an overhaul of X classes, if we had X.message pass along to a X.MAKE-MESSAGE that was in turn set for each class, then a localization module could easily wrap X.message() and handle stuff without the overhead of hundreds of wraps 23:51
Also re parse/deparse. AppleScript (RIP) apparently had an experimental French and German dialect going which actually could work okay because scripts actually compiled to a weird bytecode that preserved to a large degree certain structures of the input. 23:53
(not that I'm suggesting we do that. I think error messages is as far as we should go. MAYBE figuring out a way to fenangle .WHY or something but that's better on individual compiles I think) 23:54
23:57 RonaldR34g4m left, Vyrus joined