ab5tract license is totally unnecessary while trying things out 00:03
I paid for a license but I don\t think I'm actually using anytihng from it at the moment :) 00:04
tbrowder good to know, thank you! 00:21
ab5tract There's a small set of instructions in the readme here: github.com/ab5tract/comma-plugin 00:24
If you do try it out, let me know if you into any trouble by pinging me here or via an issue in GitHub 00:25
antononcube @tbrowder i use the “.raku” extension. 02:14
tbrowder ab5tract: will do 02:15
antononcube: thanks!
antononcube BTW, I use VSCodium not VSCode. VSCodium is a telemetry-free version of VSCode. See: vscodium.com 07:56
librasteve ab5tract: yes I have the Raku plugin and the Jupyter & Python plugins installed on IntelliJ Universal … fwiw I also have zen install Jupyter::Chatbook, I run jupyter-notebook on the command line and then I copy over the token into the Intellij Jupyter configured server dialog 08:36
antononcube Note, that all magic cells I mentioned above work fine in Jupyter with VSCode. discord.com/channels/5384078799804...8322919534 10:30
Also, with VSCode there is no need for separate start of “jupyter notebook” — the Jupyter kernels are automatically found and started when needed. 10:33
Xliff Hello! 10:49
lizmat Xliff o/
Xliff Can we serialize generic raku datatypes into XML. Kinda like JSON::Fast and to-json?
lizmat! \o
lizmat doesn't LibXML do that (to an extent) ? 10:50
Xliff I am aware of XML::Class, but that's for classes not simple values.
lizmat and raku.land/zef:raku-community-modules/XML ? 10:51
make-xml ? 10:52
Xliff Those are more parsing than serializing. 10:53
lizmat raku.land/zef:raku-community-modul...tstr-name- ?
Xliff No. make-xml is crafting which is not serialization. 10:54
lizmat other than that, I don't have any suggestions :-(
Xliff > "use XML; make-xml("boo").say" # <boo/> 10:55
OK. I can handcraft one, but I'd rather have something simple.
Xliff lizmat: What's a good blog place for raku? 11:07
lizmat I use dev.to nowadays 11:08
Xliff 'k
librasteve I still use wordpress.org (sorry) 11:13
Xliff No need to apologize, librasteve. See the travesty of my recently created dev.to post... 11:17
dev.to/xliff/serializing-basic-typ...o-xml-4bl2
I wonder if that code block can be fixed.
lizmat ``` sections work ? 11:18
also, tag it #rakulang please :-) 11:19
Xliff lizmat: That they do. I just tried it. 11:20
lizmat: Weekly? 11:22
lizmat weekly: dev.to/xliff/serializing-basic-typ...o-xml-4bl2 11:23
notable6 lizmat, Noted! (weekly)
Xliff \o/
librasteve what's the best way to declare enums when I want to use them in two modules - is there such as thing as enum TagType <Singular Regular> is export? 11:33
enum TagType is export <Singular Regular>; oh gotta do it the right way! 11:36
antononcube On blogs: I use WordPress, but it is too much work to transfer / publish notebooks into posts. GitHub's ".io" sites are much better for both Markdown and Jupyter notebooks. 13:38
timo Xliff, as the first step I would say escaping has to be sprinkled all across the code so you can't accidentally make bogus XML through string concatenation 14:57
ideally it'd be some kind of XML::Writer or whatever that creates the output instead of ad-hoc escaping of stuff 15:16
SrainUser How do I move multiple objects from an array of objects into RakuAST::StatementList.new(...)? 17:29
lizmat doesn't RakuAST::StatementList.new(@objects) do the right thing ? 17:37
SrainUser Thanks lizmat, I will try that. 17:40
Hey lizmat to create a programming language would it be smarter to evaluate a generated Raku AST, or generate raku source code and run it? 17:44
lizmat really depends how far you're straying from Raku 17:45
the RakuAST approach would give you much more flexibility, but at the expense of verbosity and being at the bleeding edge of development 17:46
the "generate Raku code" is more conservative, and possibly too limiting for your programming language ?
otoh, it *is* a battle-tested approach: many template systems and packages such as "cro" depend on it 17:47
SrainUser RakuAST is a battle tested approach? 17:49
lizmat no, the .EVAL approach :-) 17:51
SrainUser I figure evaluating rakuAST would be slower since it executes at compile time and then run the code. 17:52
lizmat parsing a grammar and then executing it, is not that much different though :-) 17:56
guifa also, it can be done at compile time too potentially
well I guess if it's for another language it wouldn't be able to go into BEGIN statement
unless it's for config files, etc 17:57
SrainUser It would have to parse the raku grammar and then the language grammar. What part of the Raku grammar does RakuAST not cover yet (like concurrency?). 18:00
lizmat afaik the Raku grammar covers all concurrency stuff, the unsupported parts are more in the nooks and crannies of Raku 18:06
SrainUser Timo was the one who suggested compiling to RakuAST, but I'm concerned it would be slow. Generating objects is less verbose than generating source code I think.
timo when you generate source code as text, it will then be parsed and during parsing the AST objects are created for you 18:07
so you can skip the text part if you go straight to the AST objects
and you don't have to deal with the more interesting parts of the syntax, like making sure strings are escaped properly, or that method, variable, or function names don't have silly special characters in them that break the syntax 18:08
you should be able to turn RakuAST into a precompiled file that can then be loaded 18:09
SrainUser I could create a file with just the AST objects and the .EVAL method? 18:13
lizmat timo: precomp is still a bit of a sore subject in RakuAST :-( 18:14
timo OK
i guess that's what it means to be "at the bleeding edge"
my assumption is that if you create the rakuast for the definition of a function or class, and you .EVAL that, then you can use the result. and if you do the creation at BEGIN time, for example using `constant &myfunction = blabla.EVAL` you should be able to have that precompiled like normal. but there could be something that makes that not work, and since i haven't tried it yet, i wouldn't know what 18:19
it would - or even could - be
guifa I would say compiling to RakuAST is not going to be slower. Consider defining a string 18:22
if you're trying to generate Raku source code, you need to figure the escapes for it (or let Raku do it, passing it through .raku) 18:23
so you go string --> escaped string --> concatenation of string --> parsing of string and creating of RakuAST objects --> generation of MoarVM code
or you could just go string --> RakuAST object --> ggeneration of MoarVM code 18:24
lizmat guifa: just ?
guifa lizmat: I mean, in the sense you're skipping three steps from the previous chain 18:25
lizmat ah, ok, *phew* :-) 18:26
guifa remember, I used RakuAST for the Intl::Format::DateTime haha, I did everything to eek out every bit of performance from that sucker
lizmat ah, nice! should have a look at that when I get around to doing RakuAST again 18:27
guifa some of that was precompiling random bits of RakuAST in BEGIN/constants, etc
I think now with the DEPARSE function I could probably clean up the code a teeny bit more, but at the moment I don't want to look at that code for a very long time :)
BUt like this one would help a lot, beacuse the helper functions could be written in true Raku and compiled ahead of time: github.com/alabamenhu/IntlFormatDa...lc.rakumod 18:29
lizmat :-) 18:30
SrainUser "RakuAST::StatementList.new(@objects)" returns with error: "No such method 'IMPL-BEGIN' for invocant of type 'List'". Specifying each element of the array: "RakuAST::StatementList.new(@objects[0], @objects[1])" works. Could I insert each object from the array into StatementList.new() with a loop or something else? 21:06
[Coke] RakuAST::StatementList.new(|@objects) # perhaps 21:08
librasteve_ www.irccloud.com/pastebin/BHfWUFWW 21:09
librasteve oops wrong channel 21:10
SrainUser Yes, that works
SrainUser What does |@ do? What is it called? 21:18
librasteve it flattens the elements of @a as a shorthand for @a.Slip
docs.raku.org/language/list#Slips 21:19
SrainUser Is there anything above RakuAST::StatementList in the rakuAST hierarchy? 23:54