home.social

#tmtowtdi — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #tmtowtdi, aggregated by home.social.

fetched live
  1. The MTA site I found lists bus routes at each stop using commas with alpha first.
    like: "OR, 40, 59, 63".
    In other words, way the physical signs are ordered.
    In #OSM, routes have been joined with semi-colons, and alpha last (ASCII sort).
    To compare each stop record in OSM against the bus company, I reached for the camel book.
    #TMTOWTDI

    $ cat bus1.t
    OR, 40, 59, 63
    40, 59, 63
    40

    $ cat bus1.t | perl bus_route.pl
    OR, 40, 59, 63
    40;59;63;OR
    40, 59, 63
    40;59;63
    40
    40

    Next, SQL materialized view?

  2. @nixCraft

    #Perl: the programming language that allows you to create elegant and readable code, OR syntactical eldritch horrors.

    Your choice, really. #TMTOWTDI

  3. Just for the record my favourite language is still Perl ❤️. 😆

    #TMTOWTDI #Perl

  4. @ology my script indeed involved a split.

    I know Python is a more ‘serious’ language but jaysus I can’t be having with the pip dependency lunacy and sometimes you just want to knock something out that just works even if you never considered whether a tab is 2 or 4 spaces or whether that string might really be an array of bytes or a collection of chars. 🤷

    So all the love for #tmtowtdi !

  5. Woo - Greatly simplified my code with a single `split` rather than two unwieldy, redundant regular expressions. :D

  6. @textbook

    So weit muss man nicht gehen. Sagen wir es wie die alten Perl-Programmierer.innen: „There is more than one way to do it.“ #TMTOWTDI #TIMTOWTDI /c