Skip to content

Instantly share code, notes, and snippets.

View ology's full-sized avatar
💭
🤔

Gene Boggs ology

💭
🤔
View GitHub Profile
@ology
ology / out.txt
Created July 14, 2024 23:44
fluidsynth on Linux Mint complains
▸ fluidsynth
FluidSynth runtime version 2.1.1
Copyright (C) 2000-2020 Peter Hanappe and others.
Distributed under the LGPL license.
SoundFont(R) is a registered trademark of E-mu Systems, Inc.
Cannot connect to server socket err = Connection refused
Cannot connect to server request channel
fluidsynth: warning: Failed to set thread to high priority
jackdmp 1.9.12
@ology
ology / benchmark-subseqs.pl
Created July 5, 2024 22:01
one perl contiguous subsequences benchmark run and code
#!/usr/bin/env perl
use strict;
use warnings;
use Benchmark qw(timethese);
use List::Util qw(all);
my $count = shift || 100_000_000;
my $mother = [qw(qn qn qn)];
@ology
ology / output.txt
Last active July 5, 2024 21:34
musical rhythmic breeding WIP...
Rules: {
en => [ 'en' ],
hn => [ 'den en', 'en den', 'qn qn', 'qn en en', 'en qn en', 'en en qn' ],
qn => [ 'en en' ],
}
Reverse rules (computed): {
'den en' => [ 'hn' ],
en => [ 'en' ],
'en den' => [ 'hn' ],
@ology
ology / .pl
Last active July 5, 2024 06:52
ordered subsequence with possible duplicates
sub contiguous_subsequences {
my ($little_set, $big_set) = @_;
my $little_set_size = @$little_set;
my $big_set_size = @$big_set;
my @matches;
my ($i, $j) = (0, 0); # sequence indices
my $k = 0; # matches found
@ology
ology / mass-clone.pl
Last active November 4, 2023 03:24
GitHub repo clone in Perl!
#!/usr/bin/env perl
use strict;
use warnings;
use Capture::Tiny qw(capture);
use Getopt::Long qw(GetOptions);
use JSON::MaybeXS qw(decode_json);
use URI ();
my %opt = (
@ology
ology / madness.pl
Last active October 21, 2023 22:11
Replacing static pitches with VoiceGen
#!/usr/bin/env perl
use 5.26.0;
use List::Util qw(shuffle);
use MIDI ();
use Music::Factory ();
use Music::Scales qw(get_scale_MIDI);
use Music::VoiceGen ();
use Object::Pad;
@ology
ology / .txt
Created October 21, 2023 20:09
marimba-madness mystery ?
▸ perl marimba-madness.pl
2023-10-21 13:08:18 geneboggs@mac-geneboggs:~/sandbox/Perl/music
▸ timidity -Od out.midi
Can't estimate audio queue length
Playing out.midi
MIDI file: out.midi
Format: 1 Tracks: 6 Divisions: 96
Sequence: Track 001 1697918898
Track name: Track 002 1697918898
Marker: silence
@ology
ology / gpt4.pl
Last active October 16, 2023 00:09
Hey GPT4, why does God allow mosquitoes to live?
>> The question of why God allows mosquitoes to live is a theological and philosophical one, and it depends on one's beliefs and interpretations. There are several possible explanations that people have put forth:
1. Balance in nature: Some argue that mosquitoes play a role in the ecosystem, serving as a food source for other animals and contributing to the overall balance of nature. Their presence may be necessary for maintaining the ecological system.
2. Free will and natural processes: In many religious beliefs, God has given humans and other creatures free will and allows natural processes to occur. This means that mosquitoes, like other organisms, have the freedom to exist and fulfill their purpose, even if it causes inconvenience or harm to humans.
3. Testing and growth: Some believe that God allows mosquitoes to exist as a way to test humans and help them grow in character. Dealing with challenges, discomfort, or annoyance caused by mosquitoes can contribute to personal growth, patience, or empathy.
@ology
ology / octatonic.pl
Last active October 12, 2023 06:12
ology's version of octatonic
#!/usr/bin/env perl
use strict;
use warnings;
package ChordExtra;
use Role::Tiny;
# chord intervals as relative to the previous note in the chord
sub chord_intervals {
my ($self, $name) = @_;
@ology
ology / route.pl
Created August 8, 2023 13:22
Can't get the /*img route to work - help?
#!/usr/bin/env perl
use Mojolicious::Lite -signatures;
use Mojo::File ();
get '/' => sub ($c) {
$c->render(template => 'index');
};
get '/album/*img' => sub ($c) {