User talk:TimToady: Difference between revisions

m
added a header section to the talk page.
m (added a header section to the talk page.)
 
(7 intermediate revisions by 5 users not shown)
Line 1:
==welcome==
{{User:Short Circuit/new user greeting}} --[[User:Short Circuit|Michael Mol]] 00:23, 26 August 2010 (UTC)
 
Line 41 ⟶ 42:
: So perhaps Goldilocks should consider throwing off her blankets, crossing the room, and getting under the covers with us J guys :) (Or maybe you should implement '''&.''' in Perl6. You stole all our other good ideas anyway ;)
: --[[User:DanBron|DanBron]] 23:43, 6 November 2012 (UTC)
 
== coercive/generic string comparisons ==
 
Hi Tim. It might be that my brain is busted tonight, but I am not getting that coercive/generic stuff. Could you provide an example of each? Don't worry if not, I will keep searching. Cheers, Mark. [[User:Markhobley|Markhobley]] 22:57, 23 February 2013 (UTC)
 
== [[IBAN]] ==
 
Hello,
 
I've seen your change on [[IBAN]] and I wondered if it was possible to define it as a SubSet of Str. I don't know much about SubSet but I thought it might be a nice use-case, as a IBAN could be entered as a string literal and be considered as an IBAN kind of automatically.--[[User:Grondilu|Grondilu]] ([[User talk:Grondilu|talk]]) 00:13, 19 April 2013 (UTC)
 
:Hi. Me again. I've just realized it's actually easy to do:
:<lang perl6>subset IBAN of Str where -> Str $iban is copy {
my %len = <
AD 24 AE 23 AL 28 AT 20 AZ 28 BA 20 BE 16 BG 22 BH 22 BR 29 CH 21
CR 21 CY 28 CZ 24 DE 22 DK 18 DO 28 EE 20 ES 24 FI 18 FO 18 FR 27
GB 22 GE 22 GI 23 GL 18 GR 27 GT 28 HR 21 HU 28 IE 22 IL 23 IS 26
IT 27 KW 30 KZ 20 LB 28 LI 21 LT 20 LU 20 LV 21 MC 27 MD 24 ME 22
MK 19 MR 27 MT 31 MU 30 NL 18 NO 15 PK 24 PL 28 PS 29 PT 25 RO 24
RS 22 SA 24 SE 24 SI 19 SK 24 SM 27 TN 24 TR 26 VG 24
>;
 
$iban ~~ s:g/\s//;
return False if $iban ~~ m/<-[ 0..9 A..Z a..z ]>/;
 
my $country = $iban.substr(0,2).uc;
return False unless %len{$country} and $iban.chars == %len{$country};
 
$iban ~~ s/(.**4)(.+)/$1$0/;
return $iban.subst(:g, /\D/, { :36(~$_) }) % 97 == 1;
}
 
for 'GB82 WEST 1234 5698 7654 32',
'gb82 west 1234 5698 7654 32',
'GB82 TEST 1234 5698 7654 32'
{
say $_ ~~ IBAN;
}</lang>
:I'll let you decide if it's worth using in this task.--[[User:Grondilu|Grondilu]] ([[User talk:Grondilu|talk]]) 01:14, 19 April 2013 (UTC)
 
== Deleting spam pages ==
 
Why don't you, as most admins do on hitchwiki.org, replace the "Content was" with just one word, "Spam" to stop links still appearing on the site in the "Recent Changes" page?
 
My €0.02... [[User:Prino|Prino]] ([[User talk:Prino|talk]]) 21:36, 7 November 2013 (UTC)
 
:I tend to do that for just that reason myself. --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 22:37, 7 November 2013 (UTC)
:Well, I asked about that very thing a year or two ago on IRC, and was told those links aren't a problem due to the way the robots worked. But if that is not the case (or is no longer the case), I can certainly be more careful. --[[User:TimToady|TimToady]] ([[User talk:TimToady|talk]]) 08:30, 8 November 2013 (UTC)
::Also, about spammers, you might want to start blocking them pro-actively, there may come a moment that you will suddenly be flooded with spam from morons that registered six months ago, on hitchwiki we have (OK, the boss has) also installed the "Cleanup Recent Changes" plugin that allows you to flip the "bot"-bit, turning the removal of spam pages and the blocking (together with registration) of (potential) spammers into bot-edit that no longer show up in the "Recent Changes" page, making it a lot more useful. [[User:Prino|Prino]] ([[User talk:Prino|talk]]) 15:33, 10 November 2013 (UTC)