Re: XML module question?

2021-07-16 Thread David Warring
The XML::Writer module side-steps any ordering issues by directly serializing data structures to xml: $ raku -M XML::Writer -e'say XML::Writer.serialize: :wpt[ :lat<42>, :long<69>, "blah" ]' blah On Sat, Jul 17, 2021 at 4:48 AM Bruce Gray wrote: > > On Jul

Re: ^methods doesn't show all methods

2021-02-16 Thread David Warring
I'm getting this on Rakudo blead. $ raku -v Welcome to Rakudo(tm) v2020.12-129-g291cc5f39. Implementing the Raku(tm) programming language v6.d. Built on MoarVM version 2020.12-100-gc93531608. $ raku -e'my $s = set 2, 4, 6; say $s.^methods>>.name.sort;' (ACCEPTS ASSIGN-KEY AT-KEY BUILDALL Bag

Re: Is LibraryMake still current?

2019-12-22 Thread David Warring
Hi Fernando, I'm still in the habit of using LibraryMake. E.g. for https://github.com/p6-xml/LibXML-raku released in this last few months. Regards, David On Sun, Dec 22, 2019 at 7:47 AM Fernando Santagata < nando.santag...@gmail.com> wrote: > Hello, > > What can I use to help building native

Re: Fastest way to convert from a Buf to a Str?

2019-02-03 Thread David Warring
Are all characters in the range 0-255, ie latin-1 characters? You could then try: my $str = $buf.decode("latin-1"); There's one potential issue if your data could contain DOS end of lines ("\r\n"), which will get translated to a single logical "\n" in the decoded string. - David On Sun, Feb

Re: Are 64 bit natives universally available?

2017-08-27 Thread David Warring
ble since Christmas, afaik. > > > On 27 Aug 2017, at 22:42, David Warring <david.warr...@gmail.com> wrote: > > > > Quick question. > > > > I just want to doublle check that int64, uint64 are universally > available via Perl 6, before introducing them

Are 64 bit natives universally available?

2017-08-27 Thread David Warring
Quick question. I just want to doublle check that int64, uint64 are universally available via Perl 6, before introducing them into modules. e.g. % perl6 -e'my uint64 $n = 99; say $n' 99 - David

Re: Bi-directional communication with another process

2017-07-27 Thread David Warring
Thanks Timo, A Proc::Async example, after reading the doco. Agree, that't better, even for the simple case :-) - David my $proc = Proc::Async.new('sh', '-c', 'for x in `seq 1 1` ; do echo "o$x"; echo "e$x" 1>&2; done'); # subscribe to new output from out and err handles: $proc.stdout.tap(->

Re: ding!

2017-05-31 Thread David Warring
Does printing an ASCII BEL character do what you want? perl6 -e'print "\x7"' On Thu, Jun 1, 2017 at 3:23 PM, ToddAndMargo wrote: > Hi All, > > Does Perl 6 have a build in "ding" sound, or do I > need to make a system call (which I do all > the time in bash script)? > >

Re: Union

2016-04-11 Thread David Warring
Hi Marcel, With regard to checking for endianess. I don't think there's anything built in NativeCall that directly determines this, but hopefuly the following should do it, without resorting to a C compiler. use NativeCall; sub little-endian returns Bool { my $i = CArray[uint32].new:

Re: Custom accessor compose via traits

2015-07-30 Thread David Warring
, which are a bit more evolved than the above. hash methods are also overrride: AT-KEY ( $foobar) , and ASSIGN-KEY ($foobar = 42) It's an experiment, which is so far, progressing pretty well, the above is just a nit. - David On Fri, Jul 31, 2015 at 9:47 AM, David Warring david.warr...@gmail.com wrote

Re: Need Help with Perl 6 Module Test::Builder

2015-04-01 Thread David Warring
Hi Tom, I'm seeing the failure(s) as well. I've put in a PR that hopefully addresses this issue - https://github.com/soh-cah-toa/p6-test-builder/pull/2. While we're waiting for the author, you can try checkout out, and building https://github.com/dwarring/p6-test-builder.git Cheers, David On

Re: Gather, take, newbie questions

2013-12-11 Thread David Warring
Hi Jacinta, I get a bit further with my build of Perl 6, which at least runs: % perl6 fib.pl 0 Are you maybe using an old Perl6? Try: % perl6 -e'say $*PERL' (name = rakudo, compiler = {name = rakudo, ver = 2013.11-22-g262e600, release-number = , build-date = 2013-12-05T22:52:45Z, codename =

Re: Perl 6 / Rakudo unicode code point ranges

2013-02-20 Thread David Warring
, Feb 18, 2013 at 11:29 PM, David Warring david.warr...@gmail.comwrote: Hi Guys, A quick question. I'm trying to interpret unicode code-point ranges from the CSS 3 spec - http://www.w3.org/TR/css3-syntax/#CHARSETS The rule in question is nonascii :== #x80-#xD7FF #xE000-#xFFFD #x1