Skip to content

Instantly share code, notes, and snippets.

View tbrowder's full-sized avatar

Tom Browder tbrowder

  • Retired from: USAF and ManTech International Corporation
  • Gulf Breeze, Florida 32561 USA
  • 13:03 (UTC -05:00)
View GitHub Profile
@tbrowder
tbrowder / raku-core-split.t
Last active July 12, 2025 23:07
raku-core-split-test
==================================
# raku code: split ':', "foo bar baz"; # no limit specified
core split with NO delimiter match
delimiter: ':'
input : 'foo bar baz'
output :
# Subtest
'foo bar baz'
1..0
ok 20 -
@tbrowder
tbrowder / test.raku
Last active June 29, 2025 20:17
multi MAIN examples
# Contrived examples:
# Is there any way to eliminate the need to copy/paste the two common named options
# by putting the common signature parts in a SUB-MAIN?
multi MAIN(
:$query1, #= # uses sub 1
:$lang = "en", #= # two-character language code
:$region = "US", #= # two-character country code
) {}
@tbrowder
tbrowder / 6-proc-async-hang.t
Created April 11, 2025 20:06
test Proc::Async::Timeout with my code
# @gfldex
use Test;
use Proc::Async::Timeout;
use Mi6::Helper;
my $timeout = 10;
dies-ok {
@tbrowder
tbrowder / tbrowder.md
Created December 22, 2024 18:00
tbrowder-advent-2024

Santa's Print Shop

A lead-free area

Elf Nebecaneezer ('Neb') was welcoming some young new workers to his domain and doing what old folks like to do: pontificate. (His grandchildren politely, but behind his back, call it "bloviating.")

"In the old days, we used hand-set lead type, then gradually used ever-more-modern methods; now we prepare the content in PDF and send a copy to another company to print the content on real newsprint. It still takes a lot of paper, but much less ink and labor (as well as being safer [1])."

"Most young people are very familiar with html and online documents, but, unless your browser and printer are very fancy, it's not easy to create a paper copy of the thing you need to file so that it's very usable. One other advantage of hard-copy products is that they can be used without the internet or electricity. Remember, the US had a hugely-bad day recently when a major internet service provider had a problem!" [He continued to speak...]

@tbrowder
tbrowder / box.rakumod
Last active December 14, 2024 16:37
Raku class Christmas-Tree
# by an Elf-in-training jokester
unit class Box is export {
;
;;;
;
;;;
;;;;;
;;;;;;;
;;has$.h;
@tbrowder
tbrowder / rak.raku
Created November 4, 2024 13:39
use rak in a script
#!/usr/bin/env raku
use rak;
my $rak = rak
#{.meets-the-test},
:find,
#:extensions<pbf otf ttf woff t1>,
:file(/'.' [pfb|t1|ttf|woff|otf] $/),
:paths</usr/share/fonts /Users ~/Library/Fonts>,
@tbrowder
tbrowder / git-status.out
Created June 23, 2024 15:49
git-status error
zef install Git::Status --debug --force-install 1> git-status.out
The following candidates are already installed: Git::Status
===> Searching for: Git::Status
===> Found: Git::Status:ver<0.0.3>:auth<zef:lizmat> [via Zef::Repository::Ecosystems<fez>]
===> Dependencies: File::Temp
===> Fetching: Git::Status
[Git::Status] Fetching https://360.zef.pm/G/IT/GIT_STATUS/627c20d8579579cf3ee2f566a75cb07b67d4726d.tar.gz with plugin: Zef::Service::Shell::curl
===> Fetching [OK]: Git::Status:ver<0.0.3>:auth<zef:lizmat> to /tmp/.zef/1719156869.497326/1719156873.497326.2901.2042436610095/627c20d8579579cf3ee2f566a75cb07b67d4726d.tar.gz
===> Extracting: Git::Status
[Git::Status] Extracting with plugin: Zef::Service::Shell::tar
@tbrowder
tbrowder / log.txt
Created March 6, 2024 18:06
deprecation notice
bigtom:FontFactory-Type1$ mi6 test
==> RunAfterBuild: Execute raku --doc=Markdown docs/METHODS.rakudoc > METHODS.md
t/00-wx-bbox.t ............... ok
t/01-fonts.t .................60/119Saw 1 occurrence of deprecated code.
================================================================================
Method absolute (from Distribution::Resource) seen at:
/usr/local/git-repos/my-public-modules/FontFactory-Type1/lib/FontFactory/Type1/Subs.rakumod (FontFactory::Type1::Subs), lines 57,58
Please use %?RESOURCES<key> directly instead.
--------------------------------------------------------------------------------
Please contact the author to have these occurrences of deprecated code
name, language, hobby
Steve, US English, watching ralroad operations
@tbrowder
tbrowder / catch-attempt.txt
Created October 26, 2023 20:15
Demo CATCH
sub resource-exists($path? --> Bool) is export {
return False if not $path.defined;
my $exists = $?DISTRIBUTION.content($path); # may die
return True if $exists;
}
{
my $return = resource-exists;
say "Returned $return";