00:03 ky1 left, ky1 joined 00:08 Sgeo_ joined, Sgeo left 00:13 ky1 left, ky1 joined 00:22 ky1 left 00:23 ky1 joined 00:33 ky1 left, ky1 joined 00:41 _________ left 00:43 ky1 left, ky1 joined, _________ joined 00:44 Voldenet left, Voldenet joined 00:53 ky1 left, ky1 joined 01:02 ky1 left 01:03 ky1 joined 01:06 rantanplan joined, snonux left 01:07 patrickb left, patrickb joined 01:12 ky1 left 01:13 ky1 joined 01:23 ky1 left, ky1 joined 01:33 ky1 left, ky1 joined 01:42 ky1 left 01:43 ky1 joined 01:52 _________ left, Voldenet left 01:53 ky1 left, ky1 joined 01:54 _________ joined 01:55 Voldenet joined 02:03 ky1 left, ky1 joined 02:12 ky1 left 02:13 ky1 joined 02:23 ky3 joined 02:25 ky1 left, dutchie_ left, dutchie_ joined 02:26 _________ left, _________ joined 02:33 ky3 left, ky3 joined 02:42 ky3 left 02:43 ky3 joined 02:53 ky3 left, Xliff joined, ky3 joined
Xliff \o 02:58
tellable6 2024-10-29T21:22:52Z #raku <SmokeMachine> Xliff I think this a simple, yet cool example: usercontent.irccloud-cdn.com/file/.../image.png
2024-10-29T21:48:25Z #raku <ab5tract> Xliff: or this new and improved version of FIRST which works in any block (not just routines) and which returns the value of the expression (which < v6.e FIRST does not)
2024-10-29T21:48:31Z #raku <ab5tract> Xliff: github.com/rakudo/rakudo/blob/76f6...kumod#L696
hey Xliff, you have a message: gist.github.com/cece21637905e3bd76...85e9f24061
03:00 hulk joined 03:01 kylese left 03:02 ky3 left 03:03 ky3 joined 03:12 ky3 left 03:13 ky3 joined 03:15 hulk left, kylese joined 03:23 ky3 left, ky3 joined 03:32 ky3 left 03:33 ky3 joined 03:52 ky3 left 03:53 ky3 joined 04:02 ky3 left 04:03 ky3 joined 04:23 ky3 left, ky3 joined 04:33 ky3 left, ky3 joined 04:43 ky3 left, ky3 joined 04:53 ky3 left, ky3 joined 04:56 guifa left 05:12 ky3 left 05:13 ky3 joined 05:22 ky3 left 05:23 ky3 joined 05:30 Sgeo_ left 05:33 ky3 left, ky3 joined 05:42 ky3 left 05:43 ky3 joined 05:53 ky3 left, ky3 joined 06:02 ky3 left 06:03 ky3 joined 06:12 Aedil joined 06:13 ky3 left, ky3 joined 06:22 ky3 left 06:23 ky3 joined 06:32 ky3 left 06:33 ky3 joined 06:43 ky3 left, ky3 joined 06:53 ky3 left, ky3 joined 07:03 ky3 left, ky3 joined 07:13 ky3 left, ky3 joined 07:14 Xliff left, Xliff joined 07:22 ky3 left 07:23 ky3 joined 07:33 ky3 left, ky3 joined 07:42 ky3 left 07:43 ky3 joined 08:02 ky3 left 08:03 ky3 joined 08:13 ky3 left, ky3 joined 08:22 ky3 left 08:23 ky3 joined 08:32 tejr left, ky3 left 08:33 ky3 joined 08:43 ky3 left, ky3 joined 08:46 tejr joined 08:53 ky3 left, ky3 joined 09:02 ky3 left 09:03 ky3 joined
SmokeMachine Hi! This is how I plan to make Red use RakuAST instead of its current way of knowing what is happening inside of map blocks to convert it to Red::AST to be able to prepare SQL queries. I'd like to know it anyone can spot any problem with that idea before I start implementing that... usercontent.irccloud-cdn.com/file/.../image.png 09:05
09:11 dakkar joined 09:13 ky3 left, ky3 joined
lizmat SmokeMachine: that's basically the intent: and you will find problems... but I don't see any yet 09:17
SmokeMachine Thanks. My next step then is make ASTQuery accent more than one id (#first#grep#map) (currently it’s only using the last defined one) and I’ll start implementing the Red side of that 09:20
09:23 ky3 left, ky3 joined 09:33 ky3 left, ky3 joined 09:43 ky3 left, ky3 joined 09:46 atweedie left 09:53 ky3 left, ky3 joined 09:55 sena_kun joined 09:58 patrickb left, rantanplan left, greenfork left 09:59 samebchase left, snonux joined 10:00 samebchase joined 10:03 ky3 left, ky3 joined 10:06 samebchase left, snonux left, snonux joined, samebchase joined 10:07 greenfork joined 10:13 ky3 left, patrickb joined, ky3 joined 10:20 atweedie joined 10:23 ky3 left, ky3 joined 10:33 ky3 left, ky3 joined 10:43 ky3 left, ky3 joined 10:52 ky3 left 10:53 ky3 joined 11:03 ky3 left, ky3 joined 11:12 ky3 left 11:13 ky3 joined
patrickb I'd like to debug a performance issue in a Grammar of mine (Rainbow). Is there any tooling or well known approaches to debug / introspect the performance behaviour of Grammars? 11:16
11:23 ky3 left, ky3 joined 11:32 ky3 left 11:33 ky3 joined 11:37 guifa joined 11:43 ky3 left, ky3 joined 11:45 snonux left, patrickb left 11:46 greenfork left 11:47 samebchase left, atweedie left 11:51 snonux joined 11:52 samebchase joined 11:53 ky3 left, ky3 joined 11:54 atweedie joined, patrickb joined, greenfork joined 11:55 hudo left 11:56 hudo joined 12:03 ky3 left, ky3 joined 12:13 ky3 left, ky3 joined 12:22 ky3 left 12:23 ky3 joined 12:33 ky3 left 12:34 ky3 joined 12:42 ky3 left 12:43 ky3 joined 12:53 ky3 left, ky3 joined 12:54 guifa left
antononcube @patrickb CommaIDE has Grammar tools. I plan to try them out in the new plugin, but forgot about it... 12:58
@patrickb I.e. are you using IntelliJ ? If yes, look into the grammar tools provided by the comma-2 plugin. 12:59
13:03 ky3 left, ky3 joined 13:13 ky3 left, ky3 joined
SmokeMachine Any plan on making it able to other editors to use comma tools? 13:18
13:19 xinming left 13:20 xinming joined 13:21 bisectable6 left 13:22 nativecallable6 left 13:25 ky3 left, committable6 left, ky3 joined, hudo__ joined, evalable6 left
ab5tract Not really, no 13:25
They are all tightly integrated with IntelliJ APIs
SmokeMachine :(
ab5tract There’s at least one VIM mode plugin for InteliJ though
13:25 RakuIRCLogger left 13:28 tadzik left 13:29 nativecallable6 left 13:31 perlbot left 13:32 BooK left, simcop2387 left, committable6 left, ky3 joined, hudo__ joined, evalable6 left
ab5tract Not really, no 13:32
They are all tightly integrated with IntelliJ APIs
SmokeMachine :(
ab5tract There’s at least one VIM mode plugin for InteliJ though
13:32 RakuIRCLogger left, shareable6 left, summerisle_ joined
SmokeMachine Yes… I have used that for some time while playing with comma… 13:32
13:32 sourceable6 left
ab5tract Once nvim delivers on its promise to be usable as a library, I think wrapping Raku around it could be promising 13:32
13:32 greppable6 left
SmokeMachine But that would be great if there was a way to exporte those tools 13:32
ab5tract And/or embedding it as an IntelliJ plugin
13:32 greppable6 joined
ab5tract SmokeMachine: unfortunately it just doesn’t work like that for the most part 13:32
13:32 Geth left 13:33 committable6__ left
SmokeMachine Couldn’t that become an lsp, a dap plugin, or something like that? 13:33
13:33 tib left, perlbot_ joined
ab5tract It’s all there on the git repo if you want to take a stab at it 13:33
13:33 sorenson_ joined, simcop2387_ joined, linkable6 left, bloatable6 left
ab5tract If you mean can the parser in Comma be used for LSP, again the answer is unfortunately no 13:33
13:33 benchable6 left, tejr_ joined, ecocode left, bloatable6 joined 13:34 shareable6 joined, BooK1 joined
ab5tract It’s tied directly into the classes that IntelliJ expects 13:34
13:34 kst`` joined, quotable6 left, quotable6 joined, linkable6 joined, nativecallable6 joined
ab5tract Also it’s generated and entirely impenetrable to mortals 13:34
13:34 unicodable6 left, benchable6 joined, sourceable6 joined, greppable6 left
SmokeMachine Here? github.com/Raku/intellij-ide-plugin 13:34
13:34 releasable6 left, tadzik2 joined, unicodable6 joined 13:35 dg left, synthmeat left, greppable6 joined
ab5tract Here: github.com/ab5tract/comma-plugin 13:35
13:35 releasable6 joined, hvxgr joined, sorenson left, tejr left, hvxgr_ left, kst left, tejr_ is now known as tejr, sorenson_ is now known as sorenson
ab5tract Though I haven’t touched the grammar thingy much at all, so the difference is slight 13:35
13:35 elcaro left, nativecallable6 is now known as 074AAVSGD, simcop2387_ is now known as simcop2387
ab5tract Many many other things have been updated and improved, however 13:35
13:35 ky3 left, BooK1 is now known as BooK, evalable6 joined, perlbot_ is now known as perlbot, ky3 joined, Geth joined
ab5tract Also that repo uses the old PITA build system 13:35
13:35 elcaro joined, synthmeat joined 13:37 dg joined, ecocode joined
antononcube @ab5tract "Grammar thingy" == the standard grammar tools of the comma-2.0, right? 13:38
13:38 DarthGandalf left, coleman left, coleman joined, committable6 joined 13:46 ky3 left, ky3 joined 13:52 ky3 left 13:53 ky3 joined 14:03 DarthGandalf joined, ky3 left
ab5tract Well there is a preview panel but I seem to recall there being a debugger as well 14:03
14:03 ky3 joined
ab5tract I should make sure I’ve brought in everything from Comma “pro” 14:04
14:11 lizmat_ joined 14:16 lizmat left
ab5tract For patrickb’s purposes, Log::Timeline support may be useful too 14:17
patrickb I just noticed Grammar::Profiler::Simple. That's probably the least effort way forward... 14:18
14:18 lizmat_ left 14:19 lizmat joined 14:23 ky3 left, ky3 joined 14:25 japhb left 14:28 japhb joined 14:32 ky3 left
ab5tract Yeah that sounds perfect 14:33
14:33 ky3 joined 14:40 tib joined 14:43 ky3 left, ky3 joined 15:02 ky3 left 15:03 ky3 joined 15:12 ky3 left 15:13 ky3 joined 15:23 ky3 left, ky3 joined 15:33 ky3 left, ky3 joined 15:43 ky3 left, ky3 joined
lizmat weekly: dev.to/lizmat/an-end-to-magical-madness-5d52 15:46
notable6 lizmat, Noted! (weekly)
15:53 ky3 left, ky3 joined 16:03 ky3 left, ky3 joined 16:12 ky3 left 16:13 ky3 joined 16:33 ky3 left, ky3 joined 16:43 ky3 left, ky3 joined 16:53 ky3 left, ky3 joined 17:02 ky3 left 17:03 ky3 joined 17:13 ky3 left, ky3 joined 17:32 ky3 left 17:33 ky3 joined 17:41 dakkar left 17:43 ky3 left, ky3 joined 17:53 ky3 left, ky3 joined 18:00 Aedil left 18:03 ky3 left, ky3 joined 18:13 ky3 left, ky3 joined 18:32 ky3 left 18:33 ky3 joined 18:43 ky3 left, ky3 joined
timo it occurs to me that the "toggle" method/function is a relatively constrained form of a relatively general state machine. i wonder if that lens helps figure out what we want to do with it 18:51
18:52 ky3 left 18:53 ky3 joined 19:03 ky3 left, ky3 joined
timo as in, there's a series of states, every state has a transition to itself, and a transition to the next state. the check at that point in the argument list is what allows a transition to the next state. each even/odd state either outputs the item it took from the input or outputs nothing, depending on whether you provide :off for the starting point or not 19:07
it's not technically an FSA since the "alphabet" of possible inputs is rather vast, and you wouldn't be able to enumerate all the objects for which "* > 5" is true 19:08
19:09 stanrifkin joined
timo i say "rather vast" instead of "limitless" because your system has a limited amount of memory available, even if you add more machines to that system via network or whatever, that just makes the space larger, not infinite :D 19:09
19:12 orangebot joined 19:28 Xliff left 19:32 ky3 left 19:33 ky3 joined
librasteve timo: so far I have been able to think of two use cases for toggle ... one where it is used to weed out extreme inputs (eg cap and collar) and one where it is used to pick out the contents of a "packet" based on a specific delimiter (see the discussion issue for examples) - honestly neither of these are very compelling and the notion that the test chain is stepped according to the input data is quite bemusing to 19:38
understand what is going on
and honestly, it I really wrote a state machine I would maybe unpack it to a level that my states / edges were enums 19:39
19:42 ky3 left 19:43 ky3 joined
timo a nice little DSL to build states would probably be cool. i can't think of a good use case for toggle that wouldn't be be easier to write as ff inside of a loop, i think 19:45
btw has anybody tried putting ff into one of the arguments of toggle? :D
(probably does nothing unless you use the same block multiple times, since it never evaluates the same one again after it has returned True once 19:46
but you know, unexpected combinations of features often lead to Fun)
19:53 ky3 left, ky3 joined 20:13 ky3 left, ky3 joined
antononcube Finite State Automata (FSA) can be nicely described using graphs. 20:16
I was thinking to make a demo of FSA graphs -- I did not plan to use OOP perspective. (E.g. "toggle method.") 20:18
Also, currently "JavaScripdt::D3" does not visualize graphs with loops and more than one edge between vertexes. (Needed for FSA graphs.) 20:20
20:23 ky3 left, ky3 joined
timo ah, that's unfortunate. well, graphviz it is then ;) 20:27
graphviz offers different output formats, among which is svg. should work fine to show that inside a notebook cell i imagine 20:30
antononcube Yeah, the "Graph" package exports to different formats, dot/neato/graphviz included. 20:31
I think have Mathematica and Mermaid-JS the most, except the "Raku format." 20:32
20:32 ky3 left 20:33 ky3 joined
That said, I think there is a JavaScript package that can visualize dot graph specs. I kind of forgot about that... 20:36
timo worst case, just cross-compile the programs to webassembly :D
but yeah i think i saw a graphviz.js or something in the past 20:37
having it be translated rather than manually rewritten would be good in terms of feature coverage and bug-per-bug compatibility, though
antononcube I sort of know how to render in Jupyter JavaScript code obtained from D3.js and Google Charts. Anything else for me is hard to figure out. 20:41
timo OK, don't take my random musings as requests or commands or anything! 20:42
20:42 ky3 left 20:43 ky3 joined
antononcube Well, it is fine -- I just realized now that the most recent version of the VS Code Jupyter plugin can render "seamlessly" Mermaid. Hence, the "Graph" package can be used for FSA (in VS Code.) 20:45
timo oh cool 20:49
i've found myself wishing i could use graphviz's "x11" output to build something that the user can use to interact with my script, but there's nothing like that in there ... maybe jupyter + mermaid is an interesting avenue to explore here for me 20:50
there's a nice little "jquery plugin" that can take the output of graphviz's "svg" and turn it into an html page where you can highlight paths, pan by dragging, and of course with custom javascript you can do more stuff 20:51
i used that to make graphs from moarvm's NFA engine explorable. they can be rather immense
20:53 ky3 left, ky3 joined 20:56 orangebot left 21:01 dpk left, dpk joined 21:13 ky3 left, ky3 joined 21:23 ky3 left, ky3 joined 21:33 ky3 left, ky3 joined
antononcube @timo Confirmed -- "Graph" objects can be "natively" rendered in Jupyter notebooks: 21:38
cdn.discordapp.com/attachments/633...50b9f&
librasteve @antononcube sorry to bug you - please can you point me to the recipe to install Jupyter Raku kernel with IntelliJ? 21:42
21:43 ky3 left, ky3 joined
antononcube IntelliJ can access use Raku kernels installed by “Jupyter::Kernel” or “Jupyter::Chatbook”. 21:50
The latter has very detailed installation instructions.
21:52 acidsys left, acidsys joined 21:53 ky3 left, ky3 joined 22:03 ky3 left, ky3 joined
timo what does the :f argument do? first i thought maybe force-based layouting but the one at the bottom looks like a fixed layout rather than simulation of forces 22:06
22:13 ky3 left, ky3 joined
timo i can just look it up, sorry 22:13
huh, i don't see it, at least not in the main branch of the module up on github? 22:21
22:23 ky3 left, ky3 joined 22:27 Sgeo joined 22:32 ky3 left 22:33 ky3 joined 22:42 ky3 left 22:43 ky3 joined
antononcube :f is short of :code-fences or :code-block. 22:45
@timo Should be showing in main GitHub branch of "Graph". 22:48
timo ah! there it is :) 22:49
antononcube If the Raku code cell has the magic spec "#% markdown" then cell's evaluation result is treated as Markdown code. Hence, after generating the Mermaid-JS representation of a graph it the code wrappers ```mermaid and ``` have to be used. 22:52
22:52 ky3 left 22:53 ky3 joined
timo right, that makes sense 22:54
antononcube I am not sure how well Mermaid deals with multiple edges and loops (of graphs.) 22:56
Also, some (most?) graphs are hard to recognize because layered layouts Mermaid-JS uses. 22:57
timo ah, damn 22:58
i guess mermaid has a little bit of a focus on like, flowchart-like graphs, and stuff you would hand-author
not some graph you created from some dataset and you want to get an idea what it looks like
antononcube Right. 22:59
timo "render all graphs well" is an impossible ask. i can't fault them if they decide that's not the focus for their tool
antononcube I treat it as "just a crutch" when it comes to graphs. Otherwise it is very cool to have.
LLMs easily translte from- and to Mermaid-JS. 23:00
timo i'm really kind-of missing some very flexible tool that you can use for interactively exploring unwieldy graph-y data 23:01
there are a few, i'm not sure what my problems were when i tried a few
antononcube Mathematica.
timo i'm thinking less of doing queries against the data, and more getting the rendering into the shape i want, or to "walk" from node to node 23:02
or does mathematica also give me interactive widgets where i can drag stuff around, select nodes or edges and maybe hide them, maybe do a path search?
antononcube Yeah, Mathematica aka Wolfram Language (WL) does allow that.
timo i haven't used mathematica in a long long time
only by writing code, though? 23:03
antononcube BRB...
23:03 ky3 left, ky3 joined
timo i'm not sure i could afford mathematica to try it out 23:05
antononcube Yes, WL is mostly for coding manipulation, but it does have graphics/plot interactive features.
Let me try the graph interactivity.
BTW, D3.js can work too for that, but that is requires JavaScript knowledge. 23:06
timo right. i have a mild splattering of that
antononcube I am not sure about Vega and Vega-lite systems -- I have seen a lot interactive tools with them, but have not used them.
timo oh, have you ever looked at the moarvm heap snapshot profiler? it also gives you a graph of all objects and how they relate to each other. if you're ever looking for more graph data sets that are closely related to raku in some way 23:07
SmokeMachine it seems RakuAST does not support Red yet... :( usercontent.irccloud-cdn.com/file/.../image.png 23:08
timo oh i didn't know about vega before, or maybe i did and forgot about it. gonna give it a look
SmokeMachine: too much meta-object-protocol shenanigans, i wonder? 23:09
does --ll-exception give you a stack trace at least?
SmokeMachine I suppose... I think my rakuast -> Red::AST translation will need to wait a bit more... :(
timo well, toss the stacktrace here and maybe wishes really can come true? 23:10
antononcube Here is WL / Mathematica interactivity demo:
cdn.discordapp.com/attachments/633...2c0b9&
timo ah interesting, so it's kind of a little handy toolbox of related functions (methods?) that it can apply for you with just a click 23:11
SmokeMachine www.irccloud.com/pastebin/I72NvW3Q/
antononcube Also, in principle, with LLMs code manipulation of graphs should be pleasant enough. (Doubt it for large graphs though.)
@timo Correct. I usually disable that, but it is good to see what it offers time-to-time. 23:12
timo fair enough
SmokeMachine timo: sorry, your name went to the snippet... ☝️
timo that feels like an interesting bridge between the "discoverability" that GUIs can offer, and the power and flexibility of DSLs like CLIs and what-not 23:13
SmokeMachine src/Raku/ast/package.rakumod:22 it seems...
timo that's possibly just an accessor
BRB feeding the cat
23:13 ky3 left 23:14 ky3 joined
SmokeMachine yes, it seems to be... 23:14
antononcube Now, if you convert the graph into a plot (with GraphPlot) you can manipulate its graphics objects. (Vertices, edges, etc.) 23:15
cdn.discordapp.com/attachments/633...7dfcd&
Check this Graph visulization "guide page": reference.wolfram.com/language/gui...ation.html 23:17
@timo Is this question close to what you are looking for? math.stackexchange.com/q/13841/301115 23:19
23:22 ky3 left 23:23 ky3 joined 23:24 sena_kun left
timo hm, no i don't think that's what i wanted 23:30
23:33 ky3 left
timo that question is more about like, authoring tools? for when you have an idea what you want your graph to look like before you start making it 23:33
23:33 ky3 joined
timo i'm thinking more along the lines of "i have nodes/edges data and i would like to figure out what the graph has to tell me" 23:33
antononcube Ok, I am back to WL-usage suggestions, then. 🙂 23:40
23:42 ky3 left 23:43 ky3 joined 23:44 Chanakan left, Chanakan5591 joined
timo i appreciate your input :) 23:46
did you see my comment about the heap snapshot profiler? 23:47
23:52 ky3 left 23:53 ky3 joined
antononcube Yeah — no I have not seen it… 23:54
timo if you're interested i can give you some example data in a format of your choosing 23:55
the heap snapshot analyzer currently mainly supports the operation to get a path to every object from the nearest root
i.e. nodes are GC-managed objects and edges are pointers from inside an object (or memory owned by it) to another gc-managed object 23:56
and finding the nearest root is useful to find why an object is kept around 23:57
moarperf also has a kind of graph explorer thingie that's kind-of half-baked
antononcube Hm… would JSON format work? How about CSV file, with columns <from to weight> ? 23:59