[Cincinnati-pm] September virtual cinci.pm - Sept 13th

Michael Conrad mike at nrdvana.net
Wed Sep 13 23:20:34 PDT 2023


I had one more brainstorm I needed to share

    package CodeGen::Cpppp;
    use strict;
    use warnings;
    use Carp;

    # VERSION
    # ABSTRACT: The C Perl-Powered Pre-Processor

    =head1 SYNOPSIS

    <i>Well, it's one layer of abstraction higher, isn't it?  It's not
    C<cpp>.  You see, most
    blokes, you know, they will be templating with C<m4> or C<cpp>...
    Where can you go from there?
    Where?</i>

    <i>This one goes to C<perl>.</i>


       #! /usr/bin/env cpppp
       ## for (my $bits= 8; $bits <= 32; $bits <<= 1) {
       struct tree_node_$bits {
         uint${bits}_t left: ${{$bits-1}},
                       color: 1,
                       right: ${{$bits-1}};
       }
       ## }

    Output:

       struct tree_node_8 {
         uint8_t left: 7,
                 right: 7,
                 color: 1;
       }
       struct tree_node_16 {
         uint16_t left: 15,
                  right: 15,
                  color: 1;
       }
       struct tree_node_32 {
         uint32_t left: 31,
                  right: 31,
                  color: 1;
       }




On 9/13/23 15:06, Michael Conrad wrote:
> And I have cool stuff to show everyone!
>
> On 9/13/23 10:17, Jon Gentle wrote:
>> Good morning,
>>
>> Quick reminder about September's cinci.pm tonight. I hope to see you 
>> then.
>>
>> On Fri, Sep 8, 2023 at 10:47 PM Jon Gentle <atrodo at atrodo.org> wrote:
>>> Good Evening,
>>>
>>> Next Wednesday, September 13th, we will be gathering again for
>>> cinci.pm. This month, Mike has an idea about perl fields concept he's
>>> working on that we're going to talk about. Should be interesting to
>>> see from what I've seen, so I hope to see you then.
>>>
>>> Details:
>>> * What: perl fields
>>> * When: Wednesday, September 13th @ 7:00pm
>>> * Where: https://meet.google.com/rmj-qwkb-kez
>> _______________________________________________
>> Cincinnati-pm mailing list
>> Cincinnati-pm at pm.org
>> https://mail.pm.org/mailman/listinfo/cincinnati-pm
>
>
> _______________________________________________
> Cincinnati-pm mailing list
> Cincinnati-pm at pm.org
> https://mail.pm.org/mailman/listinfo/cincinnati-pm

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/cincinnati-pm/attachments/20230914/8b2dd0e4/attachment.html>


More information about the Cincinnati-pm mailing list