[00:51] *** buildable6 left
[00:53] *** buildable6 joined
[01:53] *** buildable6 left
[01:56] *** buildable6 joined
[02:56] *** buildable6 left
[02:58] *** buildable6 joined
[03:58] *** buildable6 left
[04:01] *** buildable6 joined
[04:05] *** hythm joined
[04:13] *** buildable6 left
[04:13] *** buildable6 joined
[05:01] *** buildable6 left
[05:04] *** buildable6 joined
[06:04] *** buildable6 left
[06:05] *** buildable6 joined
[06:11] *** hythm left
[07:05] *** buildable6 left
[07:07] *** buildable6 joined
[07:11] *** buildable6 left
[07:11] *** buildable6 joined
[08:07] *** buildable6 left
[08:10] *** buildable6 joined
[08:36] *** sena_kun joined
[09:10] *** buildable6 left
[09:13] *** buildable6 joined
[09:17] *** buildable6 left
[09:17] *** buildable6 joined
[10:13] *** buildable6 left
[10:15] *** buildable6 joined
[11:00] *** melezhik joined
[11:05] *** melezhik left
[11:15] *** buildable6 left
[11:17] *** buildable6 joined
[11:21] *** buildable6 left
[11:21] *** buildable6 joined
[12:17] *** buildable6 left
[12:20] *** buildable6 joined
[12:31] <tbrowder__> on #raku i pointed out my problems with using try on an exception in $?DISTRIBUTION when it is installed. my question is: is that a bug in zef (one of its many modules) or raku?

[13:14] <Geth> ¦ rakudo/main: bd53ad250a | (Elizabeth Mattijsen)++ | src/core.c/Unicode.rakumod

[13:14] <Geth> ¦ rakudo/main: Add test for Unicode 15.1

[13:14] <Geth> ¦ rakudo/main: 

[13:14] <Geth> ¦ rakudo/main: Doesn't actually change anything, apart from when MoarVM supports

[13:14] <Geth> ¦ rakudo/main: Unicode 15.1, then no changes will be needed here anymore.

[13:14] <Geth> ¦ rakudo/main: 

[13:14] <Geth> ¦ rakudo/main: Test based on the fact that 15.1 added a

[13:14] <Geth> ¦ rakudo/main: 

[13:14] <Geth> ¦ rakudo/main: <…commit message has 5 more lines…>

[13:14] <Geth> ¦ rakudo/main: review: https://github.com/rakudo/rakudo/commit/bd53ad250a

[13:20] *** buildable6 left
[13:21] *** buildable6 joined
[14:21] *** buildable6 left
[14:21] *** buildable6 joined
[14:32] *** buildable6 left
[14:32] *** buildable6 joined
[14:43] *** buildable6 left
[14:43] *** buildable6 joined
[14:45] *** codesections1 joined
[14:55] *** codesections1 left
[14:56] *** codesections1 joined
[15:11] <tbrowder__> if this is a bug, i will create a PR for a suitable test

[15:20] <ugexe> tbrowder__: i dont think there is a bug

[15:21] <ugexe> i suspect you are misunderstanding how error handling works

[15:21] <ugexe> you say you pointed out your problems, but you've only stated that you are having problems

[15:21] *** buildable6 left
[15:22] <ugexe> you haven't pointed out what the actual problem is. what is the text you are seeing, what are you expecting to see

[15:22] <tbrowder__> probably :)

[15:23] <ugexe> i think you should create a suitable test *on your demonstration repo* 

[15:23] <ugexe> write a test for your repo you think should pass, but it doesn't

[15:23] *** buildable6 joined
[15:24] <ugexe> note you will have to test via `raku t/name-of-test.rakutest` since you want to use the installed version of whatever module you would be testing, and not -Ilib

[15:33] <tbrowder__> what i am seeing is the raku error msg when i expect it to be hidden as i have shown

[15:34] <tbrowder__> m: try { die “bad” } // say “failed”

[15:34] <camelia> rakudo-moar bd53ad250: OUTPUT: «failed␤»

[15:34] <tbrowder__> that’s from the docs

[15:35] <ugexe> what error message

[15:35] <ugexe> this is why i asked for a test

[15:35] <ugexe> are you sure it isn't a warning message for instance?

[15:36] <ugexe> m: say ~Any

[15:36] <camelia> rakudo-moar bd53ad250: OUTPUT: «Use of uninitialized value of type Any in string context.␤Methods .^name, .raku, .gist, or .say can be used to stringify it to something meaningful.␤␤  in block <unit> at <tmp> line 1␤»

[15:36] <ugexe> for example

[15:37] <tbrowder__> ah, maybe. let me go to a real terminal and i’ll paste it here. back in a few

[15:37] <ugexe> if its a warning you can do

[15:38] <ugexe> return so quietly try $?DISTRIBUTION.content($path)

