🦋 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:03
reportable6 joined
|
|||
Util | Xliff: your second line was missing a final double-quote after `scriptinglanguage`. This does not address your real problem with 0x228a not working; looking at that now. | 00:05 | |
00:11
jpn joined
00:15
jpn left
|
|||
Xliff | Thanks, Util! | 00:25 | |
Util | Of U+2282..U+228B (⊂ ⊃ ⊄ ⊅ ⊆ ⊇ ⊈ ⊉ ⊊ ⊋), the last two (8A,8B) do not appear in the Rakudo source code. | 00:51 | |
I don't know if that is intentional, or just Not Yet Implemented. | |||
FYI: used info from www.compart.com/en/unicode/block/U+2200 | |||
01:07
zapwai left
01:14
jpn joined
|
|||
Util | Xliff: To implement, in github.com/rakudo/rakudo/tree/main/src , | 01:16 | |
most of the code could be cloned-and-hacked in core.c/set_subset.pm6 and core.c/set_proper_subset.pm6, | |||
with trivial entries also in core.c/OperatorProperties.pm6, core.c/precedence.pm6, Perl6/Grammar.nqp, Raku/Grammar.nqp, Raku/ast/operator-properties.rakumod . | |||
I don't know if that would actually be in `core.e` instead of `core.c`. | |||
But, I would suggest filing the issue first, just in case it is intentionally un-implemented. | |||
01:19
jpn left
02:19
evalable6 left,
linkable6 left
02:21
linkable6 joined,
evalable6 joined
|
|||
Xliff | Util: Thanks. Will do. | 02:26 | |
Due to orthogonality, I think it's core.c | |||
02:27
teatwo left
02:28
teatwo joined
|
|||
Xliff | m: DateTime.new( minute => 20, second => 1 ).say' | 02:29 | |
camelia | ===SORRY!=== Error while compiling <tmp> Two terms in a row at <tmp>:1 ------> ime.new( minute => 20, second => 1 ).say⏏' expecting any of: infix infix stopper statement end statement … |
||
Xliff | m: say DateTime.new( minute => 20, second => 1 )' | ||
camelia | ===SORRY!=== Error while compiling <tmp> Two terms in a row at <tmp>:1 ------> ateTime.new( minute => 20, second => 1 )⏏' expecting any of: infix infix stopper postfix statement end … |
||
Xliff | m: say DateTime.new( minute => 20, second => 1 ) | ||
camelia | Cannot call DateTime.new with these named parameters: minute second in block <unit> at <tmp> line 1 |
||
Xliff | HUNH? | ||
O_o | |||
m: say DateTime.new( year => 0, month => 1, minute => 20, second => 1 ) | 02:31 | ||
camelia | 0000-01-01T00:20:01Z | ||
Xliff | Missing defaults? | ||
Util | m: say DateTime.new(date => Date.today, minute => 1, second => 1); | 02:43 | |
camelia | 2023-07-07T00:01:01Z | ||
Util | Xliff: You must provide a year, or a date, to construct a DateTime. My guess is that there is no clear "correct" default, between year-of-todays-date and year zero. | 02:51 | |
In docs.raku.org/type/DateTime#method_new , this restriction is detailed via `:$year!` and `:$date!` in the first and second `multi`s. The `bang` forces a (normally optional) named argument to be required. | 02:53 | ||
03:03
MasterDuke left
|
|||
Xliff | Util: That's fine. It is then the error message that is LTA. | 03:05 | |
Because you CAN call DateTime.new with minute and second named arguments. | 03:06 | ||
A check with another die if year is not specified would go a long way to cutting down on programmer WTF moments. | 03:07 | ||
Util | Hmmm. I agree. The message is LTA. However, fixing it should be generalized into everything that has that kind of `multi` constructor (IMO), and the general solution is not obvious to me. | 03:11 | |
Definitely worth an issue. | |||
03:24
deoac left
04:24
reportable6 left,
nativecallable6 left,
greppable6 left,
benchable6 left,
coverable6 left,
tellable6 left,
bloatable6 left,
sourceable6 left,
squashable6 left,
notable6 left,
committable6 left,
evalable6 left,
shareable6 left,
statisfiable6 left,
linkable6 left,
unicodable6 left,
quotable6 left,
releasable6 left,
bisectable6 left,
benchable6 joined,
coverable6 joined
04:25
sourceable6 joined,
reportable6 joined,
linkable6 joined,
squashable6 joined,
greppable6 joined,
nativecallable6 joined,
evalable6 joined
04:26
committable6 joined,
tellable6 joined,
unicodable6 joined,
notable6 joined,
bisectable6 joined,
releasable6 joined
04:27
bloatable6 joined,
quotable6 joined,
statisfiable6 joined,
shareable6 joined
04:44
rf left
|
|||
Util | Xliff: relevant to the U+00228A,B issue : math.stackexchange.com/questions/1...eqq-symbol | 04:50 | |
teatwo | lol, The name of the Unicode codepoint is purely descriptive of the symbol: It is a “subset of” symbol (⊂) above a “not equal” symbol (≠); hence “subset of above not equal”. | 04:51 | |
04:57
squashable6 left
04:59
squashable6 joined
05:13
summerisle is now known as eof
05:24
willthechill left
06:00
reportable6 left
06:02
reportable6 joined
|
|||
patrickb | tbrowder_: DE : Zwölf Boxkämpfer jagen Viktor quer über den großen Sylter Deich. | 06:17 | |
tbrowder_: Or without Umlauts: Franz jagt im komplett verwahrlosten Taxi quer durch Bayern | 06:18 | ||
tbrowder_: Also see de.m.wikipedia.org/wiki/Pangramm in different languages. | 06:19 | ||
07:02
evalable6 left,
linkable6 left,
linkable6 joined
07:03
evalable6 joined
|
|||
xinming_ | Hi, Is there a good way to implement customized rouding logic? Let's say, with 3 digits xyz , with lowest digit z, we round as normal, 9 -> 10, but with y, we round as octal, so 7 -> 10, with x, we round with 4 base, which is 3 -> 10. | 07:34 | |
I don't mean the actual impelmentation, Some ideas to impelment this will be ok, now, what idea I have is write a class for this. But I fill it might be a bit over kill. | 07:35 | ||
and I also want to do something like .. operator for this. | 07:36 | ||
07:46
sena_kun joined
|
|||
nemokosch | Well, if x, y and z are digits of the very same number then I wouldn't call what you described "rounding" in any sense lol | 07:48 | |
07:48
jpn joined
|
|||
xinming_ | nemokosch, Yea, sorry for my poor English, What I mean is carry-over. :-) | 07:49 | |
I used rounding too much in recent days, Which caused me typing rounding. | 07:50 | ||
nemokosch | Damn, I thought round wouldn't be tied to a base at least... | 08:00 | |
xinming_ | I know we can have :3<121> kind of things for this, just curious what is the best way to mix different bases | 08:04 | |
lizmat | . | 08:06 | |
tellable6 | hey lizmat, you have a message: gist.github.com/a2222449b0759a056b...2c42673d0a | ||
xinming_ | hmm, the :60<121> is not working. :-( | ||
08:06
jpn left
|
|||
lizmat | .tell tbrowder_ do you have a place I could link to for that request? with maybe more information? | 08:07 | |
tellable6 | lizmat, I'll pass your message to tbrowder__ | ||
xinming_ | I think I'll try to implement something like DateTime | 08:09 | |
lizmat | xinming_ maybe something like docs.raku.org/routine/polymod could be of use ? | 08:11 | |
08:11
jpn joined
|
|||
xinming_ | lizmat: probably, quite happy I ask here, To save ton of efforts. | 08:14 | |
08:20
abraxxa joined
08:21
abraxxa left,
Sgeo_ joined,
Sgeo left
09:00
Sgeo_ left
09:08
lichtkind_ joined
09:16
sena_kun left
|
|||
guifa is head out. Next time y'all'll see him will be TPRC 2023! | 10:04 | ||
lizmat | safe travels! | 10:05 | |
10:06
guifa left
10:11
jpn left
10:35
jpn joined
10:39
jpn left
10:46
Guest45 joined,
Guest45 left
10:47
Guest45 joined,
Guest45 left
11:14
jpn joined
11:19
jpn left
11:43
jpn joined
11:48
tejr left
11:54
jpn left
11:56
tejr joined
12:00
reportable6 left
12:03
reportable6 joined
12:04
jpn joined
|
|||
tbrowder__ | lizmat: yes, i'll add a CONTRIBUTING doc to the module repo (i should have done that instead of blathering here). will a link to that suffice? | 12:05 | |
tellable6 | 2023-07-07T08:07:12Z #raku <lizmat> tbrowder_ do you have a place I could link to for that request? with maybe more information? | ||
12:09
jpn left
|
|||
tbrowder__ | patrickb: thanks! | 12:10 | |
lizmat | tbrowder__: it will, just weekly: it :-) | 12:13 | |
tbrowder__ | ok | 12:23 | |
thnx | |||
12:29
jpn joined
12:34
jpn left
|
|||
tbrowder__ | hm, patrickb has the perfect default solution with the Wikipedia pangrams, so I wiil just go with that for now for several languages. but users who want me to add a missing language can file an issue. in any case, my prog will allow for custom solutions if desired. this info will be in CONTRIBUTING, | 12:40 | |
12:47
jpn joined
12:52
jpn left
13:25
rf joined
13:50
jgaz left,
jgaz joined
14:12
willthechill joined
14:27
tea3po joined
14:29
jpn joined
14:30
teatwo left
14:34
jpn left
14:56
jpn joined
14:58
Maylay left
15:02
jpn left,
Maylay joined
15:27
jpn joined
15:31
jpn left
15:33
deferen left
15:42
Sgeo joined
16:02
jpn joined
16:11
jpn left
|
|||
xinming_ | m: class A { has $.a = 1; submethod TWEAK (:$!a) { } }; A.new.a; | 16:37 | |
camelia | ( no output ) | ||
xinming_ | m: class A { has $.a = 1; submethod TWEAK (:$!a) { } }; A.new.a.say; | ||
camelia | (Any) | ||
xinming_ | m: class A { has $.a = 1; submethod TWEAK (:$!a) { return unless $!a; 'check $!a passed here' } }; A.new.a.say; | 16:38 | |
camelia | (Any) | ||
xinming_ | In this case, how can we check the $!a value when passed, otherwise, we use the default provided in class definition please? | ||
I know we can assign the default value in TWEAK method, But want to see the has $.a = default; can be used too | 16:42 | ||
16:42
jpn joined
16:50
jpn left
16:53
jpn joined
16:59
jpn left
17:04
jpn joined
17:08
jpn left
17:42
sena_kun joined
18:00
reportable6 left
18:02
reportable6 joined
18:07
saint- joined
19:07
squashable6 left,
evalable6 left,
linkable6 left,
notable6 left,
coverable6 left,
nativecallable6 left,
greppable6 left,
bisectable6 left,
benchable6 left,
bloatable6 left,
tellable6 left,
statisfiable6 left,
releasable6 left,
committable6 left,
quotable6 left,
shareable6 left,
sourceable6 left,
unicodable6 left,
reportable6 left,
bloatable6 joined,
sourceable6 joined,
linkable6 joined,
notable6 joined,
unicodable6 joined,
bisectable6 joined
19:08
tellable6 joined,
shareable6 joined,
evalable6 joined
19:09
squashable6 joined,
coverable6 joined,
releasable6 joined,
committable6 joined,
reportable6 joined,
quotable6 joined,
benchable6 joined,
nativecallable6 joined
19:10
greppable6 joined,
statisfiable6 joined
19:31
jpn joined
19:38
jpn left
|
|||
librasteve | m: class B { has $.b = 1; method TWEAK { $!b = 21 } } B.new( b => 42 ).b.say; | 20:33 | |
Raku eval | Exit code: 1 ===SORRY!=== Error while compiling /home/glot/main.raku Strange text after block (missing semicolon or comma?) at /home/glot/main.raku:1 ------> has $.b = 1; method TWEAK { $!b = 21 } }⏏ B.new( b => 42 ).b.say; expecting any of: infix infix stopper statement end statement modifier statement modifier loop | ||
20:33
jpn joined
|
|||
librasteve | m: class B { has $.b = 1; method TWEAK { $!b = 21 } }; B.new( b => 42 ).b.say; | 20:34 | |
Raku eval | 21 | ||
librasteve | xinming: sorry, I do not understand your question | 20:35 | |
gfldex | m: class C { has $.a is rw is default('answer'); method TWEAK(:$a) { $!a = $a // $.a.VAR.default; } }; C.new.a.say; | 21:00 | |
camelia | answer | ||
gfldex | xinming_: ^^^, Right now there is no ideomatic way to get hold of the delcarative default value. However, you might find a way in github.com/rakudo/rakudo/blob/main...u.pm6#L147 | 21:04 | |
m: class B { has $.a = 'dragons'; }; use nqp; say B.^attributes; say nqp::getattr(B.^attributes[0], Attribute, '$!container_initializer'); | 21:15 | ||
camelia | (Mu $!a) (Mu) |
||
gfldex | I expected that to work. :-/ | ||
21:33
evalable6 left,
linkable6 left
21:34
linkable6 joined
21:35
evalable6 joined
21:42
sena_kun left
21:51
jpn left,
lichtkind_ left
|
|||
Xliff | Anyone have any ideas for a needed GUI? | 22:00 | |
22:12
rf left
22:29
jpn joined
22:37
jpn left
23:37
notable6 left,
benchable6 left,
nativecallable6 left,
reportable6 left,
unicodable6 left,
committable6 left,
squashable6 left,
shareable6 left,
tellable6 left,
linkable6 left,
statisfiable6 left,
quotable6 left,
coverable6 left,
greppable6 left,
bloatable6 left,
sourceable6 left,
bisectable6 left,
evalable6 left,
releasable6 left,
unicodable6 joined,
linkable6 joined,
statisfiable6 joined
23:38
committable6 joined,
nativecallable6 joined,
benchable6 joined,
notable6 joined,
evalable6 joined
23:39
releasable6 joined,
coverable6 joined,
reportable6 joined,
shareable6 joined,
quotable6 joined,
bloatable6 joined
23:40
greppable6 joined,
squashable6 joined,
bisectable6 joined,
tellable6 joined,
sourceable6 joined
|