CRA and Open Source - Elizabeth Mattijsen
CRA and Open Source - Elizabeth Mattijsen
For those of you have been programming for more than a decade, what programming languages, ecosystems, technologies do you wish you had spent more time with?
For me, it would be: #C, #Perl, #OpenZFS, #TLA+, #ErlangOTP .
(I have spent some time with #commonlisp, #clojure, #java, #rakulang so these are not listed.)
Can someone point me to a Raku tutorial that shows how to properly parse XML? I'm spinning my wheels just trying to understand the docs. It's not something I normally have to do and it's just not clicking. I seem to be having an off day and that is not helping. Ugh.
For context I'm trying to parse TOSEC datasets. They contain XML files that describe ROM and disk images. I just want to be able query the XML like it's JSON really.
Any help? #programming #rakulang
I am alert on the new Rakudo Weekly Newsletter and immediately post about it! Steve Roe (librasteve) just published a new Rakudo Weekly Newsletter, and starts with work by @lizmat on SBOM because of the EU's Cyber Resiliance Act.
Developments: 1 New Problem Solving Issue, 1 set of core developments, 1 new module, 28 updated modules. A new section: 2 Raku code snippets.
Writings: a few blogs, a Weekly Challenge, 4 questions, 4 comments, 1 skeet.
Enjoy!
https://rakudoweekly.blog/2025/08/11/2025-32-cyber-resilience/
#RakuLang
2025.32 Cyber Resilience
@manwar I love myself some #RakuLang #OneLiners in a cold (really cold for Brasilian/Mineiro standards, 10°C or 50°F) Monday morning...
I would like to call attention for `.grep` adverbs (_in casu_, `:p` so I have the indexes for the final result) and for the `.?` operator, that lets me call the `.key` method only if the sorted key has at least one item...
Range sum:
```raku
@ints[$x .. $y].sum
```
Nearest Valid Point:
```raku
@points.grep({.[0] == $x or .[1] == $y}, :p).sort({abs($x - .value.[0])+abs($y - .value.[1])}).head.?key // -1
```
Tested:
```
@ints = (-2, 0, 3, -5, 2, -1) $x = 0 $y = 2 Range sum = 1
@ints = (1, -2, 3, -4, 5) $x = 1 $y = 3 Range sum = -3
@ints = (1, 0, 2, -1, 3) $x = 3 $y = 4 Range sum = 2
@ints = (-5, 4, -3, 2, -1, 0) $x = 0 $y = 3 Range sum = -2
@ints = (-1, 0, 2, -3, -2, 1) $x = 0 $y = 2 Range sum = 1
@points = ([1, 2], [3, 1], [2, 4], [2, 3]) $x = 3 $y = 4 Nearest Valid Point index = 2
@points = ([3, 4], [2, 3], [1, 5], [2, 5]) $x = 2 $y = 5 Nearest Valid Point index = 3
@points = ([2, 2], [3, 3], [4, 4]) $x = 1 $y = 1 Nearest Valid Point index = -1
@points = ([0, 1], [1, 0], [0, 2], [2, 0]) $x = 0 $y = 0 Nearest Valid Point index = 0
@points = ([5, 6], [6, 5], [5, 4], [4, 5]) $x = 5 $y = 5 Nearest Valid Point index = 0
```
Ow again! I am a nutcase, and told myself last week 'there is a new one'. Sorry for being tardy.
Last week, on the regular Monday, Steve Roe (librasteve) published a new Rakudo Weekly Newsletter, which starts with gorgeous turtle graphics made with Raku.
Developments: 1 New Problem Solving Issue, 2 core developments, 1 new modules, 27 updated modules.
Writings: several blogs, a Weekly Challenge, 3 questions, 6 comments, 3 skeets.
Enjoy reading!
https://rakudoweekly.blog/2025/08/04/2025-31-snappy-turtles/
HARC Stack: Forming - Steve Roe