Thanks Bills and everyone else who replied. I now plan to update my Perl on Windows. Which is recommended: ActiveState or Strawberry Perl?
P.S. See also a few replies below, marked ST: Steven Tolkin From: Bill Ricker <[email protected]> Sent: Friday, February 28, 2025 9:22 PM To: [email protected] Cc: Boston Perl Mongers <[email protected]> Subject: Re: [Boston.pm] Drawing diagrams with circular arcs Hi Steve! I am working on a pet project where I want to draw diagrams consisting of connected circular arcs. I presume you mean sector-of-circle arcs, quite possibly semi-circle arcs, as opposed to full circles? Are you opposed to ellipses, splines, and railroad "spiral" that is doubly differentiable where it butt-joints to a straight? ST: Yes, for now an arc is part of or a whole circle. Maybe other curves later. I think it could be done in Visio, but I no longer have that. Possibly my favorite MS Office component. The standard answer to "like Visio but FLOSS" is LibreOffice Draw. Other alternatives see https://alternativeto.net/software/microsoft-visio/ My preferred programming language is Perl. But I have not actively used it for many years. Tsk. Get back at it :-D My current PC runs Windows 10, but I could also use Windows 11 for development. Well I'd say it's half-past time you set up for a Linux dual-boot. Windows 11 looks to be a little too strange. This is perl 5, version 28, subversion 2 (v5.28.2) built for Since we're up to Perl 5.040 with 5.041 in final development, yeah you might just want to update Perl. Good news IIRC is they've resumed prebuilt binaries. I think the GD library could do this, and there are some Perl APIs to it. Yes, GD <https://metacpan.org/pod/GD#Drawing-Commands> and GD::Simple on CPAN can draw circular and elliptical arcs (and if filled, sectors). (I used the filled elliptical arc sectors in GD.pm to recreate and then refine my ca.1990 MSC EGA color solid (Wang Labs tower 1).) But the library itself seems old and maybe difficult to install on Windows. GD libraries haven't been a problem for me on Linux at least. I reload GD.pm etc annually when I perlbrew the new release of Perl and reload my libs. I haven't built GD.pm on Windows in so long I can't personally advise. CPANTS <http://matrix.cpantesters.org/?dist=GD%202.83;maxver=1> shows 1 success each on MSWIN32 with Perl 5.40.[01], 5.38.2, 5.36.3, 5.32.1 and GD 2.83. It failed once with dev Perl builds 5.41.[567], but that's not alarming; they've reverted a couple less-backwards-compatible-than-expected changes in dev. (I notice that GD has had an ongoing problem with OpenBSD and Solaris, WTAF?) What do people suggest? For many graph-diagrams, the sensible approach is for a Perl program to emit a textual form of the graph, e.g. GraphViz dot language files, which get turned into SVG and/or PNG by GraphViz commandline tool (usually called 'dot' after the default "Engine"*). https://metacpan.org/pod/GraphViz2 https://graphviz.org/docs/layouts/dot/ *(Hint: in GV, different built-in layout rules are called "Engines".) ST: GraphViz is what I’ll try. I have used Dotty in the past. Setting the default edge type in a GraphViz graph to splines=curved will give not circular but spline curves. Example. (online GV dot editor/tutorial/example !! neat!) AFAIK, GraphViz doesn't have semicircles as an option? But it does like drawing full 360° circles. For now I just want to draw the diagrams. But later I might also want to count the number of edges, vertices, and faces. That is why I am considering using a program. A good reason for using a declarative text format of the diagram as an intermediary, such as GraphViz's dot language. One last point. This could be a good first test (for me) of AI code assist tools. But I think they usually generate Python or Javascript, and I have not used either of those languages. Are there AI tools that generate Perl? a) I find that thought unclean. b) the common LLM hallucinatory-oracles apparently create fairly good Perl since we've put so much of it online for them to violate copyrights of. (As in, if it gives you code I wrote as "Same License as Perl" and doesn't tell you that, it's theft.) Ovid (Curtis) has been blogging about using them. He's a good enough coder he can fix whatever errors the LLM hallucinates, so it may save him time and not create more technical debt due to hidden bugs but ... // Bill _______________________________________________ Boston-pm mailing list [email protected] https://mail.pm.org/mailman/listinfo/boston-pm

