🦋 Welcome to the IRC channel of the core developers of the Raku Programming Language (raku.org #rakulang). This channel is logged for the purpose of history keeping about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Logs available at irclogs.raku.org/raku-dev/live.html | For MoarVM see #moarvm
Set by lizmat on 8 June 2022.
01:03 MasterDuke joined
MasterDuke interesting. for me locally, `raku -e 'my $a = "500k.txt".IO; my int $b = 0; $b++ for $a.lines; say $b; say now - INIT now'` takes ~0.17s, but `raku -e 'my $a = "500k.txt".IO; say $a.lines.elems; say now - INIT now'` takes ~0.28s, and `raku -ne 'BEGIN my Int $a; $a++; END { say $a; say now - INIT now }' 500k.txt` takes ~0.38s, where 500k.txt is a 01:09
34mb file of 500k lines of just ascii text. for reference, `time perl -Ci -nE '$a++; END { say $a }' 500k.txt` takes ~0.046s
m: BEGIN my int $a   # is this a known thing? 01:15
camelia ===SORRY!=== Error while compiling <tmp>
An exception X::Comp::AdHoc occurred while evaluating a BEGIN:
Lexical with name '$a' has wrong type. real type 8 wanted type -1
at <tmp>:1
Exception details:
===SORRY!=== Error while co…
MasterDuke ah, github.com/rakudo/rakudo/issues/5043 01:18
fwiw, it's never worked
03:04 MasterDuke left 08:52 lizmat_ joined 08:56 lizmat left 09:05 lizmat_ left, lizmat joined 09:10 sena_kun joined 09:29 finanalyst joined
finanalyst lizmat ping 09:30
lizmat pong
finanalyst good morning!! I sent you an email without replying to a previous one
I suspect its been spammed 09:31
lizmat lemme look.. I didn't check my mail after 10pm last night
finanalyst is there an evalbot for rakuast here?
lizmat alas, no 09:32
finanalyst ok. I was thinking it might be easier to sent you one-liners here than document them in an email
lizmat C<A<>> is the one you meant ?
finanalyst yes 09:33
Its quite serious because C<> is used alot in the documentation
lizmat ok, looking at it now
finanalyst I'm asking about the eval bot because I think I found another quirk 09:34
lizmat m: Q|=rakudoc C<A<>>|.AST
camelia ===SORRY!===
Cannot unbox a type object (Nil) to a str.
finanalyst thats it 09:35
i forgot .AST is available in normal rakudo
I think I've found another quirk. 'resolved-config' does not appear to be picking up config from =for blocks 09:36
or at least from item
I'm trying to golf where
lizmat testing a fix now for C<A<>> 09:39
Geth rakudo/main: 49751627a1 | (Elizabeth Mattijsen)++ | src/core.c/RakuAST/Fixups.rakumod
RakuAST: Fix C<A<>>, spotted by finanalyst++
09:44
finanalyst lizmat++ !+
or maybe +! 09:45
that fixed C<> but there's something else preventing rakudoc_draft_3.rakudoc from compiling. ...Looking 10:00
lizmat I've found an interesting problem with the RakuDoc spec and implementation. I'm documenting it in an issue just to make sure I understand it. 10:22
lizmat finanalyst: ok :-) 10:27
finanalyst lizmat just finished the Issue 11:06
hope it makes sense
lizmat URL ? 11:07
found it
finanalyst github.com/Raku/RakuDoc-GAMMA/issues/37
lizmat finanalyst: testing a fix for the cannot unbox to native string case 11:17
finanalyst I was just about to paste the stacktrace. Is that needed any more? 11:18
lizmat no, generated one of my own :-) 11:19
but in the future, please :-)
finanalyst I'll try.
It seemed to me to be a problem of conflicting specification rules, though 11:20
lizmat well, it doesn't crash anymore: not sure you like the produced AST though :-) 11:21
Geth rakudo/main: a51ee10dbf | (Elizabeth Mattijsen)++ | src/core.c/RakuAST/Fixups.rakumod
RakuAST: fix another issue with A<>, spotted by finanalyst++
finanalyst m: Q|=rakudoc E<laquo>|.AST 12:26
camelia ( no output )
finanalyst m: Q|=rakudoc E<laquo>|.AST.say 12:27
camelia RakuAST::StatementList.new(
RakuAST::Doc::Block.new(
type => "rakudoc",
abbreviated => True,
paragraphs => (
RakuAST::Doc::Paragraph.new(
RakuAST::Doc::Markup.new(
letter => "E",
finanalyst lizmat I got " laquo" is not a valid HTML5 entity as an error 12:28
Rakudoc v1 has 'E<laquo>' which is brought into RakuDoc 2 12:29
lizmat yeah, that should work 12:30
BTW, the error in your mail is caused by " E< foo bar > " not literalizing: investigatingi 12:31
finanalyst same problem here 12:32
RakuDoc2 has 'E<B<left- |> laquo>'
lizmat I don't think we should allow markup inside of a E<> 12:33
finanalyst Agree
I'll raise an issue
[Coke] +1 12:34
finanalyst: should your rakuast-rakudoc-render.git run without error using rakudo-latest? 12:44
Getting a compilation error, non AST/pod related
finanalyst have you downloaded the lastest version.
I have been updating regularly, and I did have an error at one point 12:45
most recent version is v0.1.5 12:46
lizmat actually, E< B<foobar>|laquo> should be ok, finanalyst ? 12:47
finanalyst I'll check
yes removing the leading space is OK 12:48
Note that it is "E<B<left- |>laquo>" with the B<> encompassing the `|` 12:50
But RakuAST seems happy with it
[Coke] yes, I have latest version of your repo and v2024.05-31-ga51ee10dbf.
finanalyst [Coke] I'm about 1/2 way through a Markdown version
[Coke] Type 'CompletedCells' is not declared 12:51
finanalyst [Coke] what is the verson in the META6? 13:00
'CompletedCells' is in the distribution, so I've not used the module somewhere 13:01
[Coke] it's used in a variable declaration 13:02
my CompletedCells... 13:03
"version": "0.1.5",
I ran Build.pm, and am using the command line suggested in the email. I can respond to the email w/ logs if you like 13:07
finanalyst I've just pushed my latest version. It passes all the tests in xt/ and `bin/RenderText rakudociem-upsum` creates the text file 13:09
[Coke] RAKUDO_RAKUAST=1 raku -I. -MRakuDoc::Render --rakudoc=Generic rakudociem-ipsum.rakudoc still dies 13:10
finanalyst try running without RAKUDO_RAKUAST=1 13:11
It will not produce output, but it will compile the dependencies 13:12
The problem is mentioned in the README
[Coke] new error: Colon pair value ' E<BALLOT BOX WITH CHECK> ' too complex to use in name
finanalyst sh..£*^!^!&$!£ 13:13
That is an update of rakudociem that hasnt been corrected
lizmat ok, I figured out what the problem is with E<foo|laquo>
finanalyst It shouf be BALLOT BOX WITH X 13:14
lizmat the parser actually doesn't support it at the moment
It expects that here is no actual | in a E<>
so no alternate description
I guess I must have missed that in RakuDoc 2.0
finanalyst It's not in Rakudociem 13:15
lizmat finanalyst: are you sure that rakudoc 2.0 that E<foo|laquo> is supposed to be a thing ?
finanalyst I've raised an issue about it Embedding in E 13:16
lizmat m: say Q|=rakudoc E<laquo>|.AST
camelia RakuAST::StatementList.new(
RakuAST::Doc::Block.new(
type => "rakudoc",
abbreviated => True,
paragraphs => (
RakuAST::Doc::Paragraph.new(
RakuAST::Doc::Markup.new(
letter => "E",
lizmat m: say Q|=rakudoc E<laquo>|.AST.statements.head
camelia RakuAST::Doc::Block.new(
type => "rakudoc",
abbreviated => True,
paragraphs => (
RakuAST::Doc::Paragraph.new(
RakuAST::Doc::Markup.new(
letter => "E",
opener => "<",
closer => ">",
lizmat m: say Q|=rakudoc E<laquo>|.AST.statements.head.paragraphs.head
camelia RakuAST::Doc::Paragraph.new(
RakuAST::Doc::Markup.new(
letter => "E",
opener => "<",
closer => ">",
atoms => (
"«",
),
meta => (
"laquo",
)
)
)
lizmat note that the atoms contain the representation of &laquo, and the meta contains the entity name 13:17
if E<foo|laquo> is a thing, then another way needs to be devised to handle this *or* the handling of the contents of E<> is left to the renderer 13:18
the latter feels meh
finanalyst [Coke] I just updated rakudociem-ipsum. Run `raku Build.pm` to get new copy 13:19
lizmat I think we need to persuade Damian to let E<> not have alternate renderings. 13:20
lizmat well, fwiw, I can see the use of it
I mean: leaving it to the renderer, would allow for custom entities 13:21
[Coke] finanalyst: same error
finanalyst custom entities - I suppose
[Coke] oh! 13:22
[Coke] there are two instances left in the doc.
finanalyst On repo, there are five instances of BALLOT BOX, two WITH CHECK and two WITH X 13:25
these should be ok
The test is not working yet anyway, so I'll remove them for the time being 13:26
[Coke] just uploaded a new rakudociem 13:27
[Coke] new failures: gist.github.com/coke/cd0a48667f4c7...7e39f4dc17 13:28
finanalyst [Coke] those failures are expected 13:29
lizmat finanalyst: perhaps E<laquo> should parse as atoms => "", meta => laquo => "«"
[Coke] \o/
finanalyst but the RakuDoc::Render module has been compiled
Now try with the RAKUDOAST flag back on 13:30
lizmat finanalyst: and E<foo|laquo> as atoms => "foo", meta => laquo => "«" ?
aka: make the meta a list of pairs, rather than a list of strings
finanalyst The problems arise using `RAKUDO-RAKUAST raku --rakudoc=Generic` if RakuDoc::Render has not been compiled and in the environment 13:31
So RakuAST tries to compile it, but it uses Monitors, which RakuAST doesnt like 13:32
I think the problem will be avoided by installing with zef
lizmat (that's because OO::Monitors uses macros and macros are NYI in RakuAST) 13:35
jdv is the macro guy gonna come back when rakuast is ready to try to do them again? 13:38
finanalyst [Coke] I've done something wrong with the distribution. I have a Build.pm in the root. Should it be Build.rakumod? 13:42
jdv .seen masak
tellable6 jdv, I saw masak 2021-06-19T16:38:00Z in #raku: <masak> codesections: well, it _parses_. yours, I mean.
lizmat masak has been pushing to Alma the past weeks / months 13:44
him being behind the great firewall doesn't make interaction easier :-( 13:45
finanalyst lizmat Coke had a problem with my RakuAST-RakuDoc distribution. So I tried a zef install on the local directory. It is failing for each of the dependencies, but zef . --dep-only reports they are all available 14:05
lizmat did you try to install with RAKUDO_RAKUAST=1 ? 14:06
finanalyst no. so RAKUDO_RAKUAST=1 zef install . ? 14:15
lizmat no, you shouldn't :-) 14:16
there's still some precomp issues with RakuAST
finanalyst just tried and got them. 14:17
I can get everything working, and I tried to explain them in the README, but Coke has not been able to get it to work 14:18
Geth rakudo/main: 5b44a64b2d | (Elizabeth Mattijsen)++ | src/core.c/RakuAST/Fixups.rakumod
RakuAST: fix E<foo <bar> |entity> parsing

The parser so far didn't anticipate this. It does now. However, this means that the .meta of the node will now contain Pairs, with the key being the entity name, and the value its rendering.
lizmat finanalyst ^^ 14:19
finanalyst wow
to be clear: E<BALLOT BOX> will return the character 14:20
lizmat with the meta: 14:21
meta => (
"BALLOT BOX" => "☐",
)
finanalyst meta as well?
lizmat ah, I see I need to adapt deparsing :-)
Geth rakudo/main: b2f81c23f7 | (Elizabeth Mattijsen)++ | src/core.c/RakuAST/Fixups.rakumod
RakuAST: fix stringification of E<>

Now that E<foo|entity> is a thing
14:36
lizmat finanalyst: for rendering E<> without the alernate text representation, you need to do .meta.map(*.value).join 14:37
finanalyst lizmat ok 14:39
and the config problem?
lizmat still trying to figure that one out 14:42
finanalyst: the issue with that one is really: do we expect markup inside :foo<bar B<here> > ? 14:46
technically, it's a quoted string, as its between < >
should we allow that ? 14:47
finanalyst At the moment I am only using it for bullets for item lists, which means I want to be able to get E< BALLOT BOX> as a Str
lizmat fg 14:49
finanalyst I suppose that if someone (not me!!!) wants more, they can look at the AST
so resolve-config can be specified to only produce Raku objects, not RakuDoc objects 14:50
[Coke] I am removing the dependency on OO::Monitors. That should resolve the CompletedCells issue 14:52
lizmat going to mull over it while afk& 14:54
Geth rakudo/main: 5dd0ad6f50 | (Elizabeth Mattijsen)++ | src/core.c/RakuAST/Fixups.rakumod
RakuAST: make sure E<> markup flattens correctly
17:38
lizmat finanalyst: ping 17:39
finanalyst back from dinne 18:10
r
18:14 kjp left, kjp joined
lizmat pong :-) 18:19
I'm afraid the :bullet<E<foo bar>> thing will need an issue 18:20
Do we apply Raku semantics inside the :bullet< > or not
if we do, then :bullet<E<foo bar>> is the equivalent of bullet => <E<foo bar>> 18:21
which is the equivalent of bullet => ('E<foo','bar>') 18:22
± val semantics
finanalyst lizmat I'm adding this to the E embed issue 18:34
I think that the :bullet possibility for lists is a more useful tweak than allowing a differing format for a custom entity 18:35
18:38 [Coke] left
lizmat but that still wouldn't make it a markup / entity 18:44
so it would not do what you wanted to do in that example
19:06 [Coke] joined 19:16 lizmat left 19:22 lizmat joined
finanalyst lizmat I just updated github.com/Raku/RakuDoc-GAMMA/issues/38 to reflect my understanding of our conversation 19:39
lizmat yeah, that's describes the issue well... 19:43
m: dd :a[1,2,3] # this is also valid Raku syntax 19:44
camelia :a([1, 2, 3])
lizmat afk& 19:45
finanalyst I was looking at the table of syntaxes in the RakuDoc spec, which does not contain a '[ ]' 19:46
so we would need a new bracketing character ? :(
lizmat rakudoc already supports :foo[1,2,3] in config 19:47
so I guess the table needs an addition :-)
really afk&
finanalyst ⦅ ⦆? 19:50
\xff5f & \xxff60 19:51
so :bullet⦅E<BALLOT BOX WITH X>⦆ There is no space after 'bullet' thats just the font 19:54
lizmat =for foo =bullit<BALLOT BOX> ? 22:13
=for foo :bullit=<BALLOT BOX> ? 22:14
actually: 22:16
=for foo :bullit=<E<BALLOT BOX>> ?
=for foo =bullit<E<BALLOT BOX>>
23:04 sena_kun left 23:38 djinni` left 23:48 djinni` joined