[15:38] <ugexe> return so quietly try $?DISTRIBUTION.content($path).open(:r:).close

[15:38] *** codesections1 left
[15:39] <tbrowder__> here it is:

[15:39] <tbrowder__> https://www.irccloud.com/pastebin/XUH0EKcG/

[15:40] <ugexe> yeah, i think you need to create a script or test to show how you are getting that

[15:40] <ugexe> there is at least a warning in there

[15:40] <ugexe> i dunno if the last line is a real exception or part of the warning

[15:41] <ugexe> oh the last line is from your script

[15:41] <ugexe> so yeah you are seeing a warning

[15:41] <ugexe> there is no exception

[15:41] <ugexe> return so quietly try $?DISTRIBUTION.content($path).open(:r:).close

[15:41] <ugexe> use that

[15:41] <tbrowder__> the last line is from my sub and, as i thought, should be the only message'

[15:42] <ugexe> quietly will hide the warning. the warning itself could/should be worked around in core though

[15:42] <ugexe> but yeah just use `return so quietly try $?DISTRIBUTION.content($path).open(:r:).close` and you'll get the result you want

[15:46] <tbrowder__> ok that works, "quietly" is the trick! thanks. gotta check the docs

[15:47] <tbrowder__> "runtime" warnings!!

[15:48] <tbrowder__> so a runtime warning appears to be a failure

[15:49] <tbrowder__> at least it causes that without the try block

[15:49] <tbrowder__> hm...

[15:50] <ugexe> no

[15:50] <ugexe> the try block eats the exception from trying to open a non-existent file

[15:50] <ugexe> or failure or whatever

[15:50] <ugexe> you can't expect to try and open a non-existent file and not get a failure/exception

[15:51] <tbrowder__> but i don't see the "eating" that's part of my giant confusion

[15:51] <ugexe> yes you do

[15:51] <ugexe> you are conflating a warning message and an exception message

[15:51] <ugexe> and it is entirely possible for both to occur

[15:52] <ugexe> m: "non-existent-file".IO.add(Any).open(:r)

[15:52] <camelia> rakudo-moar bd53ad250: OUTPUT: «Use of uninitialized value of type Any in string context.␤Methods .^name, .raku, .gist, or .say can be used to stringify it to something meaningful.␤  in block <unit> at <tmp> line 1␤Failed to open file /home/camelia/non-existent-file: No such f…»

[15:52] <ugexe> that is one warning and one exception

[15:52] <ugexe> m: try "non-existent-file".IO.add(Any).open(:r)

[15:52] <camelia> rakudo-moar bd53ad250: OUTPUT: «Use of uninitialized value of type Any in string context.␤Methods .^name, .raku, .gist, or .say can be used to stringify it to something meaningful.␤  in code  at <tmp> line 1␤»

[15:52] <ugexe> just the warning

[15:53] <ugexe> m: quietly "non-existent-file".IO.add(Any).open(:r)

[15:53] <camelia> rakudo-moar bd53ad250: OUTPUT: «Failed to open file /home/camelia/non-existent-file: No such file or directory␤  in block <unit> at <tmp> line 1␤␤»

[15:53] <ugexe> just the exception

[15:56] <ugexe> my examples even emulate the source of the warning and exception you would see

[15:56] <ugexe> no need to involve $?DISTRIBUTION

[15:59] <ugexe> the reason you see a warning only when installed is because installed and non-installed distribution use a different distribution class, and the installed one doesn't check for definedness in a spot it should. but that will only result in a warning, not an exception

[15:59] <tbrowder__> M: try { quietly "non-existent-file".IO.add(Any).open(:r) } //  say "bad atempt"

[15:59] <tbrowder__> m: try { quietly "non-existent-file".IO.add(Any).open(:r) } //  say "bad atempt"

[15:59] <camelia> rakudo-moar bd53ad250: OUTPUT: «bad atempt␤»

[16:00] *** vrurg_ joined
[16:00] <tbrowder__> ok, so no problem handling it in either case, then.

[16:01] *** vrurg left
[16:01] <tbrowder__> but doesn't this example at least warrant more detail in the docs

[16:05] <ugexe> i don't think the docs should tell users when to handle warnings and exceptions for every possible type/method/etc

[16:06] <ugexe> as a user you should understand what exceptions and warnings are. and then when you see them you handle them based on generic documentation on warnings and/or exceptions

[16:07] <ugexe> take for instance my earlier examples that don't use $?DISTRIBUTION at all... should those also tell users e.g. they potentially need to handle exception and warnings?

[16:08] <Geth> ¦ rakudo/ugexe-patch-1: 3d180e8839 | (Nick Logan)++ (committed using GitHub Web editor) | src/core.c/CompUnit/Repository/Installation.rakumod

[16:08] <Geth> ¦ rakudo/ugexe-patch-1: Don't emit warnings when trying to access non-existent file

