I hereby claim:
- I am frioux on github.
- I am frew (https://keybase.io/frew) on keybase.
- I have a public key whose fingerprint is 2896 7E7B F03D B43E 5A43 3430 6EB3 302F 737A 7582
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
I started making hot buttered rum from a Trader Vic recipe 15 years ago, and I have gradually evolved it by adding more spices, more butter, and less rum.
The way you make a hot buttered rum is to add some “batter” to some rum, and heat it. I like to keep a made-up batch of the batter in the refrigerator in an old margarine tub. For parties I make up a fresh batch.
#!/usr/bin/env perl | |
use 5.20.0; | |
use warnings; | |
use autodie; | |
use experimental 'postderef'; | |
use File::KeePass; | |
use Text::CSV; |
module Ghetto; | |
sub run($cmd) { | |
# create a random filename to store output in | |
my $tmp = ".tmp-{(1..100).pick}-ghetto"; | |
# use the real run command, :: means root namespace | |
::run("$cmd > '$tmp'"); | |
# open the file |
#!/home/frew/personal/rakudo/perl6 | |
use Ghetto; | |
for =$*IN -> $track,$artist,$album,$sep { | |
my $cmd = qq{dcop amarok collection query "SELECT url FROM tags JOIN artist ON artist.id = artist JOIN album ON album.id = album WHERE artist.name = \\"$artist\\" and album.name = \\"$album\\" and title = \\"$track\\""}; | |
# this insanity is to take the first character off because amaroK adds a | |
# . to the front of all the file names. There's probably a better way | |
# to do this. | |
say Ghetto::run($cmd).split("\n")[0].reverse.chop.reverse; |
#!/home/frew/personal/rakudo/perl6 | |
use Ghetto; | |
for =$*IN -> $line { | |
unless $line ~~ /^\#/ { | |
my $file = $line.split('/').pop; | |
my $cmd = qq{dcop amarok collection query "SELECT title,artist.name,album.name FROM tags JOIN artist ON artist.id = artist JOIN album ON album.id = album WHERE url LIKE \\"%/$file\\""}; | |
my ( $track,$artist,$album ) = Ghetto::run($cmd).split("\n"); |
< frew> does anyone think that it would be worthwhile to implement a pure perl implementation of the various POSIX functions that are fallbacks? | |
< frew> it seems like it would mostly be SMOP and it would really help at least me :-) | |
< frew> (win32 boo) | |
<@LeoNerd> Which functions did you have in mind? | |
< frew> well I just ran into WEXITSTATUS | |
<@Steve_p> That was done, wasn't it? | |
< frew> and I had an issue with the date formatting a while ago | |
<@LeoNerd> strftime? | |
<+purl> hmmm... strftime is in POSIX.pm or possibly *very* useful for formatting dates or %Y%m%d is what you want | |
< frew> yessir |
SELECT [me].[id], [me].[name], [me].[group_id], [me].[user], [me].[version], [me].[is_active], [key_server_side_mia], [button_server_side_mia], [messenger_server_side_ | |
mia], [key_pro_server_side_mia], [key_status], [button_status], [messenger_status], [key_pro_status], [is_group_active], [last_checkin], [macro] | |
FROM ( | |
SELECT [me].[id], [me].[name], [me].[group_id], [me].[user], [me].[version], [me].[is_active], [key_server_side_mia], [button_server_side_mia], [messenger_server_s | |
ide_mia], [key_pro_server_side_mia], [key_status], [button_status], [messenger_status], [key_pro_status], [is_group_active], [last_checkin], [macro], ROW_NUMBER() OVE | |
R ( | |
ORDER BY | |
SELECT( 1 ) | |
) AS [rno__row__index] | |
FROM ( |
.:15:24:31:. <geoff> which, I had an interesting time meshing that union with correlated_resultset, | |
incidentally | |
.:15:24:41:. frew I made a thing that will correctly sort on a correlated column when the user asks to | |
.:15:24:51:. frew oh? | |
.:15:24:52:. frew why? | |
.:15:24:53:. <geoff> oooo | |
.:15:24:58:. <geoff> I just had to do | |
.:15:25:05:. <geoff> $rs1->with_correlation | |
.:15:25:10:. <geoff> and $rs2->with_correlation | |
.:15:25:13:. <geoff> then union |