🦋 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:01 reportable6 joined 00:06 merp left 00:22 jgaz left 00:26 japhb left 00:27 japhb joined 00:33 merp joined
pelevesque @tonyo - I wish there was a test-depends emptied field in your fez generated META6.json. 00:37
00:56 merp left 01:08 merp joined
tonyo can be added - 01:19
01:37 merp left 01:50 japhb left 01:53 japhb joined 01:59 merp joined 02:57 squashable6 left 02:59 squashable6 joined 03:54 jetchisel left 03:56 jetchisel joined 04:56 bisectable6 left, reportable6 left, evalable6 left, bloatable6 left, linkable6 left, shareable6 left, releasable6 left, sourceable6 left, unicodable6 left, quotable6 left, nativecallable6 left, tellable6 left, benchable6 left, squashable6 left, coverable6 left, committable6 left, greppable6 left, notable6 left, statisfiable6 left, benchable6 joined, unicodable6 joined 04:57 tellable6 joined, quotable6 joined, greppable6 joined 04:58 reportable6 joined, bloatable6 joined, sourceable6 joined, bisectable6 joined, linkable6 joined, shareable6 joined, committable6 joined, statisfiable6 joined, evalable6 joined, notable6 joined 04:59 releasable6 joined, coverable6 joined, nativecallable6 joined, squashable6 joined 05:12 euandreh left 06:00 reportable6 left 06:01 reportable6 joined 06:26 derpydoo left 06:50 tea3po joined 06:54 teatwo left 06:57 an3223 joined 07:09 an3223 left 07:14 jpn joined 07:20 ProperNoun left 07:26 jjido joined 07:36 jpn left 07:43 Sgeo left 07:56 dakkar joined 08:01 sena_kun joined 08:15 jjido left 08:55 jjido joined 09:01 archenoth joined 09:02 Oshawott left 09:07 jjido left 09:15 abraxxa joined 09:24 jjido joined, jpn joined 09:54 jjido left 09:55 an3223 joined 10:05 abhinav left 10:17 jjido joined 10:31 jjido left 10:46 TieUpYourCamel joined 10:48 jjido joined 10:50 bigdata left 11:02 abhinav joined 11:13 derpydoo joined
jjatria I'm using IO::Socket::Async to write a UDP client/server pair, but I can't figure out how the server gets the host/port of the incoming connection to send a response. I can receive messages on the server, but not respond 11:15
Does anybody know where I can get where to send a response to? 11:17
11:20 euandreh joined 11:24 euandreh left
lizmat jjatria: I'm actually unsure whether UDP is supported at all on Moar 11:24
perhaps time for a SO question
11:25 euandreh joined 11:26 an3223 left 11:35 jpn left
jjatria Sure, I can do that 11:38
11:42 an3223 joined 11:56 jjido left 12:00 reportable6 left 12:01 reportable6 joined 12:02 an3223 left
霧嶋 董香 Hi, how to get all built-ins functions and keywords in raku ? 12:25
12:38 jpn joined 12:43 jjido joined 13:14 knarkhov joined
[Coke] is this for an editor/IDE - I think many cheat and keep a list. You could introspect the grammar and CORE:: (I think) to try to get a introspected list. 13:17
13:17 jjido left
[Coke] m: dd CORE::.keys[^5] 13:20
camelia ("\&prefix:<++⚛>", "\&chop", "UIntPosRef", "\&print", "\&all")
[Coke] m: dd CORE::.keys.sort[^5]
camelia ("!INIT_VALUES", "\$!", "\$/", "\$=pod", "\$?BITS")
[Coke] m: dd CORE::.keys.grep(*.starts-with("\&").sort[^5]
camelia ===SORRY!=== Error while compiling <tmp>
Unable to parse expression in argument list; couldn't find final ')' (corresponding starter was at line 1)
at <tmp>:1
------> :.keys.grep(*.starts-with("\&").sort[^5]⏏<EOL>
[Coke] dd CORE::.keys.grep(*.contains("&c")) 13:22
evalable6 ("\&cross", "\&chop", "\&circumfix:<\{ }>", "\&…
[Coke], Full output: gist.github.com/821a380a4ab322cbda...b8a44fa659
[Coke] the &'s will be all the top level subs.
but you'd need to look at the grammar to get syntax like "for" 13:24
13:26 derpydoo left
[Coke] The grammar is complicated enough you're probably better off keeping the keyword list separate. 13:26
jjatria lizmat: stackoverflow.com/questions/75889032 13:41
13:41 jgaz joined 13:46 an3223 joined
霧嶋 董香 @coke thank you! 13:59
14:27 vrurg left 14:38 m_athias left, nine left 14:40 vrurg joined 14:43 camelia left 14:48 Sgeo joined 14:49 camelia joined 15:08 camelia left 15:14 camelia joined 15:15 m_athias joined 15:18 nine joined
tonyo vrurg: taking a look at your question on the `rev` thing today. did the globber work better? the review command is a little difficult without an AST available to fez (it's just a dumb grepper) 15:18
vrurg tonyo: the globber seems to be ok, except for the attempt to read from an excluded file. 15:20
tellable6 2023-03-28T08:35:50Z #raku <Xliff> vrurg Ah! Thanks!
tonyo okay cool
vrurg As to the "dumb grepper", but module names are in the source. The dumbest one would've found them.
tonyo the dumbest one would also add anything with two colons to something else 15:21
vrurg :D
Anyway, you have the repo and can test against it. And I consider the new features as a great move into the right direction. Though my tooling is already based around own-brewed makefile-based subsystem, where fez serves as an uploader only. 15:23
15:25 jpn left
tonyo no worries, testing is much appreciated - working on making fez see your repo a little more sanely 15:25
also, i'm moving the 'production' key out of the META6.json and into a `.fez` file 15:26
vrurg The way I assumed the key to be? 15:27
tonyo i have it here: pastebin.com/6VJTzg96 which looks sane to me 15:28
also in that .fez file you can disable warnings about those types by adding `ignore-provides: ["HelperMethod", ...]`
i'll put up a PR so you have an example and then i'll fix the globber in that repo 15:30
vrurg I saw the ignore feature. Might be a bit too much in some cases, but I hope things change for better with RakuAST. One thing could be done already though. If you see a module declaration then you could try import it and iterate available symbols. Barely useful with 'my', but otherwise might work. 15:31
15:32 jpn joined
tonyo i thought about that but it was failing badly for modules that reach out to some service when `use`d 15:33
vrurg And possible internal integrity issues if the modules messes up with things in an surprising way. But that could be resolved by spawning a child process. And ignoring outcomes if it fails. Then it could just fallback to the current behavior. 15:34
I need to go. Will be away for a while. 15:35
Like it where fez goes anyway.
tonyo thanks vrurg ! 15:36
15:53 abraxxa left 16:01 jpn left 16:06 jgaz left 16:30 dakkar left
tonyo fez v49 adds the test depends pelevesque, should fix #90 and make #92 more palatable vrurg 16:33
16:34 jgaz joined 16:57 gcd joined 17:16 gcd left 17:23 derpydoo joined
tonyo m: use Raku::Grammar 17:25
camelia ===SORRY!=== Error while compiling <tmp>
Could not find Raku::Grammar in:
lizmat m: use Raku::Grammar:from<nqp> 17:27
camelia ===SORRY!=== Error while compiling <tmp>
Could not find Raku::Grammar:from<nqp> in:
lizmat m: use Raku::Grammar:from<NQP>
camelia ( no output )
lizmat tonyo ^^
still WIP though 17:28
tonyo danke 17:30
trying to prepare for some stuff i'd like to add to fez or individual tooling eventually
hmm, is there a method to just get the AST from a string? 17:40
looking at that class in nqp it looks like it's evaluating compunits
pelevesque @tonya - 17:59
18:00 reportable6 left 18:03 reportable6 joined
lizmat m: say Q|say "tonyo"|.AST 18:07
camelia RakuAST::StatementList.new(
expression => RakuAST::Call::Name.new(
name => RakuAST::Name.from-identifier("say"),
args => RakuAST::ArgList.new(
tonyo whoa
18:08 Oshawott joined
lizmat what you hoped for and more? :-) 18:08
tonyo yea very sweet and easy
18:11 archenoth left 18:42 donpdonp- joined
tonyo m: use experimental :rakuast; sub X {}; "sub X {}".AST; 18:44
camelia Use of Nil in string context
in block <unit> at <tmp> line 1
===SORRY!=== Error while compiling
Missing block
------> sub X ⏏<EOL>
tonyo m: use experimental :rakuast; sub ABCX {}; "sub ABCX {}".AST;
camelia Use of Nil in string context
in block <unit> at <tmp> line 1
===SORRY!=== Error while compiling
Missing block
------> sub ABCX ⏏<EOL>
18:54 teatwo joined 18:58 tea3po left
[Coke] tonyo: you want single quote. 19:05
tonyo m: use experimental :rakuast; sub ABCX {}; 'sub ABCX {}'.AST;
camelia ( no output )
[Coke] m: dd 'sub X {}'.AST
camelia sub X { }
tonyo is the ast meant to also act as a linter? 19:06
[Coke] otherwise you're interpolating a nil with that {}, I think.
tonyo yea you're right, brain dead today
[Coke] in that you get standard output, not original source input
tonyo yea
[Coke] but I think it's more "porcelain" than "linted", if that matters.
tonyo ah, so not planned to also be a linter 19:07
[Coke] interesting, at some point sub output empty parens, but that's no longer showing up here.
19:19 an3223 left 19:24 user___ joined
tonyo this makes writing a linter much easier than six years ago 19:52
20:03 ProperNoun joined
Nemokosch that was part of the reason I suppose 20:17
20:22 nort joined
guifa needs to publish an update to Pretty::RAST 20:52
ultimately it could be used as a formatter and possibly a linter at some point
lizmat m: say Q|sub foo ($a) { $a + $a }|.AST.DEPARSE 21:00
camelia sub foo (Any $a) { $a + $a }
lizmat tonyo: deparsing lints to an extent already 21:01
21:16 derpydoo left 21:38 squashable6 left 21:39 sena_kun left 21:41 squashable6 joined 21:52 jgaz left 22:02 eseyman left
Nemokosch github.com/Raku/atom-language-perl6/pull/101 22:02
with this PR, I hereby announce my intentions to take control over the highlighter repository 🤠 22:03
22:03 manu_ joined 22:04 manu_ is now known as eseyman
tonyo m: say Q|say 1;|.AST.DEPARSE 22:15
camelia say(1)
guifa is going to try to find a way to get it so we can say something like pretty-print $rast-node :type<html>, :options(:foo); 22:16
and then get a perfect HTML-ready output
rather than rely on a 98% accurate syntax highlighter
lizmat just for the record: the class doing the deparsing, is RakuAST::Deparse 22:17
it can be subclassed, or you can write your own 22:18
and you can specify the class for deparsing as an argument to .DEPARSE
m: use v6.*; say Q|say 1;|.AST.DEPARSE(RakuAST::Deparse)
camelia say(1)
Nemokosch an HTML generator is very welcome. This is not an either-or thing. There are editors using this highlighter, and in fact, Github itself uses it for highlighting Raku code. You aren't gonna replace that. 22:20
22:26 knarkhov left
tonyo HTML generator is available as Ryml 22:28
Nemokosch like please, not this "I don't care because I will manage without/I know better" sort of mentality again 22:30
lizmat Nemokosch you have my blessing re atom-language 22:32
also, I've just renamed the repo.... :-)
afk& 22:33
Nemokosch I'd say eventually it cannot (or at least shouldn't) stay "atom" either; if there is any editor to be named, it would be TextMate since the files are using the TextMate format 22:44
guifa Nemokosch: yeah, the advantage of a highlighter like the Atom one is it generally will work fairly well on something that's syntantically invalid 22:46
tellable6 guifa, I'll pass your message to Nemokosch
guifa e.g. highlighting correctly up to somewhere around abouts the error
an HTML (or other outputter) from RAST will barf on a syntax error 22:47
(but nicely could potentially handle embedded languaages a bit better heh)
Nemokosch I don't think there is a dichotomy here, it's fairly simple. You don't always get the freedom to generate custom HTML. I wonder how much you get that freedom from an average TextMate-compatible editor, and you definitely don't get that freedom from something essentially like a markdown highlighter in a much broader system. 22:51
So while it's also true that I don't think we have anything better quality-wise, either way, there needs to be something that can just work with the existing "rigid" tools, even if it only covers 98% of cases.
guifa yeah 22:56
we're in agreement :-)
like you said, it's not an either or -- good reason for both
in reality, I'm making the pretty-print to just give me colorization when printing out in-progress RAST code 22:57
but there's not too much difference between inserting an ANSI code and an HTML <span> of course
Nemokosch the difference is in the (often declarative) interface these tools provide 22:58
they might as well be dumb HTML generators under the hood if they don't let you make it smarter 22:59
Anyways... In general, right now the question isn't if we can get that 98% up to a hundred, much more like, if we can get visible presence at all. There is still no highlighting for Discord and I had to accept that either one of us gets a highlighter into highlight.js or the time just won't magically come, ever. There are dozens of supported languages, including ones that I've never heard of and/or seem like a kind 23:00
of joke.
Languages that I'm absolutely sure are less known and used than Raku - however, the difference is made by the people who create the tooling.
And this is when I feel "nostalgic" about Minecraft in around 2012, which had 5 English dialects, "Pirate language" and perhaps even cat language - but no Hungarian, for quite a lot of time 23:01
tonyo are you a hungarian native speaker nemo? 23:04
Nemokosch Yes 23:07
23:26 evalable6 left, linkable6 left 23:27 linkable6 joined 23:29 evalable6 joined