y, a Google directory for those who desire further research:
http://directory.google.com/Top/Computers/Software/Configuration_Management/Tools/Concurrent_Versions_System/
Hope this helps,
Bruce Gray
{
local $/; # slurp!
unpack("%32C*",<>) % 65535;
};
Hope this helps,
Bruce Gray
In Configure.pl and friends, I think that "fail early, fail
loudly" should be a guiding principle, at least for the
things with no workarounds. Unless someone thinks it is a
bad idea, I intend to patch in that direction whenever I see
relevant Configure code.
--
Hope this helps,
Br
dra.html
http://packages.debian.org/stable/doc/tendra-doc.html
http://packages.debian.org/unstable/devel/tendra.html
--
Hope this helps,
Bruce Gray
ctions are raised,
please apply.
--
Hope this helps,
Bruce Gray
>Problem: *.tmp files, especially Makefile.tmp files,
>not being cleaned up.
>
>Cause: lib/Parrot/Configure/Step.pm provides copy_if_diff
>as an export, and also uses it internally. Sub copy_if_diff
>does not clean up
[cc'ed to Brent Dax for his specific attention]
On Fri, 27 Dec 2002 20:34:33 -0500, "Dan Sugalski" wrote:
>At 1:22 AM +0000 12/27/02, Bruce Gray (via RT) wrote:
>>The gcc compiler in MinGW (win32) emits warnings for invalid
>>pragmas in win32.h (platform.h).
>&
on:
http://www-106.ibm.com/developerworks/linux/library/l-ppc/
You were probably joking, but my knee jerked :)
--
Hope this helps,
Bruce Gray
> Begin forwarded message:
>
> From: Matthew Musgrove via DFW-pm
> Subject: [DFW.pm] Sad News
> Date: January 7, 2019 at 3:03:16 PM CST
> To: corpuschristi...@pm.org, hous...@houston.pm.org, aus...@pm.org,
> dfw...@pm.org
> Cc: Matthew Musgrove
> Reply-To: Dallas/Ft Worth Perl Mongers
>
> T
an anonymous *hash* constructor, which is what the curly braces do (when they
are not doing their code-block-ish job).
You could have also used `Hash(…)` or `%(…)` instead of `{…}`, but `{…} is
shortest, and most traditional from Perl 5.
—
Hope this helps,
Bruce Gray (Util of PerlMonks)
acct, $cn ) = %Vendors{"acme"}{"AccountNo", "ContactName”};
my ( $acct, $cn ) = %Vendors;
say [:$acct, :$cn].perl;
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
> On Jan 11, 2019, at 1:25 PM, ToddAndMargo via perl6-users
> wrote:
>
> On 1/1
> On Jan 11, 2019, at 1:39 PM, ToddAndMargo via perl6-users
> wrote:
>
> On 1/11/19 11:33 AM, JJ Merelo wrote:
>> I think you want $x, not $Ace.
>> Cheers
>
> Yup. I am on fire today! :'(
>
> Still can't get it figured out. :'( :'(
>
> $ p6 'my $x="Ace"; my %Vendors=("acme" => { "Conta
;< $x >>` is to take the shortcut intended for constant keys,
and bludgeon it to make it support variable keys, when the basic (and shorter)
syntax of `%Vendors{$x}` handles the variable key naturally.
—
Hope this helps,
Bruce Gray (Util of PerlMonks)
> On Jan 11, 2019, at 1:
> On Jan 11, 2019, at 2:07 PM, ToddAndMargo via perl6-users
> wrote:
>
> Hi All,
>
> Anyone know if someone has written a program like this
> in Perl that will run locally and not require the Internet?
>
> http://www.subnet-calculator.com/
>
>
> Many thanks,
> -T
I have not used it, but
the snag, but was really a new set of problems
that exists only in your example. FYI, every time that I have made this
mistake, it was always due to my creating an example from scratch, instead of
slowly massaging the real problem code down into a minimal form for public
discussion. YMMV.
I a
thing more that those two values; I see that just
after them, the source code says:
/* Brace thyselves */
To call those Windows APIs in Perl 6, you would use NativeCall.
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
ust missing
the correct syntax, or if there is a bug in Rakudo.
Either way, there are docs and tests that need to be added.
EOUTOFTIME, this email stands alone, no bugs filed.
—
Bruce Gray (Util of PerlMonks)
roduced a point of confusion.
In Perl 5 and Perl 6, double-colons are a namespace separator.
The module Audio::Taglib::Simple is a single module, but can be thought of as
"the Simple module, of possibly-a-bunch-of Taglib modules, of the overall
family of Audio modules".
In the same way
6.org/routine/combinations
# --
# Hope this helps,
# Bruce Gray (Util of PerlMonks)
).map: -> \p2 { p1, p2 }
}
I mention it because I had not though to use .skip for this purpose until today.
> thank you very much.
You are very welcome.
—
Bruce Gray (Util of PerlMonks)
LES, which defaults
to $*IN in the absence of any filenames.
For example:
perl6 -e 'say .join("\t") for lines().rotor(4);' path/to/file.txt
Hmmm. I would expect that to be in the Perl 5 to Perl 6 Migration Guides, but I
do not see it there.
—
Hope this helps,
Bruce Gray (Util of PerlMonks)
d gobbling block
and when it tries to parse the block for the if-statement, it doesn't
find one:
Missing block (apparently claimed by 'random-choice')
—
Hope this helps,
Bruce Gray (Util of PerlMonks)
do not treat `.flat` the same way. E.g.:
$ perl6 -e 'say (, ).flat.elems'
3
$ perl6 -e 'say [, ].flat.elems'
2
Full answer coming when time allows. For such a small fix, it was surprisingly
effortful to figure out.
See https://docs.perl6.org/language/list#Itemization
—
Hope this helps,
Bruce Gray (Util of PerlMonks)
sted above, I get
this output:
A
2
3
B
2
3
The first key of each second level is missing, which differs from your sample
output above.
Have I corrupted your Awk code, or have I misunderstood something, or what?
--
Thank you,
Bruce Gray (Util of PerlMonks)
> On Nov 22, 2019, at 9:57 AM, Marc Chantreux wrote:
>
> On Fri, Nov 22, 2019 at 06:20:51AM -0800, William Michels via perl6-users
> wrote:
>> Hi Marc, I did a search for 'semicolon' on the following page and
>> found the interesting text below. Semicolons are used to create
>> multidimension
config.json
{
"baz": "quxx",
"foo": "bar”
}
$ perl6 -e 'use Config::JSON; my %c; %c{$_} = jconf($_) for ; say
%c{$_} for ;'
bar
quxx
$ cat b.dat
foo = bar
baz = quxx
$ perl6 -e 'use Config::Tiny:from; my $conf =
Config::Tiny.read("b.dat"); .say for $conf<_>'
bar
quxx
—
Hope this helps,
Bruce Gray (Util of PerlMonks)
oint of the result.
Exact code here:
https://rosettacode.org/wiki/Integer_roots#Raku
—
Hope this helps,
Bruce Gray (“Util” on RosettaCode, too)
> On May 14, 2020, at 4:36 PM, ToddAndMargo via perl6-users
> wrote:
>
> On 2020-05-14 08:13, Bruce Gray wrote:
>>> On May 14, 2020, at 7:27 AM, ToddAndMargo via perl6-users
>>> wrote:
>>>
>>> Hi All,
>>>
>>> 1) how do I g
#x27;;
time_it(2);
Output:
Bindata in 8.207297
Bindata in 8.12964
Bindata in 8.0798136
Bindata in 3.434386
Bindata in 3.4062148
Bindata in 3.35743893
—
Hope this helps,
Bruce Gray (Util of PerlMonks)
> On Jun 16, 2020, at 5:17 PM, David Santiago wrote:
>
l.so;
printf "%12s: level: %-2d origin: %3s\n", .key, .value for
%inner_joined_monsters.sort;
Produces:
godzilla => ${:level(9), :origin("jp")}
gremlin => ${:level(3), :origin(Any)}
hanuman => ${:level(5), :origin("il")}
tingler => ${:level(Any), :origin("us")}
godzilla: level: 9 origin: jp
hanuman: level: 5 origin: il
—
Hope this helps,
Bruce Gray (Util of PerlMonks)
pre-increment allows you to
specify the line numbers with the more natural numbering:
raku -ne '.say if ++$ == any(1,3,7);' Lines.txt
Line 1
Line 3
Line 7
--
Bruce Gray (Util of PerlMonks)
my $is_a_number = / ^ \d+ [ '.' \d* ]? $ /;
my $sum = @*ARGS.grep($is_a_number).sum;
say $sum;
—
Hope this helps,
Bruce Gray (Util of PerlMonks)
> On Aug 31, 2020, at 12:22 PM, William Michels via perl6-users
> wrote:
>
> I think it looks very good, Radhakrishnan! Pr
-line arguments, but only those arguments that are valid
numbers
—
Hope this helps,
Bruce Gray (Util of PerlMonks)
> On Aug 31, 2020, at 2:23 PM, dan...@codesections.com wrote:
>
> I like Bruce's Regex-based approach.
>
> Here's how I'd probably approach
readers who have not yet embraced the map/grep
mindset we have been showing off.
my @nums;
for @*ARGS -> $arg {
push @nums, $arg if $arg.Rat;
}
say @nums.sum;
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
> On Aug 31, 2020, at 3:02 PM, William Michels wrote:
>
> Very
g/language/operators#index-entry-X_(cross_metaoperator)
https://docs.raku.org/language/operators#index-entry-cross_product_operator
If any part of this was lacking in clarity, please let me know where to focus,
and I will be glad to expound.
--
Hope this helps,
Bruce Gray (Util of Perlmonks)
; (since I do not use those packages myself); I am just trying to answer
the implied question.
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
hoice of symbols and order
is only obvious (to we hexidecimal-trained humans) up to (Arabic numbers +
English Alphabet).
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
` is no longer needed.
subset test-set of Str where *.&is-valid;
sub real-use-of-subsets ( test-set $var1 ) {
say "This is definitely a `test-set`: $var1";
}
sub real-use-of-subsets ( test-set $var1 ) {
say "Not a `test-set`: $var1";
}
# Test it.
real-use-of-subsets('abc');
real-use-of-subsets('^’);
—
Hope this helps,
Bruce Gray (Util of PerlMonks)
2
()
5
6
(1 2 1)
(1 1)
Str @z = "\n"
Str @z = "\\n"
Str @z = "\\n"
List @z = $( )
Str @z = "a \n b"
Str @z = "a \\n b"
List @z = $("a", "\\n", "b")
List @z = $("a", "b")
—
Hope this helps,
Bruce Gray (Util of PerlMonks)
4..4)).pick
For more detail on Raku Randomess, you might enjoy the first third of my 2018
talk:
https://www.youtube.com/watch?v=DJCp6k1ts3g
Perl 6 and the Emergent Program.*
3m22s - 13m33s
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
ant:
say cos 45*π/180;
but also would be clearer with parens:
say cos( 45*π/180 );
For the whole precedence table, see:
https://docs.raku.org/language/operators#Operator_precedence
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
me of
your choice , if that makes more sense in your code.
my Str $a = ’15';
my Str $b = '37';
say $b.cos;
Inside method `cos`, during the .cos call in the code above, “self” is an alias
to $b .
—
Hope this helps,
Bruce Gray (Util of PerlMonks)
ontextualizer
So, I recommend .list or @(…) as more intuitive, maybe even *sufficiently*
intuitive :^)
> thanks
> Brian
—
Hope this helps,
Bruce Gray (Util of PerlMonks)
eager "foo"=>1 }; say .raku ~ ' is a '
> ~ .WHAT.gist for @a;
$(:foo(1),) is a (List)
This does not address why `eager` is changing the pair constructor,
but it simplifies future discussion,
and also shows that while only #4 of the OP REPL samples was throwing the
error,
#3 is actually also not producing what was desired.
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
_expression…by me”,
it sounds like you can’t/won't pursue this shortened form of the regex
because you don’t actually *know* the long form of the regex yet.
If so, since #1 is not available, I would do #4 until the full details
of all the operands becomes clear, then try to refactor to #2 or #3.
> rir
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
2020.07True
2020.07.16.g.03.d.3.e.43.faTrue
2020.08True
2020.08True
2020.09True
2020.12False
2020.11True
2020.12False
2021.02False
2021.02False
2021.03False
2021.04False
2021.05False
2021.05False
2021.05False
In https://github.com/MoarVM/MoarVM/blob/master/docs/ChangeLog , I see nothing
in 2020.11 that looks like the culprit.
In https://github.com/rakudo/rakudo/blob/master/docs/ChangeLog , I see nothing
in 2020.11 that looks like the culprit, but that big change in coersion ("new
coertion semantics”) was big enough to make that a good candidate for proper
bisecting.
(but not by me; I am out of time for this week)
—
Hope this helps,
Bruce Gray (Util of PerlMonks)
my $CC = AA.new( I => @will_become_I_soon );
or
my $CC = AA.new( I => [ flat( Str xx 400, "four hundred", Str xx
2000-400-1, "two thousand" ) ] );
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
> On Jul 11, 2021, at 1:13 AM, ToddAndMargo via perl6-users
> wrote:
—snip--
> $*PROGRAM.parent is just a silly dot.
—snip—
Todd,
That is true only when the program you are running happens to be in your
current directory
(as is very common, but not nearly universal, and not the case for
= do for lines()
> {(.words[3..*],.words[0..2])}; .put for @reordered;’ lat_lon.txt
I am sure that `-MXML` is leftover from other experiments.
Removing `@reordered` and switching to `-n` like my critiques above, this
becomes:
raku -ne 'put (.words[3..*],.words[0..2]);' lat_lon.txt
To “wow” the SO crowd, you might note that @array[N..*],@array[0..N-1] has a
shortcut in Raku (.rotate), making this the tightest of all the solutions I see
so far:
raku -ne 'put .words.rotate(3);' lat_lon.txt
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
5PM
11-06-2014 - 10:51:21PM
11-06-2014 - 10:52:08PM
11-06-2014 - 10:53:30PM
11-06-2014 - 10:54:50PM
I do note that XML::Writer does not show up in the search at
https://modules.raku.org/t/XML ,
and is very under-documented, so that is an opportunity for someone to
contribute.
--
Hope this helps,
567890123456' x 100);
# Uncomment one of these two lines:
$NewRev ~~ s/ .*? ('Release Notes V') //; # Original
# $NewRev ~~ s/ ^ .*? ('Release Notes V') //; # Anchored
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
> On Oct 23, 2021, at 7:48 PM, ToddAndMargo via perl6-users
> wrote:
>
> On 10/23/21 17:37, Bruce Gray wrote:
>>> On Oct 23, 2021, at 6:43 PM, ToddAndMargo via perl6-users
>>> wrote:
>>>
>>> Hi All,
>>>
>>> Wish I had a
part, with
something like this (only lightly tested) code:
@y .= head($wanted_decimal_places + $original_number.sqrt.floor.chars);
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
27453459686201472851741864088919860955232923048430871432145083976260362799525140798968725339654633180882964062061525835239505474575028775996172983557522033753185701135437460340849884709
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
( :$hexadecimal_precision_wanted, :$decimal_precision_via_log,
:$decimal_precision_via_chars );
Output:
hexadecimal_precision_wanted => 8192
decimal_precision_via_log => 9865
decimal_precision_via_chars => 9865
--
Hope this helps,
Bruce Gray (Util of PerlMonks) [who just learned of the BigRoot module]
AIN gets 'a.txt' in $file1 and 'b.txt' in $file2. If I call it badly:
./myscript.raku a.txt b.txt c.txt
, then I get an error, with a usage message auto-generated by Raku:
myscript.raku [--dry-run]
For full details, see:
https://docs.raku.org/language/create-cli#index-entry-MAIN
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
;Str'. The 'decode' method should
> be used to convert a Buf to a Str.
> [10] > $y += 0xBB;
> Type check failed in assignment to $y; expected Buf but got Int (201)
--snip--
If all you want is to append 0xBB to $y, either of these will work:
$y ~= Buf.new(0xBB);
$y.append(0xBB);
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
b} <=> $digraph{$a} || $a cmp $b }
keys %digraph
}
$_=lc; while (/([a-z]{2})/g) {++$digraph{$1}; --pos; }
' Camelia.svg
, when run against a downloaded copy of our mascot:
https://upload.wikimedia.org/wikipedia/commons/8/85/Camelia.svg
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
utside the BEGIN block";
# say "b_var is still $b_var outside the BEGIN block"; # Commented out, because
illegal!
Output:
a_var is 42 within the BEGIN block
b_var is 11 within the BEGIN block
did something! By the way: a_var => 42 inside a sub called from the BEGIN
block, because
var/log/messages | raku -ne '.say for [\~] .comb: /\/<-[/]>+/;'
/var
/var/log
/var/log/messages
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
rent ~~ "/") }'
--snip--
The use of `.parent` inspired me to think of this shorter solution, via the
Sequence Operator:
$ raku -e '.put for "/var/log/messages".IO, *.parent …^ "/";'
/var/log/messages
/var/log
/var
https://docs.raku.org/language/operators#infix_...
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
cd ~/Junk
raku -e 'use lib "~/FakeDir"; use FakeModule;'
===SORRY!=== Error while compiling -e
Could not find FakeModule in:
file#/Users/bruce_pro/Junk/~/FakeDir
...
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
say for lines().tail(3)' a.1
98
99
100
real0m2.155s
user0m1.727s
sys 0m0.249s
On Unix or Mac systems (and maybe Windows, UnxUtils or CygWin or GnuWin32 or
Microsoft's own "Windows Subsystem for Linux"), faster (and prettier) to pipe
to `tail -3`.
$ tail -3 a.1
(and I presume)
C:\> dir /s /A:-D /d /a | tail -3
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
> On Oct 22, 2022, at 11:46 PM, ToddAndMargo via perl6-users
> wrote:
>
> On 10/22/22 21:11, Bruce Gray wrote:
>>> On Oct 22, 2022, at 10:28 PM, ToddAndMargo via perl6-users
>>> wrote:
>>>
>>> Hi All,
>>>
>>> Is there a
t;.>)».s.sum;"
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
arameter list defines a default value. `$type` gets
assigned the undefined-but-still-useful type-object of `Buf` only if no `type`
argument is passed.
So, a real-life call might look like:
my $q = blob-from-pointer( $p, elems => 10, type => Blob[uint8] );
> :'(
>
> Yours in confusion,
> -T
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
f your phone company considers them free.
In other words, you might get charged, but it is the phone company's charge,
not Jitsi's.
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
se HTML
with regex; use a HTML parser".
(We all parse HTML with regex anyway, on occasion; regex are just so
easy to reach for.)
To encourge you to consider the "correct" approach, I have appended a
solution in just 6 SLOC.
--
Hope this helps,
Bruce Gray (Util of P
github.com/tony-o/raku-fez/issues/105
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
> On Dec 8, 2023, at 00:00, Francis Grizzly Smit wrote:
>
> Ooops sorry my bad
>
> On 8/12/23 16:55, Francis Grizzly Smit wrote:
>> Hi
>>
>> keep getting this error email
nderscores.
>
> Your take?
--snip--
# Brave Browser temp directories: exactly 32 contiguous lowercase alpha
characters.
my $brave_junk_directories_re = / ^ <[a..z]> ** 32 $ /;
my %to_skip = @filenames.grep($brave_junk_directories_re).Set;
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
ile check my modules if I
> import them to a program and -c the program.
>
> For example, the following program uses
> the above module:
>$ raku -c CobianWrapper.pl6
>Syntax OK
>
> I just want to do a syntax check on my modules
> at time without the program.
>
> :'(
The wrapper program can be a `-e` one-liner, like:
raku -c -e 'use NativeCall;'
Syntax OK
Does this work for you?
raku -c -e 'use WinMessageBox;'
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
> On Feb 8, 2024, at 15:12, ToddAndMargo via perl6-users
> wrote:
>
> Hi All,
>
> Is there one of those fancy system variables that will
> tell me who called/started raku?
raku -e 'say $*USER'
bruce
--
Hope this helps,
Bruce Gray (Util of Perlmonks)
reads that `.sort`
needs would not play well with Seq. It does not matter whether you convert the
numbers to a Numeric type (which you did correctly in the `.map`), they are
still part of a Seq.
The .cache method turns the Seq into a List, and the sort behaves as you
intended.
https://docs.raku.org/routine/cache
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
has $.expire;
has $.interval;
}
my class Output {
has $.csv;
has $.html;
has $.xml;
has $.logger;
}
# XXX This would import the `auto-cli` function.
# use Getopt::Attributes;
# These must run before MAIN.
my $t = auto-cli( Timer );
my $o = auto-cli( Output, :logger('localhost') ); # default if --logger not
specified on command-line
sub MAIN ( $filename ) {
say 'Timer object ', $t;
say 'Output object ', $o;
say 'Remaining ARGS ', @*ARGS;
say 'Filename ', $filename;
}
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
https://www.enotes.com/shakespeare-quotes/by-pricking-my-thumbs
ts/1c5qglk/raku_science_and_speakers_for_tprconference/
--
Hope to see you there,
Bruce Gray (Util of PerlMonks)
t; 4 } @z)
{ print "@z"; $_ .= "." for @z }'
a bb ccc
a. bb.
a..
By the way, your use of '!$_->valid' instead of '$_->valid'
sounds backwards when compared with your text
"...assume that [EMAIL PROTECTED] will contain only valid elements".
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
RSS reader instead of a mailing list, then use this
link:
http://github.com/feeds/rakudo/commits/rakudo/master
(which I found on this page:)
http://github.com/rakudo/rakudo/commits/
--
Hope this helps,
Bruce Gray
build/ tools/
--
Hope this helps,
Bruce Gray
(Util on PerlMonks)
cess.
Note: I don't use MacPorts, and am guessing.
--
Hope this helps,
Bruce Gray
GMT
Architecture: i386-MSWin32
JIT Capable : No
Interp Flags: (no interpreter)
Exceptions : (missing from core)
Dumping Core...
Sorry, coredump is not yet implemented for this platform.
Program exited with code 01.
(gdb) bt
No stack.
--
Hope this helps,
Bruce Gray (Util)
that a compiled version is silently saved during the first compile-
run,
and future runs check the timestamps of the source and compiled
versions,
skipping the compile if the source has not been updated.
--
Hope this helps,
Bruce Gray
t simple ASCII quotes?
I do not know the answer, but these links discuss the problem:
http://www.mofeel.net/809-comp-text-tex/23751.aspx
http://ansuz.sooke.bc.ca/software/latex-tricks.php
--
Hope this helps,
Bruce Gray (Util)
ded, I offer this just-uploaded
video:
https://www.youtube.com/watch?v=D16wa-gnFwE
Brian Duggan - "Extending Perl 6 Command Line Argument Parsing using
Metaprogramming”
Brian covers the basics of “positional vs named parameters” around timemark
6m45s to 8m15s.
—
Hope this helps,
Bruce Gray (Util of PerlMonks)
raight translation:
ifconfig | perl6 -e 'say lines().grep({/flags/}).map({.words.[0].subst(/":"$/,
"")}).sort.[1]'
P6-ish version:
ifconfig | perl6 -e 'say lines.map({ ~$0 if /^(\S+) ": flags="/ }).sort[1]'
—
Hope this helps,
Bruce Gray (Util of PerlMonks)
p://www.jnthn.net/articles.shtml
—
Hope this helps,
Bruce Gray (Util of PerlMonks)
ith `.&` instead of `.` , like so:
say %h.keys.grep(*.so)».sqrt.sum.&MyWickedSub.abs.&MySumTwister;
This syntax is listed as "postfix .&", and can be found here:
https://docs.perl6.org/language/operators#postfix_.&;
So. `.` calls a method, and `.&` calls a sub as if the sub were a method.
--
Hope this helps,
Bruce Gray (Util)
$line {
my Str $temp = $line;
# if no <> surrounding $pattern it becomes literal.
if $temp ~~ s/ (<$pattern>) /$color_red$0$color_off/ {
say $temp;
}
}
}
—
Hope this helps,
Bruce Gray (Util of PerlMonks)
er Way to do it:
ls | perl6 -e '.say for lines().sort: {
( (/ (\d\d)"-"(\d\d)"-"(\d\d\d\d)"_"(\d\d)":"(\d\d)":"(\d\d) / ??
"$2$0$1$3$4$5" !! ""), $_ )
}'
—
Hope this helps,
Bruce Gray (Util of Perlmonks)
specced to work differently than as I used it
here, and so may change in the future.
Buf.new should have a different API, and a Buf with size(1) should (I
think) autopack 8 bits into a byte on output.
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
On Feb 16, 2011, at 4:14 PM, Bottoms, Christopher A wrote:
Hello all,
As soon as I add the MAIN sub to my module file, my test file
complains:
--snip--
In your module file, after the "use v6" line, add this line:
module MaizeDiversity::Impute;
--
Hope this helps,
Bruce Gra
tion of the rakudo.org site is taking up some
key people's tuits today.
Did I miss an announcement?
No; I think that the announcement is waiting on the release itself.
Preview: https://github.com/rakudo/star/tree/master/skel/docs/announce/
--
Hope this helps,
Bruce Gray (Util on IRC)
On Apr 29, 2011, at 11:02 PM, Jon Gentle wrote:
I'd like to take a minute and invite everyone to join us during
YAPC::NA
2011 for a joint Parrot and Perl6 Birds of a Feather meeting and
hackathon.
I plan to attend both the BoF and Hackathon.
Thanks for your efforts!
--
Bruce Gray
def;
perl6 -e 'sub look { .say for @_.elems, @_.perl, @_[0].perl; }; look();'
0
[]
Any
--
Hope this helps,
Bruce Gray (Util)
gray( @b );
my $d = gray_to_bin( $g );
printf "%2d: %5b => %5s => %5s: %2d\n", $n, $n, $g.join, $d.join, :
2($d.join);
die if :2($d.join) != $n;
}
--
Hope this helps,
Bruce Gray (Util of PerlMonks)
On Jul 30, 2011, at 6:40 PM, Mark J. Reed wrote:
On Sat, Jul 30, 2011 at 6:02 PM, Bruce Gray
wrote:
--snip--
our multi sub infix: ( $x, $y ) { ( $x + $y ) % 2 };
Why did you need to define this yourself instead of just using +^ ?
Umm, because that is what was done in the Haskell code I
he need
for the arrow, and make the code much less ugly.
Also, the first value (0) might be unnecessary. The spec says that it
should not be required when the closure is 0-ary, but I think that
should also be true for slurpy/n-ary closures.
These work in Niecza:
my @squares := { @_ ** 2 } ... *;
my @triangle := 1, { @_[*-1] + @_ + 1 } ... *;
--
Hope this helps,
Bruce Gray
(Util of PerlMonks)
b
parrot-5.1.0.tar.gz
Many thanks to all our contributors for making this possible, and our sponsors
for supporting this project. Our next scheduled release is 19 Mar 2013.
Enjoy!
--
Bruce Gray (Util of PerlMonks)
and our sponsors
for supporting this project. Our next scheduled release is 16 Apr 2013.
Enjoy!
--
Bruce Gray (Util of PerlMonks)
We are stardust.
Billion year old carbon.
We are golden.
Caught in the devil's bargain
And we've got to get ourselves back to the garden.
(To some semblance of a garden.)
-- "Woodstock", by Joni Mitchell
On behalf of the Parrot team, I'm proud to announce Parrot 5.3.0, also known
as "W00tstock
Jimi Hendrix, deceased, drugs.
Janis Joplin, deceased, alcohol.
Mama Cass, deceased, ham sandwich.
-- Austin Powers (making a list of friends from the Summer of Love)
On behalf of the Parrot team, I'm proud to announce Parrot 5.4.0, also known
as "Austin Parrot". Parrot (http:
Obi-Wan: That boy is our last hope.
Yoda: No. There is another.
-- Star Wars Episode V: The Empire Strikes Back
On behalf of the Parrot team, I'm proud to announce Parrot 5.5.0, also known
as "Salvadori's Fig Parrot". Parrot (http://parrot.org/) is a virtual machine
aimed
at running all dyna
1 - 100 of 132 matches
Mail list logo