[16:08] <Geth> ¦ rakudo/ugexe-patch-1: review: https://github.com/rakudo/rakudo/commit/3d180e8839

[16:08] <Geth> ¦ rakudo: ugexe++ created pull request #5450: Don't emit warnings when trying to access non-existent file

[16:08] <Geth> ¦ rakudo: review: https://github.com/rakudo/rakudo/pull/5450

[16:09] <ugexe> there is a pull request to get rid of the warning

[16:18] <ugexe> admittedly it would be kind of neat if every method listed all the possible exceptions it could throw 

[16:22] <tbrowder__> i'm not arguing. but clear examples greatly help us regular raku users. the try/catch area is not for the faint-hearted!

[16:22] <tbrowder__> thanks for your help!

[16:23] *** buildable6 left
[16:24] *** buildable6 joined
[17:21] <lizmat> nine ab5tract_ it feels like RakuAST::Package should be more like a base class, than having all sorts of special checks built in?

[17:22] <lizmat> in other words: declarator should not be an attribute, but a subclassable method ?

[17:24] *** buildable6 left
[17:27] *** buildable6 joined
[17:29] <ab5tract_> Lizmat: I have thought the same thing. I’m not sure if there is a strong reason to keeping it this way

[17:29] <lizmat> then I will endeavour to streamline it

[17:30] <lizmat> m: class A { method a() { $!a } }

[17:30] <camelia> rakudo-moar bd53ad250: OUTPUT: «===SORRY!=== Error while compiling <tmp>␤Attribute $!a not declared in class A␤at <tmp>:1␤------> class A { method a() { $!a } }⏏<EOL>␤»

[17:30] <lizmat> m: say Q|class A { method a() { $!a } }|.AST

[17:30] <camelia> rakudo-moar bd53ad250: OUTPUT: «RakuAST::StatementList.new(␤  RakuAST::Statement::Expression.new(␤    expression => RakuAST::Package.new(␤      declarator => "class",␤      name       => RakuAST::Name.from-identifier("A"),␤      body       => RakuAST::Block.new(␤        …»

[17:31] <lizmat> m: say Q|class A { method a() { $!a } }|.AST.EVAL

[17:31] <camelia> rakudo-moar bd53ad250: OUTPUT: «No $!a attribute in A␤  in any IMPL-EXPR-QAST at src/Raku/ast/variable-access.rakumod line 258␤  in any IMPL-TO-QAST at src/Raku/ast/expressions.rakumod line 42␤  in any IMPL-TO-QAST at src/Raku/ast/statements.rakumod line 545␤  in any IMPL-TO…»

[17:31] <lizmat> is what brought me there

[17:31] *** buildable6 left
[17:31] *** buildable6 joined
[17:33] <lizmat> which is the only remaining test fail in t/spec/integration/role-composition-vs-attribute.t

[18:27] *** buildable6 left
[18:30] *** buildable6 joined
[19:01] <Geth> ¦ rakudo/main: c727c2ae0e | (Elizabeth Mattijsen)++ | src/Raku/Actions.nqp

[19:01] <Geth> ¦ rakudo/main: RakuAST: check for MONKEY-TYPING when augmenting

[19:01] <Geth> ¦ rakudo/main: review: https://github.com/rakudo/rakudo/commit/c727c2ae0e

[19:02] <lizmat> 976 +1 :-)

[19:30] *** buildable6 left
[19:32] *** buildable6 joined
[20:09] *** melezhik joined
[20:14] *** melezhik left
[20:32] *** buildable6 left
[20:33] *** buildable6 joined
[21:33] *** buildable6 left
[21:36] *** buildable6 joined
[22:36] *** buildable6 left
[22:38] *** buildable6 joined
[23:08] *** hythm joined
[23:14] *** hythm left
[23:34] <Geth> ¦ rakudo/main: 4a5e0181e4 | (Elizabeth Mattijsen)++ | 2 files

[23:34] <Geth> ¦ rakudo/main: RakuAST: remove ::Package::Augmented

[23:34] <Geth> ¦ rakudo/main: 

[23:34] <Geth> ¦ rakudo/main: Instead, add a $!augmented attribute to ::Package and adapt the

[23:34] <Geth> ¦ rakudo/main: necessary logic to cope with being an augmented class.

[23:34] <Geth> ¦ rakudo/main: 

[23:34] <Geth> ¦ rakudo/main: This should make it possible to subclass ::Package for specific

[23:34] <Geth> ¦ rakudo/main: types of packages, such as classes and roles.

[23:34] <Geth> ¦ rakudo/main: review: https://github.com/rakudo/rakudo/commit/4a5e0181e4

[23:38] *** buildable6 left
[23:39] *** buildable6 joined
[23:46] *** buildable6__ joined
[23:46] *** buildable6 left
[23:47] *** sena_kun left
